chiark / gitweb /
Revert "debian/: Update for Debhelper 10."
[tripe] / debian / rules
CommitLineData
ef4a1ab7 1#! /usr/bin/make -f
2
82f7020e 3DH_OPTIONS = --parallel -Bdebian/build
ef4a1ab7 4
6b6ad670 5###--------------------------------------------------------------------------
e01eeb5e 6### Configuration.
ef4a1ab7 7
e01eeb5e
MW
8OVERRIDES += auto_configure
9dh_auto_configure_OPTS = --
ef4a1ab7 10
e01eeb5e
MW
11## Various files and directories.
12dh_auto_configure_OPTS += --libexecdir="\$${libdir}/tripe"
13dh_auto_configure_OPTS += --with-configdir="/etc/tripe"
14dh_auto_configure_OPTS += --with-socketdir="/var/run"
15dh_auto_configure_OPTS += --with-logfile="/var/log/tripe/tripe.log"
16dh_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.
20dh_auto_configure_OPTS += --with-tunnel="linux slip"
6b6ad670 21
2fa80010 22###--------------------------------------------------------------------------
e01eeb5e
MW
23### The wireshark plugin.
24
25OVERRIDES += gencontrol
26dh-gencontrol-hook::
27 dpkg --status wireshark-common | \
28 sed -n 's/^Version: */tripe:Wireshark-Version=/p' \
29 >> debian/tripe-wireshark.substvars
2fa80010 30
6b6ad670 31###--------------------------------------------------------------------------
e01eeb5e 32### The startup script and related machinery.
6b6ad670 33
e01eeb5e
MW
34dh_auto_configure_OPTS += --with-initconfig="/etc/default/tripe"
35
36OVERRIDES += installinit
37dh-installinit-hook::
38 cp debian/build/init/tripe-init debian/tripe.init
a5c4dd60 39 sed 's/^#\(user\|group\)/\1/' \
e01eeb5e
MW
40 init/tripe.conf >debian/tripe.default
41
42OVERRIDES += clean
43dh-clean-hook::
6b6ad670
MW
44 rm -f debian/tripe.init debian/tripe.default
45
a62f8e8a 46###--------------------------------------------------------------------------
e01eeb5e
MW
47### Other things.
48
49## Python stuff.
50DH_OPTIONS += --with=python-central
51OVERRIDES += pycentral
52dh_pycentral_OPTS += -ppython-tripe
53
54## The peer database.
55OVERRIDES += install
56dh-install-hook::
57 mkdir -p debian/tripe-peer-services/etc/tripe/peers.d
58 install -m644 peerdb/peers.in \
a62f8e8a
MW
59 debian/tripe-peer-services/etc/tripe/peers.d/10base
60
6b6ad670 61###--------------------------------------------------------------------------
e01eeb5e 62### Some machinery for overriding Debhelper in a structured way.
6b6ad670 63
82f7020e 64%:; dh $@ $(DH_OPTIONS)
ef4a1ab7 65
e01eeb5e
MW
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)
ef4a1ab7 69
6b6ad670 70###----- That's all, folks --------------------------------------------------