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