Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2 # See debhelper(7) (uncomment to enable)
3 # output every command that modifies files on the build system.
4 #export DH_VERBOSE = 1
5
6 include /usr/share/dpkg/architecture.mk
7
8 # see FEATURE AREAS in dpkg-buildflags(1)
9 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
10
11 # see ENVIRONMENT in dpkg-buildflags(1)
12 # package maintainers to append CFLAGS
13 #export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
14 # package maintainers to append LDFLAGS
15 #export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
16
17
18 configure: configure-stamp
19 configure-stamp:
20 dh_testdir
21 cd src && ./configure --no-manpage --prefix=/usr --sysconfdir=/etc --examplesdir=/usr/share/anytun/examples --cross-prefix=${DEB_HOST_GNU_TYPE}- && cd ..
22 touch configure-stamp
23
24 build: build-arch build-indep
25
26 build-arch: build-stamp
27 build-indep: build-stamp
28
29 build-stamp: configure-stamp
30 dh_testdir
31
32 cd src && $(MAKE) && cd ..
33
34 touch $@
35
36 clean:
37 dh_testdir
38 dh_testroot
39 rm -f build-stamp configure-stamp
40
41 # Add here commands to clean up after the build process.
42 $(MAKE) --directory=$(CURDIR)/src distclean
43 dh_clean
44
45 install: build
46 dh_testdir
47 dh_testroot
48 dh_installdirs
49
50 # Add here commands to install the package into debian/anytun.
51 cd src && $(MAKE) DESTDIR=$(CURDIR)/debian/anytun install && cd ..
52 # Fix unusual path:
53 mv debian/anytun/usr/share/anytun/examples/anytun debian/anytun/usr/share/anytun/examples/config
54 echo "example configurations can be found at /usr/share/anytun/examples/config" > debian/anytun/etc/anytun/README
55
56 # Build architecture-independent files here.
57 binary-indep: install
58 # We have nothing to do by default.
59
60 # Build architecture-dependent files here.
61 binary-arch: install
62 dh_testdir
63 dh_testroot
64 dh_installchangelogs ChangeLog
65 dh_installdocs
66 dh_installman doc/anytun.8 doc/anytun-config.8 doc/anytun-controld.8 doc/anytun-showtables.8
67 dh_installexamples
68 dh_installsystemd anytun.service
69 dh_installinit
70 dh_link
71 dh_strip
72 dh_compress
73 dh_lintian
74 dh_fixperms
75 find debian/anytun -type f -name config -exec chmod 600 {} \;
76 find debian/anytun -type f -name post-up.sh -exec chmod 755 {} \;
77 chmod 600 debian/anytun/usr/share/anytun/examples/config/server/conf.d/*
78 dh_installdeb
79 dh_shlibdeps
80 dh_gencontrol
81 dh_md5sums
82 dh_builddeb
83
84 binary: binary-indep binary-arch
85 .PHONY: build clean binary-indep binary-arch binary install configure