chiark / gitweb /
7b94252d663f088d43d950a8825d250a1222cd60
[tripe] / debian / rules
1 #! /usr/bin/make -f
2
3 export DH_COMPAT = 4
4
5 build:
6         rm -rf build deb-build
7         mkdir deb-build
8         cd deb-build; ../configure \
9                 --prefix=/usr --mandir=/usr/share/man \
10                 --with-tunnel="linux slip" \
11                 --with-configdir=/etc/tripe \
12                 --with-socketdir=/var/run \
13                 --with-logfile=/var/log/tripe.log \
14                 --with-pidfile=/var/run/tripectl.pid \
15                 --with-initconfig=/etc/default/tripe \
16                 --with-ethereal
17         make -C deb-build
18         touch build
19
20 clean:
21         dh_clean
22         rm -rf deb-build build
23
24 install: build
25         dh_clean
26         make -C deb-build install DESTDIR=`pwd`/debian/tripe
27         mkdir -p debian/tripe/etc/tripe/peers
28         mkdir -p debian/tripe/etc/default
29         mkdir -p debian/tripe/etc/init.d
30         cp deb-build/tripe-init debian/tripe/etc/init.d/tripe
31         chmod 755 debian/tripe/etc/init.d/tripe
32         cp tripe.conf debian/tripe/etc/default/tripe
33         mkdir -p debian/tripe-keys/usr/bin
34         mv debian/tripe/usr/bin/tripe-keys debian/tripe-keys/usr/bin
35         mkdir -p \
36           debian/tripe-keys/usr/share/man/man5 \
37           debian/tripe-keys/usr/share/man/man8
38         mv debian/tripe/usr/share/man/man5/tripe-keys.conf.5 \
39           debian/tripe-keys/usr/share/man/man5
40         mv debian/tripe/usr/share/man/man8/tripe-keys.8 \
41           debian/tripe-keys/usr/share/man/man8
42         mkdir -p debian/tripe-keys/usr/share/doc/tripe-keys/examples
43         cp tripe-keys.master \
44           debian/tripe-keys/usr/share/doc/tripe-keys/examples
45         mkdir -p debian/tripemon/usr/bin
46         mv debian/tripe/usr/bin/tripemon debian/tripemon/usr/bin
47         mkdir -p \
48           debian/tripemon/usr/share/man/man1
49         mv debian/tripe/usr/share/man/man1/tripemon.1 \
50           debian/tripemon/usr/share/man/man1
51         mkdir -p debian/pkstream/usr/bin
52         mv debian/tripe/usr/bin/pkstream debian/pkstream/usr/bin
53         mkdir -p debian/pkstream/usr/share/man/man1
54         mv debian/tripe/usr/share/man/man1/pkstream.1 \
55                 debian/pkstream/usr/share/man/man1
56         mkdir -p debian/tripe-ethereal/usr/lib
57         mv debian/tripe/usr/lib/ethereal debian/tripe-ethereal/usr/lib
58         rm -f debian/tripe-ethereal/usr/lib/ethereal/plugins/*/*.a
59         rmdir debian/tripe/usr/lib
60
61 binary-indep: install
62         dh_testdir -i
63         dh_testroot -i
64         dh_compress -i
65         dh_installdocs -i
66         dh_installlogrotate -i
67         dh_gencontrol -i
68         dh_fixperms -i
69         dh_installdeb -i
70         dh_md5sums -i
71         dh_builddeb -i
72
73 binary-arch: install
74         dpkg --status ethereal | \
75                 sed -n 's/^Version: */tripe:Ethereal-Version=/p' \
76                 >> debian/tripe-ethereal.substvars
77         dh_testdir -a
78         dh_testroot -a
79         dh_compress -a
80         dh_installdocs -a
81         dh_strip -a
82         dh_shlibdeps -a
83         dh_installlogrotate -a
84         dh_gencontrol -a
85         dh_fixperms -a
86         dh_installdeb -a
87         dh_md5sums -a
88         dh_builddeb -a
89
90 binary: binary-indep binary-arch
91
92 source:
93         rm -rf deb-build/*.tar.gz deb-build/=deb=
94         make -C deb-build dist
95         mkdir deb-build/=deb=
96         cd deb-build/=deb=; tar xvfz ../*.tar.gz
97         d=`pwd`; cd ..; dpkg-source -i -b $$d/deb-build/=deb=/*
98         rm -rf deb-build/=deb=
99
100 .PHONY: binary binary-arch binary-indep clean install source