From 89866a4f62c6563df93e0517cee32bd8208c5f12 Mon Sep 17 00:00:00 2001 From: Jan Date: Sun, 8 Dec 2024 22:10:17 +0100 Subject: [PATCH] feat: add new-lg4ff spec files (#50) --- akmods/new-lg4ff/new-lg4ff-kmod.spec | 51 ++++++++++++++++++++++++++++ akmods/new-lg4ff/new-lg4ff.spec | 36 ++++++++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 akmods/new-lg4ff/new-lg4ff-kmod.spec create mode 100644 akmods/new-lg4ff/new-lg4ff.spec diff --git a/akmods/new-lg4ff/new-lg4ff-kmod.spec b/akmods/new-lg4ff/new-lg4ff-kmod.spec new file mode 100644 index 0000000..805f952 --- /dev/null +++ b/akmods/new-lg4ff/new-lg4ff-kmod.spec @@ -0,0 +1,51 @@ +%global buildforkernels akmod +%global debug_package %{nil} + +%global prjname new-lg4ff + +Name: %{prjname}-kmod +Summary: Improved Linux module driver for Logitech driving wheels. +Version: 0.4.0 +Release: 1%{?dist} +License: GPL-2.0-only + +URL: https://github.com/berarma/new-lg4ff +Source0: %{url}/archive/%{version}/%{prjname}-%{version}.tar.gz + +BuildRequires: kmodtool + +# kmodtool does its magic here +%{expand:%(kmodtool --target %{_target_cpu} --kmodname %{prjname} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) } + +%description +Improved Linux module driver for Logitech driving wheels. + +This package contains the kmod module for %{prjname}. + +%prep +# error out if there was something wrong with kmodtool +%{?kmodtool_check} + +# print kmodtool output for debugging purposes: +kmodtool --target %{_target_cpu} --kmodname %{prjname} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null + +%autosetup -c %{name}-%{version} + +for kernel_version in %{?kernel_versions} ; do + cp -a %{prjname}-%{version} _kmod_build_${kernel_version%%___*} +done + + +%build +for kernel_version in %{?kernel_versions} ; do + make V=1 %{?_smp_mflags} -C ${kernel_version##*___} M=${PWD}/_kmod_build_${kernel_version%%___*} VERSION=v%{version} modules +done + +%install +for kernel_version in %{?kernel_versions}; do + mkdir -p %{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ + install -D -m 755 _kmod_build_${kernel_version%%___*}/*.ko %{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ +done +%{?akmod_install} + +%changelog diff --git a/akmods/new-lg4ff/new-lg4ff.spec b/akmods/new-lg4ff/new-lg4ff.spec new file mode 100644 index 0000000..b9b36fd --- /dev/null +++ b/akmods/new-lg4ff/new-lg4ff.spec @@ -0,0 +1,36 @@ +%global buildforkernels akmod +%global debug_package %{nil} + +Name: new-lg4ff +Version: 0.4.0 +Release: 1%{?dist} +Summary: Experimental Logitech force feedback module for Linux +License: GPL-2.0-only + +URL: https://github.com/berarma/new-lg4ff +Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz + +Provides: %{name}-kmod-common = %{version}-%{release} +Requires: %{name}-kmod >= %{version} + +%description +Improved Linux module driver for Logitech driving wheels. + +%prep +%autosetup + +for kernel_version in %{?kernel_versions} ; do + cp -a %{name}-%{version} _kmod_build_${kernel_version%%___*} +done + +%build +# Nothing to build + +%install +# Nothing to install + +%files +%doc README.md +%license LICENSE + +%changelog