512ff1cfa4a3437570902fdd573666b911e423b9
[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         # workarounds:
34         touch src/include.mk
35         rm -f src/tun.c
36
37         cd src && $(MAKE) clean && cd ..
38         cd doc && $(MAKE) clean && cd ..
39
40         dh_clean
41
42 install: build
43         dh_testdir
44         dh_testroot
45         dh_installdirs usr/sbin usr/share/uanytun/examples/config
46
47         # Add here commands to install the package into debian/uanytun.
48         install -m 755 src/uanytun debian/uanytun/usr/sbin/
49         cp -a etc/uanytun/*        debian/uanytun/usr/share/uanytun/examples/config/
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 etc/init.d/uanytun
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