Skip to content

Commit e7b29bd

Browse files
committed
Add uninstallation support
1 parent 692a05c commit e7b29bd

2 files changed

Lines changed: 17 additions & 3 deletions

File tree

Makefile

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,23 @@ obj-m := hid-huion.o
33
else
44
KDIR := /lib/modules/$(shell uname -r)/build
55
PWD := $(shell pwd)
6+
UDEV_RULES := /lib/udev/rules.d/70-hid-rebind.rules
7+
DEPMOD_CONF := /etc/depmod.d/digimend.conf
8+
HID_REBIND := /sbin/hid-rebind
69
modules modules_install clean:
710
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) $@
811
conf_install:
9-
install -D -m 0644 digimend.conf /etc/depmod.d/digimend.conf
12+
install -D -m 0644 digimend.conf $(DEPMOD_CONF)
1013
modules_depmod: modules_install conf_install
1114
depmod -a
1215
udev_install:
13-
install hid-rebind /sbin
14-
install -m 0644 hid-rebind.rules /lib/udev/rules.d/70-hid-rebind.rules
16+
install hid-rebind $(HID_REBIND)
17+
install -m 0644 hid-rebind.rules $(UDEV_RULES)
1518
udevadm control --reload
1619
install: modules_depmod udev_install
20+
uninstall:
21+
rm -vf $(UDEV_RULES) $(HID_REBIND) $(DEPMOD_CONF) \
22+
/lib/modules/*/extra/hid-huion.ko
23+
udevadm control --reload
24+
depmod -a
1725
endif

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,9 @@ to execute `rmmod hid-huion`, and then disconnect and reconnect the tablet to
6666
make it work.
6767

6868
Alternatively, you can simply reboot the machine.
69+
70+
Uninstalling
71+
------------
72+
73+
To uninstall the package execute `make uninstall` in the package source
74+
directory.

0 commit comments

Comments
 (0)