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