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