Skip to content
This repository was archived by the owner on Aug 15, 2023. It is now read-only.

Commit ad5b74d

Browse files
Merge pull request #4 from coinworld/master
Add modprobe files for Debian/Redhat and edit post-install scripts, and enable service for RPM
2 parents 41b413b + cb2000b commit ad5b74d

File tree

5 files changed

+34
-1
lines changed

5 files changed

+34
-1
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
11
udevadm control --reload-rules
2+
if lsmod | grep hid_uclogic > /dev/null ; then
3+
rmmod hid_uclogic || true
4+
fi
5+
6+
if lsmod | grep wacom > /dev/null ; then
7+
rmmod wacom || true
8+
fi
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
blacklist hid_uclogic
2+
blacklist wacom
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
blacklist hid_uclogic
2+
blacklist wacom
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
enable opentabletdriver.service

Redhat/opentabletdriver.spec

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,25 +31,46 @@ rm -f %{_builddir}/LICENSE
3131
%build
3232

3333
%install
34+
mkdir -p %{buildroot}
3435
cp -r %{pkg_dir}/* %{buildroot}/
3536
rm %{buildroot}/LICENSE
3637

3738
cp %{pkg_dir}/LICENSE %{_builddir}
3839

40+
%pre
41+
%systemd_user_pre opentabletdriver.service
42+
3943
%post
4044
udevadm control --reload-rules
45+
%systemd_user_post opentabletdriver.service
46+
47+
if lsmod | grep hid_uclogic > /dev/null ; then
48+
rmmod hid_uclogic || true
49+
fi
50+
51+
if lsmod | grep wacom > /dev/null ; then
52+
rmmod wacom || true
53+
fi
54+
55+
%preun
56+
%systemd_user_preun opentabletdriver.service
57+
58+
%postun
59+
%systemd_user_postun opentabletdriver.service
4160

4261
%files
4362
%defattr(-,root,root)
4463
%license LICENSE
4564
%dir /usr/share/OpenTabletDriver
4665
/usr/share/OpenTabletDriver/*
4766
/usr/lib/udev/rules.d/99-opentabletdriver.rules
67+
/usr/lib/modprobe.d/99-opentabletdriver.conf
4868
/usr/share/pixmaps/otd.ico
4969
/usr/share/pixmaps/otd.png
5070
/usr/share/applications/OpenTabletDriver.desktop
5171
/usr/bin/opentabletdriver
5272
/usr/bin/otd
5373
/usr/lib/systemd/user/opentabletdriver.service
74+
/usr/lib/systemd/user-preset/50-opentabletdriver.preset
5475

55-
%changelog
76+
%changelog

0 commit comments

Comments
 (0)