- Copy entire sample-config directory to /etc/tinc/example upon installing.
[tinc] / debian / rules
1 #!/usr/bin/make -f
2 # Sample debian/rules that uses debhelper.
3 # GNU copyright 1997 to 1999 by Joey Hess.
4
5 # Uncomment this to turn on verbose mode.
6 #export DH_VERBOSE=1
7
8 # This is the debhelper compatability version to use.
9 export DH_COMPAT=1
10
11 build: build-stamp
12 build-stamp:
13         dh_testdir
14
15 #       # If the Makefile.in.in file in po/ already contains DESTDIR support, skip the patching.
16         cd `pwd`/po ; ( \
17           if ! grep DESTDIR Makefile.in.in > /dev/null ; then \
18             patch -Ns -p0 < `pwd`/../debian/po-Makefile.in.in.diff || true ;\
19           fi ;\
20         )
21
22         env CFLAGS='-O2 -Wall' ./autogen.sh --prefix=/usr --mandir=\$${prefix}/share/man \
23                 --infodir=\$${prefix}/share/info --sysconfdir=/etc --localstatedir=/var
24
25         $(MAKE)
26
27         touch build-stamp
28
29 clean:
30         dh_testdir
31         dh_testroot
32         rm -f build-stamp
33
34         -$(MAKE) cvs-clean
35
36         dh_clean
37
38 install: build
39         dh_testdir
40         dh_testroot
41         dh_clean -k
42         dh_installdirs
43
44         $(MAKE) install DESTDIR=`pwd`/debian/tmp
45         mkdir -p `pwd`/debian/tmp/etc/tinc
46         cp -a doc/sample-config `pwd`/debian/tmp/etc/tinc/example
47         ln -s /usr/share/doc/tinc/README.Debian `pwd`/debian/tmp/etc/tinc/example/README
48
49
50 # Build architecture-independent files here.
51 binary-indep: build install
52 # We have nothing to do by default.
53
54 # Build architecture-dependent files here.
55 binary-arch: build install
56         dh_testdir
57         dh_testroot
58         dh_installdocs
59         dh_installexamples
60         dh_installinit
61         dh_installmanpages
62         dh_installmodules
63         dh_installinfo
64         dh_installchangelogs ChangeLog
65         dh_link
66         dh_strip
67         dh_compress
68         dh_fixperms
69         dh_installdeb
70         dh_perl
71         dh_shlibdeps
72         dh_gencontrol
73         dh_md5sums
74         dh_builddeb
75
76 binary: binary-indep binary-arch
77 .PHONY: build clean binary-indep binary-arch binary install