Commit | Line | Data |
---|---|---|
ef4a1ab7 | 1 | #! /usr/bin/make -f |
2 | ||
6b6ad670 | 3 | CDBS = /usr/share/cdbs/1 |
ef4a1ab7 | 4 | |
6b6ad670 MW |
5 | include $(CDBS)/rules/debhelper.mk |
6 | include $(CDBS)/class/autotools.mk | |
ef4a1ab7 | 7 | |
6b6ad670 MW |
8 | ###-------------------------------------------------------------------------- |
9 | ### General settings. | |
ef4a1ab7 | 10 | |
6b6ad670 | 11 | DEB_BUILDDIR = $(CURDIR)/build |
1c5f4539 | 12 | DEB_MAKE_CHECK_TARGET = check |
ef4a1ab7 | 13 | |
6b6ad670 MW |
14 | ###-------------------------------------------------------------------------- |
15 | ### Correct configuration. | |
ef4a1ab7 | 16 | |
6b6ad670 MW |
17 | ## This will need changing on other kernels. |
18 | default_tunnel = linux | |
19 | ||
20 | ## Configuration arguments. | |
21 | DEB_CONFIGURE_EXTRA_FLAGS = \ | |
22 | --with-tunnel="$(default_tunnel) slip" \ | |
23 | --with-configdir="/etc/tripe" \ | |
24 | --with-socketdir="/var/run" \ | |
1a372224 | 25 | --with-logfile="/var/log/tripe/tripe.log" \ |
6b6ad670 | 26 | --with-pidfile="/var/run/tripectl.pid" \ |
e0603e88 | 27 | --with-initconfig="/etc/default/tripe" |
6b6ad670 | 28 | |
2fa80010 MW |
29 | ###-------------------------------------------------------------------------- |
30 | ### Python. | |
31 | ||
32 | binary-install/python-tripe:: | |
33 | dh_pycentral -ppython-tripe | |
34 | ||
6b6ad670 MW |
35 | ###-------------------------------------------------------------------------- |
36 | ### Install the startup scripts. | |
37 | ||
38 | install/tripe:: | |
39 | cp $(DEB_BUILDDIR)/init/tripe-init debian/tripe.init | |
a5c4dd60 MW |
40 | sed 's/^#\(user\|group\)/\1/' \ |
41 | $(DEB_SRCDIR)/init/tripe.conf >debian/tripe.default | |
251351d8 | 42 | mkdir -p debian/tripe/usr/share/doc/tripe/examples |
b147e573 | 43 | for i in tripe-ipif ipif-peers tripe-upstart greet knock; do \ |
251351d8 MW |
44 | cp $(DEB_BUILDDIR)/contrib/$$i \ |
45 | debian/tripe/usr/share/doc/tripe/examples; \ | |
46 | done | |
6b6ad670 MW |
47 | |
48 | cleanbuilddir:: | |
49 | rm -f debian/tripe.init debian/tripe.default | |
50 | ||
a62f8e8a MW |
51 | ###-------------------------------------------------------------------------- |
52 | ### Install configuration files. | |
53 | ||
54 | install/tripe-peer-services:: | |
55 | install -m644 $(DEB_SRCDIR)/peerdb/peers.in \ | |
56 | debian/tripe-peer-services/etc/tripe/peers.d/10base | |
57 | ||
6b6ad670 MW |
58 | ###-------------------------------------------------------------------------- |
59 | ### Wireshark plugin. | |
60 | ||
61 | ## Grab the version we built against, so we can put it in the dependencies. | |
62 | install/tripe-wireshark:: | |
b2a72eca | 63 | dpkg --status wireshark-common | \ |
28461f0e MW |
64 | sed -n 's/^Version: */tripe:Wireshark-Version=/p' \ |
65 | >> debian/tripe-wireshark.substvars | |
ef4a1ab7 | 66 | |
6b6ad670 MW |
67 | ## Don't track dependencies for the plugin. We have it covered already. |
68 | DEB_DH_SHLIBDEPS_ARGS_tripe-wireshark += -Xwireshark/plugins | |
ef4a1ab7 | 69 | |
6b6ad670 | 70 | ###----- That's all, folks -------------------------------------------------- |