2b6b62bfbc713013726a7804f9ad3d94c37fe6e3
[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 --no-manpage --prefix=/usr --sysconfdir=/etc --examplesdir=/usr/share/uanytun/examples && 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
25         touch $@
26
27 clean:
28         dh_testdir
29         dh_testroot
30         rm -f build-stamp configure-stamp
31
32         # Add here commands to clean up after the build process.
33         $(MAKE) --directory=$(CURDIR)/src distclean
34         dh_clean
35
36 install: build
37         dh_testdir
38         dh_testroot
39         dh_installdirs
40
41         # Add here commands to install the package into debian/uanytun.
42         cd src && $(MAKE) DESTDIR=$(CURDIR)/debian/uanytun install && cd ..
43         # Fix unusual path:
44         mv debian/uanytun/usr/share/uanytun/examples/uanytun debian/uanytun/usr/share/uanytun/examples/config
45         echo "example configurations can be found at /usr/share/uanytun/examples/config" > debian/uanytun/etc/uanytun/README
46
47 # Build architecture-independent files here.
48 binary-indep: install
49 # We have nothing to do by default.
50
51 # Build architecture-dependent files here.
52 binary-arch: install
53         dh_testdir
54         dh_testroot
55         dh_installchangelogs ChangeLog
56         dh_installdocs
57         dh_installexamples
58         dh_installinit
59         dh_installman doc/uanytun.8
60         dh_link
61         dh_strip
62         dh_compress
63         mkdir -p debian/uanytun/usr/share/lintian/overrides/
64         cp -av debian/overrides debian/uanytun/usr/share/lintian/overrides/uanytun
65         dh_fixperms
66         find debian/uanytun -type f -name config     -exec chmod 600 {} \;
67         find debian/uanytun -type f -name post-up.sh -exec chmod 755 {} \;
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