diff options
Diffstat (limited to 'app-misc/lirc/files/lirc_wb677/Makefile')
-rw-r--r-- | app-misc/lirc/files/lirc_wb677/Makefile | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/app-misc/lirc/files/lirc_wb677/Makefile b/app-misc/lirc/files/lirc_wb677/Makefile new file mode 100644 index 0000000..860fa04 --- /dev/null +++ b/app-misc/lirc/files/lirc_wb677/Makefile @@ -0,0 +1,45 @@ +#!/bin/bash + + LIRC_DIR := /usr/src/lirc-0.8.6/ + + obj-m += lirc_wb677.o + + lirc_wb677-objs := lirc_wb677_main.o lirc_wb677_mouse_kbd.o + + KSRC ?= /lib/modules/$(shell uname -r)/build + + PWD := $(shell pwd) + +modules: + echo KERNELDIR=$(KSRC) + $(MAKE) -C $(KSRC) -I $(LIRC_DIR) M=$(PWD) modules + + +install: + # Following line edited but then commented out because it stops script if lircd not already running: + # /etc/init.d/lircd stop + rmmod lirc_wb677 || echo "lirc_wb677.ko is not executing" + file="lirc_wb677.ko"; \ + dir="/lib/modules/$(shell uname -r)/misc"; \ + if test -d "$$dir"; then echo ""; else mkdir -p $$dir; fi; \ + cp -vf *.ko $$dir + depmod -a + # Following line edited but then commented out because /usr/share/lirc/lirc.hwdb does not exist on my PC: + # patch -p0 /usr/share/lirc/lirc.hwdb < /usr/src/lirc_wb677-1.0.4/lirc_nct667x-lirc0.8.6.patch + @echo "" + @echo "Hint: You can configure lirc." + @echo " And start lirc by executing \"/etc/init.d/lircd start\"" + +uninstall: + # Following line edited but then commented out because it stops script if lircd not already running: + # /etc/init.d/lircd stop + ( rmmod lirc_wb677 ) || echo "lirc_wb677.ko is not executing" + dir="/lib/modules/$(shell uname -r)/misc"; \ + if test -d "$$dir"; then rm -R $$dir; fi; + depmod -a + # Following line edited but then commented out because /usr/share/lirc/lirc.hwdb does not exist on my PC: + # patch -R -p0 /usr/share/lirc/lirc.hwdb < /usr/src/lirc_wb677-1.0.4/lirc_nct667x-lirc0.8.6.patch + +clean: + rm -rf *.o *.ko *.mod.c Module.symvers .tmp_versions .*.cmd + |