mirror of
https://github.com/terrapkg/packages.git
synced 2026-06-20 10:30:39 +00:00
b87cd126b7
(cherry picked from commit 093110e873)
Signed-off-by: GildedRoach <GildedRoach@users.noreply.github.com>
Co-authored-by: Kyle Gospodnetich <me@kylegospodneti.ch>
63 lines
2.3 KiB
RPMSpec
63 lines
2.3 KiB
RPMSpec
%global commit 8187920ed261c7024826f8204cc7bea45153a3da
|
|
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
|
%global commitdate 20260310
|
|
%global ver 0.83
|
|
|
|
%define buildforkernels akmod
|
|
%global debug_package %{nil}
|
|
%global modulename hid-tmff2
|
|
|
|
Name: %{modulename}-kmod
|
|
Version: %{ver}^%{commitdate}git.%{shortcommit}
|
|
Release: 4%{?dist}
|
|
Summary: Thrustmaster Force Feedback kernel module
|
|
License: GPL-2.0-only
|
|
URL: https://github.com/Kimplul/%{modulename}
|
|
Source0: %{url}/archive/%{commit}.tar.gz#/%{modulename}-%{shortcommit}.tar.gz
|
|
BuildRequires: kmodtool
|
|
Requires: akmods
|
|
Requires: %{modulename} = %{?epoch:%{epoch}:}%{version}
|
|
Requires: %{modulename}-akmod-modules = %{?epoch:%{epoch}:}%{version}
|
|
Conflicts: dkms-%{modulename}
|
|
|
|
%{expand:%(kmodtool --target %{_target_cpu} --repo terrapkg.com --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) }
|
|
|
|
%description
|
|
Linux kernel module for Thrustmaster T300RS, T248 and (experimental) TX, T128,
|
|
T598, T-GT II and TS-XW wheels.
|
|
|
|
%prep
|
|
%{?kmodtool_check}
|
|
kmodtool --target %{_target_cpu} --repo terrapkg.com --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null
|
|
|
|
%autosetup -p1 -n %{modulename}-%{commit}
|
|
|
|
# Stub out the hid-tminit submodule (superseded by in-kernel hid-thrustmaster)
|
|
mkdir -p deps/hid-tminit
|
|
printf 'all:\ninstall:\nclean:\n' > deps/hid-tminit/Makefile
|
|
|
|
for kernel_version in %{?kernel_versions}; do
|
|
mkdir _kmod_build_${kernel_version%%___*}
|
|
cp -fr Kbuild Makefile src _kmod_build_${kernel_version%%___*}/
|
|
cp -fr deps _kmod_build_${kernel_version%%___*}/
|
|
done
|
|
|
|
%build
|
|
for kernel_version in %{?kernel_versions}; do
|
|
pushd _kmod_build_${kernel_version%%___*}/
|
|
%make_build KDIR="${kernel_version##*___}"
|
|
popd
|
|
done
|
|
|
|
%install
|
|
for kernel_version in %{?kernel_versions}; do
|
|
mkdir -p %{buildroot}/%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/
|
|
install -p -m 0755 _kmod_build_${kernel_version%%___*}/*.ko \
|
|
%{buildroot}/%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/
|
|
done
|
|
%{?akmod_install}
|
|
|
|
%changelog
|
|
* Thu Apr 02 2026 Kyle Gospodnetich <me@kylegospodneti.ch>
|
|
- Initial package
|