diff --git a/.gitignore b/.gitignore index 17c2c9d..84de196 100644 --- a/.gitignore +++ b/.gitignore @@ -77,7 +77,7 @@ modules.order # # RPM spec file (make rpm-pkg) # -/*.spec +# /*.spec /rpmbuild/ # @@ -173,4 +173,4 @@ x509.genkey sphinx_*/ # Rust analyzer configuration -/rust-project.json \ No newline at end of file +/rust-project.json diff --git a/dkms.conf b/dkms.conf index 34dce82..5960c12 100644 --- a/dkms.conf +++ b/dkms.conf @@ -1,8 +1,8 @@ PACKAGE_NAME="universal-pidff" -PACKAGE_VERSION="0.0.12" +PACKAGE_VERSION="0.0.10" MAKE[0]="make KVERSION=$kernelver" CLEAN="make clean" -BUILT_MODULE_NAME[0]="hid-universal-pidff" -DEST_MODULE_NAME[0]="hid-universal-pidff" +BUILT_MODULE_NAME[0]="universal-pidff" +DEST_MODULE_NAME[0]="universal-pidff" DEST_MODULE_LOCATION[0]="/kernel/drivers/hid" AUTOINSTALL="yes" diff --git a/universal-pidff.spec b/universal-pidff.spec new file mode 100644 index 0000000..125776a --- /dev/null +++ b/universal-pidff.spec @@ -0,0 +1,45 @@ +Name: universal-pidff +Version: 0.0.10 +Release: 1%{?dist} +Summary: Universal FFB Driver for Moza/Cammus/VRS and more +License: GPLv2 +URL: https://github.com/JacKeTUs/universal-pidff +Source0: https://github.com/JacKeTUs/universal-pidff/archive/refs/tags/%{version}.tar.gz + +Requires: dkms + +%description +Universal Force Feedback (FFB) Driver for Moza, Cammus, VRS, and other devices. + +%global debug_package %{nil} + +%prep +%setup -n %{name}-%{version} + +%build +# empty build step for dkms + +%install +mkdir -p %{buildroot}/usr/src/%{name}-%{version} +cp -r . %{buildroot}/usr/src/%{name}-%{version} + +%files +%attr(0755,root,root) /usr/src/%{name}-%{version}/ + +%post +occurrences=/usr/sbin/dkms status | grep "%{name}" | grep "%{version}" | wc -l +if [ ! occurrences > 0 ]; +then + /usr/sbin/dkms add -m %{name} -v %{version} +fi +/usr/sbin/dkms build -m %{name} -v %{version} +/usr/sbin/dkms install -m %{name} -v %{version} +exit 0 + +%preun +/usr/sbin/dkms remove -m %{name} -v %{version} --all +exit 0 + +%changelog +* Tue Dec 17 2024 J.P. Zivalich - ${version}-1 +- Initial RPM release