feat: Add steering wheel kmod/dkms packages (#10991) (#10994)

* feat: Add hid-tmff2 kmod/dkms

* feat: Add new-lg4ff kmod/dkms

* feat: Add t150-driver kmod/dkms

* feat: Add hid-fanatecff kmod/dkms

* chore: Requested fixes

(cherry picked from commit 330cff7990)

Co-authored-by: Kyle Gospodnetich <me@kylegospodneti.ch>
This commit is contained in:
Raboneko
2026-04-02 21:48:18 -07:00
committed by GitHub
parent ecc0e8ce2f
commit 0ff5631e40
44 changed files with 973 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
project pkg {
rpm {
spec = "hid-fanatecff-kmod.spec"
}
labels {
mock = 1
updbranch = 1
}
}
@@ -0,0 +1,56 @@
%global commit f7bf935f0e534434d41e159d695f4a6c81e19fe9
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global commitdate 20260106
%global ver 0.2.2
%define buildforkernels akmod
%global debug_package %{nil}
%global modulename hid-fanatecff
Name: %{modulename}-kmod
Version: %{ver}^%{commitdate}git.%{shortcommit}
Release: 1%{?dist}
Summary: Fanatec force feedback kernel module
License: GPL-2.0-only
URL: https://github.com/gotzl/%{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
Driver to support Fanatec input devices, in particular force feedback of
various wheel-bases.
%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}
for kernel_version in %{?kernel_versions}; do
mkdir _kmod_build_${kernel_version%%___*}
cp -fr Kbuild Makefile *.c *.h _kmod_build_${kernel_version%%___*}/
done
%build
for kernel_version in %{?kernel_versions}; do
pushd _kmod_build_${kernel_version%%___*}/
%make_build -C "${kernel_version##*___}" M=$(pwd) modules
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
@@ -0,0 +1,12 @@
let c = sh("cat anda/system/hid-fanatecff/kmod-common/hid-fanatecff.spec | grep '%global commit ' | sed -E 's/.+commit //'", #{"stdout": "piped"}).ctx.stdout;
c.pop();
rpm.global("commit", c);
if rpm.changed() {
rpm.release();
let d = sh("cat anda/system/hid-fanatecff/kmod-common/hid-fanatecff.spec | grep '%global commitdate' | sed -E 's/.+commitdate //'", #{"stdout": "piped"}).ctx.stdout;
d.pop();
rpm.global("commitdate", d);
let v = sh("cat anda/system/hid-fanatecff/kmod-common/hid-fanatecff.spec | grep '%global ver' | sed -E 's/.+ver //'", #{"stdout": "piped"}).ctx.stdout;
v.pop();
rpm.global("ver", v);
}
+10
View File
@@ -0,0 +1,10 @@
project pkg {
arches = ["x86_64"]
rpm {
spec = "dkms-hid-fanatecff.spec"
}
labels {
mock = 1
updbranch = 1
}
}
@@ -0,0 +1,6 @@
PACKAGE_NAME="hid-fanatecff"
PACKAGE_VERSION="__VERSION_STRING"
AUTOINSTALL="yes"
BUILT_MODULE_NAME[0]="hid-fanatec"
DEST_MODULE_LOCATION[0]="/extra"
@@ -0,0 +1,58 @@
%global commit f7bf935f0e534434d41e159d695f4a6c81e19fe9
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global commitdate 20260106
%global ver 0.2.2
%global debug_package %{nil}
%global modulename hid-fanatecff
Name: dkms-%{modulename}
Version: %{ver}^%{commitdate}git.%{shortcommit}
Release: 1%{?dist}
Summary: Fanatec force feedback kernel module (DKMS)
License: GPL-2.0-only
URL: https://github.com/gotzl/%{modulename}
Source0: %{url}/archive/%{commit}.tar.gz#/%{modulename}-%{shortcommit}.tar.gz
Source1: %{name}.conf
Source2: no-weak-modules.conf
Requires: %{modulename} = %{?epoch:%{epoch}:}%{version}
Requires: dkms
Conflicts: akmod-%{modulename}
BuildArch: noarch
%description
Driver to support Fanatec input devices, in particular force feedback of
various wheel-bases.
%prep
%autosetup -p1 -n %{modulename}-%{commit}
cp -f %{SOURCE1} dkms.conf
sed -i -e 's/__VERSION_STRING/%{version}/g' dkms.conf
%build
%install
mkdir -p %{buildroot}%{_usrsrc}/%{modulename}-%{version}/
cp -fr Kbuild Makefile *.c *.h dkms.conf %{buildroot}%{_usrsrc}/%{modulename}-%{version}/
%if 0%{?fedora}
install -Dpm644 %{SOURCE2} %{buildroot}%{_sysconfdir}/dkms/%{modulename}.conf
%endif
%post
dkms add -m %{modulename} -v %{version} -q --rpm_safe_upgrade || :
dkms build -m %{modulename} -v %{version} -q || :
dkms install -m %{modulename} -v %{version} -q --force || :
%preun
dkms remove -m %{modulename} -v %{version} -q --all --rpm_safe_upgrade || :
%files
%{_usrsrc}/%{modulename}-%{version}
%if 0%{?fedora}
%{_sysconfdir}/dkms/%{modulename}.conf
%endif
%changelog
* Thu Apr 02 2026 Kyle Gospodnetich <me@kylegospodneti.ch>
- Initial package
@@ -0,0 +1 @@
NO_WEAK_MODULES="yes"
@@ -0,0 +1,12 @@
let c = sh("cat anda/system/hid-fanatecff/kmod-common/hid-fanatecff.spec | grep '%global commit ' | sed -E 's/.+commit //'", #{"stdout": "piped"}).ctx.stdout;
c.pop();
rpm.global("commit", c);
if rpm.changed() {
rpm.release();
let d = sh("cat anda/system/hid-fanatecff/kmod-common/hid-fanatecff.spec | grep '%global commitdate' | sed -E 's/.+commitdate //'", #{"stdout": "piped"}).ctx.stdout;
d.pop();
rpm.global("commitdate", d);
let v = sh("cat anda/system/hid-fanatecff/kmod-common/hid-fanatecff.spec | grep '%global ver' | sed -E 's/.+ver //'", #{"stdout": "piped"}).ctx.stdout;
v.pop();
rpm.global("ver", v);
}
@@ -0,0 +1,9 @@
project pkg {
arches = ["x86_64"]
rpm {
spec = "hid-fanatecff.spec"
}
labels {
nightly = 1
}
}
@@ -0,0 +1,52 @@
%global commit f7bf935f0e534434d41e159d695f4a6c81e19fe9
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global commitdate 20260106
%global ver 0.2.2
Name: hid-fanatecff
Version: %{ver}^%{commitdate}git.%{shortcommit}
Release: 1%{?dist}
Summary: Fanatec force feedback driver common files
License: GPL-2.0-only
URL: https://github.com/gotzl/%{name}
Source0: %{url}/archive/%{commit}.tar.gz#/%{name}-%{shortcommit}.tar.gz
Requires: (akmod-%{name} = %{?epoch:%{epoch}:}%{version} or dkms-%{name} = %{?epoch:%{epoch}:}%{version})
Provides: %{name}-kmod-common = %{?epoch:%{epoch}:}%{version}
BuildArch: noarch
%description
Driver to support Fanatec input devices, in particular force feedback of
various wheel-bases. This package contains common files shared between the
akmod and dkms variants.
%package akmod-modules
Summary: Modules for Akmods
Requires: akmod-%{name}
BuildArch: noarch
%description akmod-modules
Akmods modules for the akmod-%{name} package.
%prep
%autosetup -p1 -n %{name}-%{commit}
echo hid-fanatec > %{name}.conf
%install
# UDev rules:
install -Dpm644 fanatec.rules %{buildroot}%{_udevrulesdir}/99-fanatec.rules
# Akmods modules
install -Dm644 %{name}.conf -t %{buildroot}%{_modulesloaddir}
%files
%license LICENSE
%doc README.md
%{_udevrulesdir}/99-fanatec.rules
%files akmod-modules
%{_modulesloaddir}/%{name}.conf
%changelog
* Thu Apr 02 2026 Kyle Gospodnetich <me@kylegospodneti.ch>
- Initial package
@@ -0,0 +1,8 @@
rpm.global("commit", gh_commit("gotzl/hid-fanatecff"));
if rpm.changed() {
rpm.release();
rpm.global("commitdate", date());
let ver = gh("gotzl/hid-fanatecff");
ver.crop(0);
rpm.global("ver", ver);
}
+9
View File
@@ -0,0 +1,9 @@
project pkg {
rpm {
spec = "hid-tmff2-kmod.spec"
}
labels {
mock = 1
updbranch = 1
}
}
@@ -0,0 +1,68 @@
%global commit 8187920ed261c7024826f8204cc7bea45153a3da
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global commitdate 20260310
%global ver 0.83
%global tminit_commit 8c4547288a6c182ed4ff131e36f710f11a76c4a9
%global tminit_shortcommit %(c=%{tminit_commit}; echo ${c:0:7})
%define buildforkernels akmod
%global debug_package %{nil}
%global modulename hid-tmff2
Name: %{modulename}-kmod
Version: %{ver}^%{commitdate}git.%{shortcommit}
Release: 1%{?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
Source1: https://github.com/Kimplul/hid-tminit/archive/%{tminit_commit}.tar.gz#/hid-tminit-%{tminit_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}
# Populate the hid-tminit submodule
mkdir -p deps/hid-tminit
tar xf %{SOURCE1} --strip-components=1 -C deps/hid-tminit
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 -C "${kernel_version##*___}" M=$(pwd) modules
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}/
install -p -m 0755 _kmod_build_${kernel_version%%___*}/deps/hid-tminit/*.ko \
%{buildroot}/%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/
done
%{?akmod_install}
%changelog
* Thu Apr 02 2026 Kyle Gospodnetich <me@kylegospodneti.ch>
- Initial package
+15
View File
@@ -0,0 +1,15 @@
let c = sh("cat anda/system/hid-tmff2/kmod-common/hid-tmff2.spec | grep '%global commit ' | sed -E 's/.+commit //'", #{"stdout": "piped"}).ctx.stdout;
c.pop();
rpm.global("commit", c);
if rpm.changed() {
rpm.release();
let d = sh("cat anda/system/hid-tmff2/kmod-common/hid-tmff2.spec | grep '%global commitdate' | sed -E 's/.+commitdate //'", #{"stdout": "piped"}).ctx.stdout;
d.pop();
rpm.global("commitdate", d);
let v = sh("cat anda/system/hid-tmff2/kmod-common/hid-tmff2.spec | grep '%global ver' | sed -E 's/.+ver //'", #{"stdout": "piped"}).ctx.stdout;
v.pop();
rpm.global("ver", v);
let t = sh("cat anda/system/hid-tmff2/kmod-common/hid-tmff2.spec | grep '%global tminit_commit ' | sed -E 's/.+tminit_commit //'", #{"stdout": "piped"}).ctx.stdout;
t.pop();
rpm.global("tminit_commit", t);
}
+10
View File
@@ -0,0 +1,10 @@
project pkg {
arches = ["x86_64"]
rpm {
spec = "dkms-hid-tmff2.spec"
}
labels {
mock = 1
updbranch = 1
}
}
@@ -0,0 +1,13 @@
PACKAGE_NAME="hid-tmff2"
PACKAGE_VERSION="__VERSION_STRING"
AUTOINSTALL="yes"
MAKE[0]="'make' KDIR=\"$kernel_source_dir\""
CLEAN[0]=true
BUILT_MODULE_LOCATION[0]="deps/hid-tminit/"
BUILT_MODULE_NAME[0]="hid-tminit"
DEST_MODULE_LOCATION[0]="/extra"
BUILT_MODULE_NAME[1]="hid-tmff-new"
DEST_MODULE_LOCATION[1]="/extra"
@@ -0,0 +1,72 @@
%global commit 8187920ed261c7024826f8204cc7bea45153a3da
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global commitdate 20260310
%global ver 0.83
%global tminit_commit 8c4547288a6c182ed4ff131e36f710f11a76c4a9
%global tminit_shortcommit %(c=%{tminit_commit}; echo ${c:0:7})
%global debug_package %{nil}
%global modulename hid-tmff2
Name: dkms-%{modulename}
Version: %{ver}^%{commitdate}git.%{shortcommit}
Release: 1%{?dist}
Summary: Thrustmaster Force Feedback kernel module (DKMS)
License: GPL-2.0-only
URL: https://github.com/Kimplul/%{modulename}
Source0: %{url}/archive/%{commit}.tar.gz#/%{modulename}-%{shortcommit}.tar.gz
Source1: https://github.com/Kimplul/hid-tminit/archive/%{tminit_commit}.tar.gz#/hid-tminit-%{tminit_shortcommit}.tar.gz
Source2: %{name}.conf
Source3: no-weak-modules.conf
Requires: %{modulename} = %{?epoch:%{epoch}:}%{version}
Requires: dkms
Conflicts: akmod-%{modulename}
BuildArch: noarch
%description
Linux kernel module for Thrustmaster T300RS, T248 and (experimental) TX, T128,
T598, T-GT II and TS-XW wheels.
%prep
%autosetup -p1 -n %{modulename}-%{commit}
# Populate the hid-tminit submodule
mkdir -p deps/hid-tminit
tar xf %{SOURCE1} --strip-components=1 -C deps/hid-tminit
cp -f %{SOURCE2} dkms/dkms.conf
sed -i -e 's/__VERSION_STRING/%{version}/g' dkms/dkms.conf
%build
%install
# Create empty tree:
mkdir -p %{buildroot}%{_usrsrc}/%{modulename}-%{version}/
cp -fr Kbuild Makefile src deps %{buildroot}%{_usrsrc}/%{modulename}-%{version}/
install -Dpm644 dkms/dkms.conf %{buildroot}%{_usrsrc}/%{modulename}-%{version}/dkms.conf
%if 0%{?fedora}
# Do not enable weak modules support in Fedora (no kABI):
install -Dpm644 %{SOURCE3} %{buildroot}%{_sysconfdir}/dkms/%{modulename}.conf
%endif
%post
dkms add -m %{modulename} -v %{version} -q --rpm_safe_upgrade || :
# Rebuild and make available for the currently running kernel:
dkms build -m %{modulename} -v %{version} -q || :
dkms install -m %{modulename} -v %{version} -q --force || :
%preun
# Remove all versions from DKMS registry:
dkms remove -m %{modulename} -v %{version} -q --all --rpm_safe_upgrade || :
%files
%{_usrsrc}/%{modulename}-%{version}
%if 0%{?fedora}
%{_sysconfdir}/dkms/%{modulename}.conf
%endif
%changelog
* Thu Apr 02 2026 Kyle Gospodnetich <me@kylegospodneti.ch>
- Initial package
@@ -0,0 +1 @@
NO_WEAK_MODULES="yes"
+15
View File
@@ -0,0 +1,15 @@
let c = sh("cat anda/system/hid-tmff2/kmod-common/hid-tmff2.spec | grep '%global commit ' | sed -E 's/.+commit //'", #{"stdout": "piped"}).ctx.stdout;
c.pop();
rpm.global("commit", c);
if rpm.changed() {
rpm.release();
let d = sh("cat anda/system/hid-tmff2/kmod-common/hid-tmff2.spec | grep '%global commitdate' | sed -E 's/.+commitdate //'", #{"stdout": "piped"}).ctx.stdout;
d.pop();
rpm.global("commitdate", d);
let v = sh("cat anda/system/hid-tmff2/kmod-common/hid-tmff2.spec | grep '%global ver' | sed -E 's/.+ver //'", #{"stdout": "piped"}).ctx.stdout;
v.pop();
rpm.global("ver", v);
let t = sh("cat anda/system/hid-tmff2/kmod-common/hid-tmff2.spec | grep '%global tminit_commit ' | sed -E 's/.+tminit_commit //'", #{"stdout": "piped"}).ctx.stdout;
t.pop();
rpm.global("tminit_commit", t);
}
@@ -0,0 +1,9 @@
project pkg {
arches = ["x86_64"]
rpm {
spec = "hid-tmff2.spec"
}
labels {
nightly = 1
}
}
@@ -0,0 +1,58 @@
%global commit 8187920ed261c7024826f8204cc7bea45153a3da
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global commitdate 20260310
%global ver 0.83
%global tminit_commit 8c4547288a6c182ed4ff131e36f710f11a76c4a9
%global tminit_shortcommit %(c=%{tminit_commit}; echo ${c:0:7})
Name: hid-tmff2
Version: %{ver}^%{commitdate}git.%{shortcommit}
Release: 1%{?dist}
Summary: Thrustmaster Force Feedback driver common files
License: GPL-2.0-only
URL: https://github.com/Kimplul/%{name}
Source0: %{url}/archive/%{commit}.tar.gz#/%{name}-%{shortcommit}.tar.gz
Source1: https://github.com/Kimplul/hid-tminit/archive/%{tminit_commit}.tar.gz#/hid-tminit-%{tminit_shortcommit}.tar.gz
Requires: (akmod-%{name} = %{?epoch:%{epoch}:}%{version} or dkms-%{name} = %{?epoch:%{epoch}:}%{version})
Provides: %{name}-kmod-common = %{?epoch:%{epoch}:}%{version}
BuildArch: noarch
%description
Linux kernel module for Thrustmaster T300RS, T248 and (experimental) TX, T128,
T598, T-GT II and TS-XW wheels. This package contains common files shared
between the akmod and dkms variants.
%package akmod-modules
Summary: Modules for Akmods
Requires: akmod-%{name}
BuildArch: noarch
%description akmod-modules
Akmods modules for the akmod-%{name} package.
%prep
%autosetup -p1 -n %{name}-%{commit}
# Extract module names from Kbuild for modules-load.d
echo hid-tmff-new > %{name}.conf
echo hid-tminit >> %{name}.conf
%install
# UDev rules:
install -Dpm644 udev/99-thrustmaster.rules -t %{buildroot}%{_udevrulesdir}/
# Akmods modules
install -Dm644 %{name}.conf -t %{buildroot}%{_modulesloaddir}
%files
%license LICENSE
%doc README.md
%{_udevrulesdir}/99-thrustmaster.rules
%files akmod-modules
%{_modulesloaddir}/%{name}.conf
%changelog
* Thu Apr 02 2026 Kyle Gospodnetich <me@kylegospodneti.ch>
- Initial package
@@ -0,0 +1,11 @@
rpm.global("commit", gh_commit("Kimplul/hid-tmff2"));
if rpm.changed() {
rpm.release();
rpm.global("commitdate", date());
let ver = gh("Kimplul/hid-tmff2");
ver.crop(0);
rpm.global("ver", ver);
let tminit = gh_commit("Kimplul/hid-tminit");
rpm.global("tminit_commit", tminit);
}
+9
View File
@@ -0,0 +1,9 @@
project pkg {
rpm {
spec = "new-lg4ff-kmod.spec"
}
labels {
mock = 1
updbranch = 1
}
}
@@ -0,0 +1,55 @@
%global commit 2092db19f7b40854e0427a1b2e39eda9f8d0c3cd
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global commitdate 20250528
%global ver 0.5.0
%define buildforkernels akmod
%global debug_package %{nil}
%global modulename new-lg4ff
Name: %{modulename}-kmod
Version: %{ver}^%{commitdate}git.%{shortcommit}
Release: 1%{?dist}
Summary: Logitech force feedback kernel module
License: GPL-2.0-only
URL: https://github.com/berarma/%{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
Experimental Logitech force feedback module for Linux.
%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}
for kernel_version in %{?kernel_versions}; do
mkdir _kmod_build_${kernel_version%%___*}
cp -fr Kbuild Makefile *.c *.h usbhid _kmod_build_${kernel_version%%___*}/
done
%build
for kernel_version in %{?kernel_versions}; do
pushd _kmod_build_${kernel_version%%___*}/
%make_build -C "${kernel_version##*___}" M=$(pwd) modules
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
+12
View File
@@ -0,0 +1,12 @@
let c = sh("cat anda/system/new-lg4ff/kmod-common/new-lg4ff.spec | grep '%global commit ' | sed -E 's/.+commit //'", #{"stdout": "piped"}).ctx.stdout;
c.pop();
rpm.global("commit", c);
if rpm.changed() {
rpm.release();
let d = sh("cat anda/system/new-lg4ff/kmod-common/new-lg4ff.spec | grep '%global commitdate' | sed -E 's/.+commitdate //'", #{"stdout": "piped"}).ctx.stdout;
d.pop();
rpm.global("commitdate", d);
let v = sh("cat anda/system/new-lg4ff/kmod-common/new-lg4ff.spec | grep '%global ver' | sed -E 's/.+ver //'", #{"stdout": "piped"}).ctx.stdout;
v.pop();
rpm.global("ver", v);
}
+10
View File
@@ -0,0 +1,10 @@
project pkg {
arches = ["x86_64"]
rpm {
spec = "dkms-new-lg4ff.spec"
}
labels {
mock = 1
updbranch = 1
}
}
@@ -0,0 +1,10 @@
PACKAGE_NAME="new-lg4ff"
PACKAGE_VERSION="__VERSION_STRING"
AUTOINSTALL="yes"
MAKE[0]="'make' KVERSION=$kernelver"
CLEAN="make clean"
BUILT_MODULE_NAME[0]="hid-logitech-new"
DEST_MODULE_NAME[0]="hid-logitech"
DEST_MODULE_LOCATION[0]="/extra"
@@ -0,0 +1,57 @@
%global commit 2092db19f7b40854e0427a1b2e39eda9f8d0c3cd
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global commitdate 20250528
%global ver 0.5.0
%global debug_package %{nil}
%global modulename new-lg4ff
Name: dkms-%{modulename}
Version: %{ver}^%{commitdate}git.%{shortcommit}
Release: 1%{?dist}
Summary: Logitech force feedback kernel module (DKMS)
License: GPL-2.0-only
URL: https://github.com/berarma/%{modulename}
Source0: %{url}/archive/%{commit}.tar.gz#/%{modulename}-%{shortcommit}.tar.gz
Source1: %{name}.conf
Source2: no-weak-modules.conf
Requires: %{modulename} = %{?epoch:%{epoch}:}%{version}
Requires: dkms
Conflicts: akmod-%{modulename}
BuildArch: noarch
%description
Experimental Logitech force feedback module for Linux.
%prep
%autosetup -p1 -n %{modulename}-%{commit}
cp -f %{SOURCE1} dkms.conf
sed -i -e 's/__VERSION_STRING/%{version}/g' dkms.conf
%build
%install
mkdir -p %{buildroot}%{_usrsrc}/%{modulename}-%{version}/
cp -fr Kbuild Makefile *.c *.h usbhid dkms.conf %{buildroot}%{_usrsrc}/%{modulename}-%{version}/
%if 0%{?fedora}
install -Dpm644 %{SOURCE2} %{buildroot}%{_sysconfdir}/dkms/%{modulename}.conf
%endif
%post
dkms add -m %{modulename} -v %{version} -q --rpm_safe_upgrade || :
dkms build -m %{modulename} -v %{version} -q || :
dkms install -m %{modulename} -v %{version} -q --force || :
%preun
dkms remove -m %{modulename} -v %{version} -q --all --rpm_safe_upgrade || :
%files
%{_usrsrc}/%{modulename}-%{version}
%if 0%{?fedora}
%{_sysconfdir}/dkms/%{modulename}.conf
%endif
%changelog
* Thu Apr 02 2026 Kyle Gospodnetich <me@kylegospodneti.ch>
- Initial package
@@ -0,0 +1 @@
NO_WEAK_MODULES="yes"
+12
View File
@@ -0,0 +1,12 @@
let c = sh("cat anda/system/new-lg4ff/kmod-common/new-lg4ff.spec | grep '%global commit ' | sed -E 's/.+commit //'", #{"stdout": "piped"}).ctx.stdout;
c.pop();
rpm.global("commit", c);
if rpm.changed() {
rpm.release();
let d = sh("cat anda/system/new-lg4ff/kmod-common/new-lg4ff.spec | grep '%global commitdate' | sed -E 's/.+commitdate //'", #{"stdout": "piped"}).ctx.stdout;
d.pop();
rpm.global("commitdate", d);
let v = sh("cat anda/system/new-lg4ff/kmod-common/new-lg4ff.spec | grep '%global ver' | sed -E 's/.+ver //'", #{"stdout": "piped"}).ctx.stdout;
v.pop();
rpm.global("ver", v);
}
@@ -0,0 +1,9 @@
project pkg {
arches = ["x86_64"]
rpm {
spec = "new-lg4ff.spec"
}
labels {
nightly = 1
}
}
@@ -0,0 +1,47 @@
%global commit 2092db19f7b40854e0427a1b2e39eda9f8d0c3cd
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global commitdate 20250528
%global ver 0.5.0
Name: new-lg4ff
Version: %{ver}^%{commitdate}git.%{shortcommit}
Release: 1%{?dist}
Summary: Logitech force feedback driver common files
License: GPL-2.0-only
URL: https://github.com/berarma/%{name}
Source0: %{url}/archive/%{commit}.tar.gz#/%{name}-%{shortcommit}.tar.gz
Requires: (akmod-%{name} = %{?epoch:%{epoch}:}%{version} or dkms-%{name} = %{?epoch:%{epoch}:}%{version})
Provides: %{name}-kmod-common = %{?epoch:%{epoch}:}%{version}
BuildArch: noarch
%description
Experimental Logitech force feedback module for Linux. This package contains
common files shared between the akmod and dkms variants.
%package akmod-modules
Summary: Modules for Akmods
Requires: akmod-%{name}
BuildArch: noarch
%description akmod-modules
Akmods modules for the akmod-%{name} package.
%prep
%autosetup -p1 -n %{name}-%{commit}
echo hid-logitech-new > %{name}.conf
%install
# Akmods modules
install -Dm644 %{name}.conf -t %{buildroot}%{_modulesloaddir}
%files
%license LICENSE
%doc README.md
%files akmod-modules
%{_modulesloaddir}/%{name}.conf
%changelog
* Thu Apr 02 2026 Kyle Gospodnetich <me@kylegospodneti.ch>
- Initial package
@@ -0,0 +1,8 @@
rpm.global("commit", gh_commit("berarma/new-lg4ff"));
if rpm.changed() {
rpm.release();
rpm.global("commitdate", date());
let ver = gh("berarma/new-lg4ff");
ver.crop(1);
rpm.global("ver", ver);
}
+9
View File
@@ -0,0 +1,9 @@
project pkg {
rpm {
spec = "t150-driver-kmod.spec"
}
labels {
mock = 1
updbranch = 1
}
}
@@ -0,0 +1,55 @@
%global commit f7ecb30c65ee5f7870e921bc0a2354df8e1e8100
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global commitdate 20250225
%global ver 1.0
%define buildforkernels akmod
%global debug_package %{nil}
%global modulename t150-driver
Name: %{modulename}-kmod
Version: %{ver}^%{commitdate}git.%{shortcommit}
Release: 1%{?dist}
Summary: Thrustmaster T150 steering wheel kernel module
License: GPL-2.0-only
URL: https://github.com/scarburato/t150_driver
Source0: %{url}/archive/%{commit}.tar.gz#/t150_driver-%{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 driver for Thrustmaster T150 Steering Wheel USB.
%prep
%{?kmodtool_check}
kmodtool --target %{_target_cpu} --repo terrapkg.com --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null
%autosetup -p1 -n t150_driver-%{commit}
for kernel_version in %{?kernel_versions}; do
mkdir _kmod_build_${kernel_version%%___*}
cp -fr hid-t150/* _kmod_build_${kernel_version%%___*}/
done
%build
for kernel_version in %{?kernel_versions}; do
pushd _kmod_build_${kernel_version%%___*}/
%make_build -C "${kernel_version##*___}" M=$(pwd) modules
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
+12
View File
@@ -0,0 +1,12 @@
let c = sh("cat anda/system/t150-driver/kmod-common/t150-driver.spec | grep '%global commit ' | sed -E 's/.+commit //'", #{"stdout": "piped"}).ctx.stdout;
c.pop();
rpm.global("commit", c);
if rpm.changed() {
rpm.release();
let d = sh("cat anda/system/t150-driver/kmod-common/t150-driver.spec | grep '%global commitdate' | sed -E 's/.+commitdate //'", #{"stdout": "piped"}).ctx.stdout;
d.pop();
rpm.global("commitdate", d);
let v = sh("cat anda/system/t150-driver/kmod-common/t150-driver.spec | grep '%global ver' | sed -E 's/.+ver //'", #{"stdout": "piped"}).ctx.stdout;
v.pop();
rpm.global("ver", v);
}
+10
View File
@@ -0,0 +1,10 @@
project pkg {
arches = ["x86_64"]
rpm {
spec = "dkms-t150-driver.spec"
}
labels {
mock = 1
updbranch = 1
}
}
@@ -0,0 +1,10 @@
PACKAGE_NAME="t150-driver"
PACKAGE_VERSION="__VERSION_STRING"
AUTOINSTALL="yes"
MAKE="make KDIR=${kernel_source_dir} all"
CLEAN="make KDIR=${kernel_source_dir} clean"
BUILT_MODULE_NAME[0]="hid-t150"
BUILT_MODULE_LOCATION[0]="build/"
DEST_MODULE_LOCATION[0]="/extra"
@@ -0,0 +1,57 @@
%global commit f7ecb30c65ee5f7870e921bc0a2354df8e1e8100
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global commitdate 20250225
%global ver 1.0
%global debug_package %{nil}
%global modulename t150-driver
Name: dkms-%{modulename}
Version: %{ver}^%{commitdate}git.%{shortcommit}
Release: 1%{?dist}
Summary: Thrustmaster T150 steering wheel kernel module (DKMS)
License: GPL-2.0-only
URL: https://github.com/scarburato/t150_driver
Source0: %{url}/archive/%{commit}.tar.gz#/t150_driver-%{shortcommit}.tar.gz
Source1: %{name}.conf
Source2: no-weak-modules.conf
Requires: %{modulename} = %{?epoch:%{epoch}:}%{version}
Requires: dkms
Conflicts: akmod-%{modulename}
BuildArch: noarch
%description
Linux driver for Thrustmaster T150 Steering Wheel USB.
%prep
%autosetup -p1 -n t150_driver-%{commit}
cp -f %{SOURCE1} dkms.conf
sed -i -e 's/__VERSION_STRING/%{version}/g' dkms.conf
%build
%install
mkdir -p %{buildroot}%{_usrsrc}/%{modulename}-%{version}/
cp -fr hid-t150 dkms_make.mak dkms.conf %{buildroot}%{_usrsrc}/%{modulename}-%{version}/
%if 0%{?fedora}
install -Dpm644 %{SOURCE2} %{buildroot}%{_sysconfdir}/dkms/%{modulename}.conf
%endif
%post
dkms add -m %{modulename} -v %{version} -q --rpm_safe_upgrade || :
dkms build -m %{modulename} -v %{version} -q || :
dkms install -m %{modulename} -v %{version} -q --force || :
%preun
dkms remove -m %{modulename} -v %{version} -q --all --rpm_safe_upgrade || :
%files
%{_usrsrc}/%{modulename}-%{version}
%if 0%{?fedora}
%{_sysconfdir}/dkms/%{modulename}.conf
%endif
%changelog
* Thu Apr 02 2026 Kyle Gospodnetich <me@kylegospodneti.ch>
- Initial package
@@ -0,0 +1 @@
NO_WEAK_MODULES="yes"
+12
View File
@@ -0,0 +1,12 @@
let c = sh("cat anda/system/t150-driver/kmod-common/t150-driver.spec | grep '%global commit ' | sed -E 's/.+commit //'", #{"stdout": "piped"}).ctx.stdout;
c.pop();
rpm.global("commit", c);
if rpm.changed() {
rpm.release();
let d = sh("cat anda/system/t150-driver/kmod-common/t150-driver.spec | grep '%global commitdate' | sed -E 's/.+commitdate //'", #{"stdout": "piped"}).ctx.stdout;
d.pop();
rpm.global("commitdate", d);
let v = sh("cat anda/system/t150-driver/kmod-common/t150-driver.spec | grep '%global ver' | sed -E 's/.+ver //'", #{"stdout": "piped"}).ctx.stdout;
v.pop();
rpm.global("ver", v);
}
@@ -0,0 +1,9 @@
project pkg {
arches = ["x86_64"]
rpm {
spec = "t150-driver.spec"
}
labels {
nightly = 1
}
}
@@ -0,0 +1,46 @@
%global commit f7ecb30c65ee5f7870e921bc0a2354df8e1e8100
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global commitdate 20250225
%global ver 1.0
Name: t150-driver
Version: %{ver}^%{commitdate}git.%{shortcommit}
Release: 1%{?dist}
Summary: Thrustmaster T150 steering wheel driver common files
License: GPL-2.0-only
URL: https://github.com/scarburato/t150_driver
Source0: %{url}/archive/%{commit}.tar.gz#/t150_driver-%{shortcommit}.tar.gz
Requires: (akmod-%{name} = %{?epoch:%{epoch}:}%{version} or dkms-%{name} = %{?epoch:%{epoch}:}%{version})
Provides: %{name}-kmod-common = %{?epoch:%{epoch}:}%{version}
BuildArch: noarch
%description
Linux driver for Thrustmaster T150 Steering Wheel USB. This package contains
common files shared between the akmod and dkms variants.
%package akmod-modules
Summary: Modules for Akmods
Requires: akmod-%{name}
BuildArch: noarch
%description akmod-modules
Akmods modules for the akmod-%{name} package.
%prep
%autosetup -p1 -n t150_driver-%{commit}
echo hid-t150 > %{name}.conf
%install
install -Dm644 %{name}.conf -t %{buildroot}%{_modulesloaddir}
%files
%license LICENSE
%doc README.md
%files akmod-modules
%{_modulesloaddir}/%{name}.conf
%changelog
* Thu Apr 02 2026 Kyle Gospodnetich <me@kylegospodneti.ch>
- Initial package
@@ -0,0 +1,8 @@
rpm.global("commit", gh_commit("scarburato/t150_driver"));
if rpm.changed() {
rpm.release();
rpm.global("commitdate", date());
let ver = gh("scarburato/t150_driver");
ver.crop(0);
rpm.global("ver", ver);
}