chiark / gitweb /
server/admin.c: Remove spurious `ping' in usage message.
[tripe] / debian / rules
CommitLineData
ef4a1ab7 1#! /usr/bin/make -f
2
a899c529 3DH_OPTIONS = --parallel --without=autoreconf -Bdebian/build
ef4a1ab7 4
6b6ad670 5###--------------------------------------------------------------------------
e01eeb5e 6### Configuration.
ef4a1ab7 7
e01eeb5e
MW
8OVERRIDES += auto_configure
9dh_auto_configure_OPTS = --
ef4a1ab7 10
e01eeb5e 11## Various files and directories.
03e37cbc 12dh_auto_configure_OPTS += --libdir="\$${prefix}/lib"
e01eeb5e
MW
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"
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.
21dh_auto_configure_OPTS += --with-tunnel="linux slip"
6b6ad670 22
2fa80010 23###--------------------------------------------------------------------------
e01eeb5e
MW
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
2fa80010 31
6b6ad670 32###--------------------------------------------------------------------------
e01eeb5e 33### The startup script and related machinery.
6b6ad670 34
e01eeb5e
MW
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
a5c4dd60 40 sed 's/^#\(user\|group\)/\1/' \
e01eeb5e
MW
41 init/tripe.conf >debian/tripe.default
42
43OVERRIDES += clean
44dh-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
51DH_OPTIONS += --with=python2
52OVERRIDES += python2
53dh_python2_OPTS += -ppython-tripe
e01eeb5e
MW
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 \
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 --------------------------------------------------