upload pod file
[hband-tools.git] / admin-tools / Makefile
blob9c65ae2f7082a1e82e2276d021e99de89d64fbda
2 default:
3 false
4 .PHONY: default
7 define remove
8 @[ ! -e $(1) ] || rm -v $(1)
9 endef
12 /etc/profile.d/locale-validator.sh: locale-validator.sh
13 install $< $@
14 @echo remove $@ >> uninstall.sh
16 uninstall-locale-validator:
17 $(call remove,/etc/profile.d/locale-validator.sh)
18 .PHONY: uninstall-locale-validator
22 install-dmaster: /sbin/dmaster /sbin/dmaster-signal /sbin/dmaster-dump /usr/share/man/man8/dmaster.8.xz /usr/share/man/man8/dmaster-signal.8.xz /usr/share/man/man5/daemontab.5.xz
23 @echo "Don't forget to install /sbin/dmaster as a system service (eg. put in /etc/inittab)"
24 .PHONY: install-dmaster
26 /sbin/dmaster /sbin/dmaster-signal /sbin/dmaster-dump: /sbin/%: %
27 install $< $@
29 /usr/share/man/man8/dmaster.8.xz /usr/share/man/man8/dmaster-signal.8.xz: /usr/share/man/man8/%.8.xz: %
30 pod2man --name="$<" --section 8 --utf8 "$<" | xz > "$@.tmp" &&\
31 mv -f "$@.tmp" "$@"
33 /usr/share/man/man5/daemontab.5.xz: dmaster
34 pod2man --name=daemontab --section 5 --utf8 "$<" | xz > "$@.tmp" &&\
35 mv -f "$@.tmp" "$@"
38 uninstall-dmaster:
39 $(call remove,/sbin/dmaster)
40 $(call remove,/sbin/dmaster-signal)
41 $(call remove,/sbin/dmaster-dump)
42 $(call remove,/usr/share/man/man8/dmaster.8.xz)
43 $(call remove,/usr/share/man/man8/dmaster-signal.8.xz)
44 $(call remove,/usr/share/man/man5/daemontab.5.xz)
45 .PHONY: uninstall-dmaster
49 install-dhcpdiscover: depcheck-dhcpdiscover /sbin/dhcpdiscover
50 .PHONY: install-dhcpdiscover
51 /sbin/dhcpdiscover: dhcpdiscover
52 install $< $@
53 uninstall-dhcpdiscover:
54 $(call remove,/sbin/dhcpdiscover)
55 .PHONY: uninstall-dhcpdiscover
57 .PHONY: depcheck-dhcpdiscover
58 depcheck-dhcpdiscover:
59 python -c 'import scapy'
62 install-all: install-dmaster /etc/profile.d/locale-validator.sh install-dhcpdiscover
63 .PHONY: install-all
65 uninstall-all: uninstall-dmaster uninstall-locale-validator uninstall-dhcpdiscover
66 .PHONY: uninstall-all