Correct PPTP server firewall rules chain.
[tomato/davidwu.git] / release / src / router / usbmodeswitch / data / Makefile
blob4186ad8bec90919abf39c4eea2eb131878e31ef8
1 PROG = usb-modeswitch-data
2 VERS = 20130807
3 RM = /bin/rm -f
4 PREFIX = $(DESTDIR)/usr
5 ETCDIR = $(DESTDIR)/etc
6 RULESDIR = $(DESTDIR)/lib/udev/rules.d
9 .PHONY: clean
11 all: 40-usb_modeswitch.rules
13 clean:
14 $(RM) 40-usb_modeswitch.rules
16 install: all files-install db-install rules-reload
18 install-packed: files-install db-install-packed rules-reload
20 files-install:
21 install -d $(PREFIX)/share/usb_modeswitch
22 install -d $(ETCDIR)/usb_modeswitch.d
23 install -D --mode=644 40-usb_modeswitch.rules $(RULESDIR)/40-usb_modeswitch.rules
25 40-usb_modeswitch.rules:
26 ./gen-rules.tcl
28 db-install: files-install
29 install --mode=644 -t $(PREFIX)/share/usb_modeswitch ./usb_modeswitch.d/*
31 db-install-packed:
32 @# Create a compressed tar without gzip timestamp, so tar.gz
33 @# differs only if content is different
34 cd ./usb_modeswitch.d; tar -cf ../configPack.tar *
35 gzip -f9n ./configPack.tar
36 install --mode=644 -t $(PREFIX)/share/usb_modeswitch ./configPack.tar.gz
37 rm -f ./configPack.tar.gz
39 rules-reload:
40 @if [ -f $(ETCDIR)/issue ]; then \
41 UDEVADM=`which udevadm 2>/dev/null`; \
42 if [ "x$$UDEVADM" != "x" ]; then \
43 UDEVADM_VER=`$$UDEVADM -V 2>/dev/null`; \
44 if [ -z $$UDEVADM_VER ]; then \
45 UDEVADM_VER=`$$UDEVADM --version 2>/dev/null`; \
46 fi; \
47 if [ $$UDEVADM_VER -gt 127 ]; then \
48 $$UDEVADM control --reload-rules; \
49 else \
50 $$UDEVADM control --reload_rules; \
51 fi \
52 elif [ `which udevcontrol 2>/dev/null` ]; then \
53 `which udevcontrol` reload_rules; \
54 fi \
57 uninstall: files-uninstall rules-reload
59 files-uninstall:
60 $(RM) $(RULESDIR)/40-usb_modeswitch.rules
61 $(RM) -R $(PREFIX)/share/usb_modeswitch
63 .PHONY: clean install uninstall