chiark / gitweb /
Build system: debian/rules: Provide build-arch and build-indep targets.
[secnet.git] / debian / rules
1 #!/usr/bin/make -f
2 # Sample debian/rules that uses debhelper.
3 # This file is public domain software, originally written by Joey Hess. 
4 # Modified for secnet by Stephen Early <steve@greenend.org.uk>
5
6 # Uncomment this to turn on verbose mode.
7 #export DH_VERBOSE=1
8
9 #  This file is Free Software.  It has been incorporated into, and
10 #  extensively modified, for secnet.
11 #
12 #  Copyright 2001      Joey Hess
13 #  Copyright 2011-2014 Ian Jackson
14 #
15 #  You may redistribute this file (and the other source files in the
16 #  debian/ subdirectory) freely - the copyrightholders declare that
17 #  they wish these files to be in the public domain.
18 #
19 #  You may redistribute secnet as a whole and/or modify it under the
20 #  terms of the GNU General Public License as published by the Free
21 #  Software Foundation; either version 3, or (at your option) any
22 #  later version.
23 #
24 #  This software is distributed in the hope that it will be useful,
25 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
26 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
27 #  GNU General Public License for more details.
28 #
29 #  You should have received a copy of the GNU General Public License
30 #  along with this software; if not, see
31 #  https://www.gnu.org/licenses/gpl.html.
32
33 export EXTRA_CFLAGS= $(shell dpkg-buildflags --get CPPFLAGS) \
34                      $(shell dpkg-buildflags --get CFLAGS)
35 export EXTRA_LDFLAGS=$(shell dpkg-buildflags --get LDFLAGS)
36
37 build build-arch: build-stamp
38 build-stamp:
39         dh_testdir
40
41         # Add here commands to compile the package.
42         ./configure --prefix=/usr --sysconfdir=/etc && $(MAKE)
43
44         touch build-stamp
45
46 clean:
47         dh_testdir
48         dh_testroot
49         rm -f build-stamp
50
51         # Add here commands to clean up after the build process.
52         -$(MAKE) realclean
53
54         dh_clean
55
56 install: build
57         dh_testdir
58         dh_testroot
59         dh_clean -k
60         dh_installdirs
61
62         # Add here commands to install the package into debian/<packagename>
63         $(MAKE) DESTDIR=`pwd`/debian/`dh_listpackages` install
64
65 # Build architecture-independent files here.
66 build-indep binary-indep: build install
67 # We have nothing to do by default.
68
69 # Build architecture-dependent files here.
70 binary-arch: build install
71         dh_testdir
72         dh_testroot
73 #       dh_installdebconf       
74         dh_installdocs INSTALL README NOTES TODO NEWS BUGS CREDITS
75         dh_installexamples example.conf
76 #       dh_installmenu
77 #       dh_installlogrotate
78 #       dh_installemacsen
79 #       dh_installpam
80 #       dh_installmime
81         dh_installinit
82 #       dh_installcron
83         dh_installman
84 #       dh_installinfo
85         dh_installchangelogs
86         dh_link
87         dh_strip
88         dh_compress
89         dh_fixperms
90 #       dh_makeshlibs
91         dh_installdeb
92 #       dh_perl
93         dh_shlibdeps
94         dh_gencontrol
95         dh_md5sums
96         dh_builddeb
97
98 binary: binary-indep binary-arch
99 .PHONY: build clean binary-indep binary-arch binary install