Commit | Line | Data |
---|---|---|
ef4a1ab7 | 1 | #! /usr/bin/make -f |
2 | ||
e01eeb5e | 3 | DH_OPTIONS = --parallel -Bdebian/build |
ef4a1ab7 | 4 | |
6b6ad670 | 5 | ###-------------------------------------------------------------------------- |
e01eeb5e | 6 | ### Configuration. |
ef4a1ab7 | 7 | |
e01eeb5e MW |
8 | OVERRIDES += auto_configure |
9 | dh_auto_configure_OPTS = -- | |
ef4a1ab7 | 10 | |
e01eeb5e MW |
11 | ## Various files and directories. |
12 | dh_auto_configure_OPTS += --libexecdir="\$${libdir}/tripe" | |
13 | dh_auto_configure_OPTS += --with-configdir="/etc/tripe" | |
14 | dh_auto_configure_OPTS += --with-socketdir="/var/run" | |
15 | dh_auto_configure_OPTS += --with-logfile="/var/log/tripe/tripe.log" | |
16 | dh_auto_configure_OPTS += --with-pidfile="/var/run/tripectl.pid" | |
6b6ad670 | 17 | |
e01eeb5e MW |
18 | ## The default tunnel. If we try to port this to other kernels, we'll need |
19 | ## something more complicated here. | |
20 | dh_auto_configure_OPTS += --with-tunnel="linux slip" | |
6b6ad670 | 21 | |
2fa80010 | 22 | ###-------------------------------------------------------------------------- |
e01eeb5e MW |
23 | ### The wireshark plugin. |
24 | ||
25 | OVERRIDES += gencontrol | |
26 | dh-gencontrol-hook:: | |
27 | dpkg --status wireshark-common | \ | |
28 | sed -n 's/^Version: */tripe:Wireshark-Version=/p' \ | |
29 | >> debian/tripe-wireshark.substvars | |
2fa80010 | 30 | |
e01eeb5e MW |
31 | OVERRIDES += shlibdeps |
32 | dh_shlibdeps_OPTS += -Xwireshark/plugins | |
2fa80010 | 33 | |
6b6ad670 | 34 | ###-------------------------------------------------------------------------- |
e01eeb5e | 35 | ### The startup script and related machinery. |
6b6ad670 | 36 | |
e01eeb5e MW |
37 | dh_auto_configure_OPTS += --with-initconfig="/etc/default/tripe" |
38 | ||
39 | OVERRIDES += installinit | |
40 | dh-installinit-hook:: | |
41 | cp debian/build/init/tripe-init debian/tripe.init | |
a5c4dd60 | 42 | sed 's/^#\(user\|group\)/\1/' \ |
e01eeb5e MW |
43 | init/tripe.conf >debian/tripe.default |
44 | ||
45 | OVERRIDES += clean | |
46 | dh-clean-hook:: | |
6b6ad670 MW |
47 | rm -f debian/tripe.init debian/tripe.default |
48 | ||
a62f8e8a | 49 | ###-------------------------------------------------------------------------- |
e01eeb5e MW |
50 | ### Other things. |
51 | ||
52 | ## Python stuff. | |
53 | DH_OPTIONS += --with=python-central | |
54 | OVERRIDES += pycentral | |
55 | dh_pycentral_OPTS += -ppython-tripe | |
56 | ||
57 | ## The peer database. | |
58 | OVERRIDES += install | |
59 | dh-install-hook:: | |
60 | mkdir -p debian/tripe-peer-services/etc/tripe/peers.d | |
61 | install -m644 peerdb/peers.in \ | |
a62f8e8a MW |
62 | debian/tripe-peer-services/etc/tripe/peers.d/10base |
63 | ||
6b6ad670 | 64 | ###-------------------------------------------------------------------------- |
e01eeb5e | 65 | ### Some machinery for overriding Debhelper in a structured way. |
6b6ad670 | 66 | |
e01eeb5e | 67 | %:; dh $@ $(DH_OPTIONS) |
ef4a1ab7 | 68 | |
e01eeb5e MW |
69 | $(foreach o, $(sort $(OVERRIDES)), dh-$o-hook)::; @: |
70 | $(foreach o, $(sort $(OVERRIDES)), override_dh_$o): override_dh_%: dh-%-hook | |
71 | dh_$* $(addprefix -O, $(DH_OPTIONS)) $(dh_$*_OPTS) | |
ef4a1ab7 | 72 | |
6b6ad670 | 73 | ###----- That's all, folks -------------------------------------------------- |