chiark / gitweb /
Revert "debian/: Update for Debhelper 10."
[tripe] / debian / rules
1 #! /usr/bin/make -f
2
3 DH_OPTIONS               = --parallel -Bdebian/build
4
5 ###--------------------------------------------------------------------------
6 ### Configuration.
7
8 OVERRIDES               += auto_configure
9 dh_auto_configure_OPTS   = --
10
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"
17
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"
21
22 ###--------------------------------------------------------------------------
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
30
31 ###--------------------------------------------------------------------------
32 ### The startup script and related machinery.
33
34 dh_auto_configure_OPTS  += --with-initconfig="/etc/default/tripe"
35
36 OVERRIDES               += installinit
37 dh-installinit-hook::
38         cp debian/build/init/tripe-init debian/tripe.init
39         sed 's/^#\(user\|group\)/\1/' \
40                 init/tripe.conf >debian/tripe.default
41
42 OVERRIDES               += clean
43 dh-clean-hook::
44         rm -f debian/tripe.init debian/tripe.default
45
46 ###--------------------------------------------------------------------------
47 ### Other things.
48
49 ## Python stuff.
50 DH_OPTIONS              += --with=python-central
51 OVERRIDES               += pycentral
52 dh_pycentral_OPTS       += -ppython-tripe
53
54 ## The peer database.
55 OVERRIDES               += install
56 dh-install-hook::
57         mkdir -p debian/tripe-peer-services/etc/tripe/peers.d
58         install -m644 peerdb/peers.in \
59                 debian/tripe-peer-services/etc/tripe/peers.d/10base
60
61 ###--------------------------------------------------------------------------
62 ### Some machinery for overriding Debhelper in a structured way.
63
64 %:; dh $@ $(DH_OPTIONS)
65
66 $(foreach o, $(sort $(OVERRIDES)), dh-$o-hook)::; @:
67 $(foreach o, $(sort $(OVERRIDES)), override_dh_$o): override_dh_%: dh-%-hook
68         dh_$* $(addprefix -O, $(DH_OPTIONS)) $(dh_$*_OPTS)
69
70 ###----- That's all, folks --------------------------------------------------