Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ modules.order
#
# RPM spec file (make rpm-pkg)
#
/*.spec
# /*.spec
/rpmbuild/

#
Expand Down Expand Up @@ -173,4 +173,4 @@ x509.genkey
sphinx_*/

# Rust analyzer configuration
/rust-project.json
/rust-project.json
6 changes: 3 additions & 3 deletions dkms.conf
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
PACKAGE_NAME="universal-pidff"
PACKAGE_VERSION="0.0.12"
PACKAGE_VERSION="0.0.10"

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably this shouldn't change in this PR

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. I'll flip it back

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"
Comment on lines +5 to +6

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain why module name is changed here?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll flip this back as well

DEST_MODULE_LOCATION[0]="/kernel/drivers/hid"
AUTOINSTALL="yes"
45 changes: 45 additions & 0 deletions universal-pidff.spec
Original file line number Diff line number Diff line change
@@ -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 <j.p.zivalich@gmail.com> - ${version}-1
- Initial RPM release