Update debian/rules; Add post{inst,rm}; Bump Standards-Version; Add adduser to Depend...
[debian/uanytun.git] / debian / rules
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3 # Sample debian/rules that uses debhelper.
4 # This file was originally written by Joey Hess and Craig Small.
5 # As a special exception, when this file is copied by dh-make into a
6 # dh-make output file, you may use that output file without restriction.
7 # This special exception was added by Craig Small in version 0.37 of dh-make.
8
9 # Uncomment this to turn on verbose mode.
10 #export DH_VERBOSE=1
11
12 configure: configure-stamp
13 configure-stamp:
14         dh_testdir
15         cd src && ./configure && cd ..
16         touch configure-stamp
17
18 build: build-stamp
19
20 build-stamp: configure-stamp
21         dh_testdir
22
23         cd src && $(MAKE) && cd ..
24         cd doc && $(MAKE) && cd ..
25
26         touch $@
27
28 clean:
29         dh_testdir
30         dh_testroot
31         rm -f build-stamp configure-stamp
32
33         cd src && $(MAKE) clean && cd ..
34         cd doc && $(MAKE) clean && cd ..
35
36         # drop leftover file:
37         rm -f src/tun.c
38
39         dh_clean
40
41 install: build
42         dh_testdir
43         dh_testroot
44         dh_installdirs etc/init.d usr/sbin usr/share/uanytun/examples/config
45
46         # Add here commands to install the package into debian/uanytun.
47         install -m 755 src/uanytun        debian/uanytun/usr/sbin/
48         cp -a          etc/uanytun/*      debian/uanytun/usr/share/uanytun/examples/config/
49         install        etc/init.d/uanytun debian/uanytun/etc/init.d/
50
51 # Build architecture-independent files here.
52 binary-indep: install
53 # We have nothing to do by default.
54
55 # Build architecture-dependent files here.
56 binary-arch: install
57         dh_testdir
58         dh_testroot
59         dh_installchangelogs ChangeLog
60         dh_installdocs
61         dh_installexamples
62         dh_installinit
63         dh_installman doc/uanytun.8
64         dh_link
65         dh_strip
66         dh_compress
67         dh_fixperms
68         dh_installdeb
69         dh_shlibdeps
70         dh_gencontrol
71         dh_md5sums
72         dh_builddeb
73
74 binary: binary-indep binary-arch
75 .PHONY: build clean binary-indep binary-arch binary install configure