Code

rules: Explicitly set sysconfigdir when running configure.
[pkg-collection4.git] / debian / rules
1 #! /usr/bin/make -f
2 # debian/rules for collection4
3 #
4 # Written by Sebastian Harl <tokkee@debian.org>
6 # Uncomment this to turn on verbose mode.
7 #export DH_VERBOSE=1
9 # These are used for cross-compiling and for saving the configure script
10 # from having to guess our platform (since we know it already)
11 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
12 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
14 CFLAGS = -Wall -g
16 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
17         CFLAGS += -O0
18 else
19         CFLAGS += -O2
20 endif
22 config.status: configure
23         dh_testdir
24         
25         ./configure \
26                         --host=$(DEB_HOST_GNU_TYPE) \
27                         --build=$(DEB_BUILD_GNU_TYPE) \
28                         --prefix=/usr \
29                         --sysconfdir=/etc \
30                         --mandir=\$${prefix}/share/man \
31                         CFLAGS="$(CFLAGS)"
33 build: build-stamp
35 build-stamp: config.status
36         dh_testdir
37         
38         $(MAKE)
39         
40         touch build-stamp
42 clean:
43         dh_testdir
44         dh_testroot
45         rm -f build-stamp
46         
47         [ ! -f Makefile ] || $(MAKE) distclean
48         
49         dh_clean
51 install: build
52         dh_testdir
53         dh_testroot
54         dh_prep
55         dh_installdirs
56         
57         $(MAKE) install DESTDIR=$(CURDIR)/debian/collection4
59 binary-indep: build install
60         # nothing to do here
62 binary-arch: build install
63         dh_testdir
64         dh_testroot
65         dh_installchangelogs
66         dh_installdocs -a -A AUTHORS README
67         dh_link -a
68         dh_strip -a
69         dh_compress -a
70         dh_fixperms -a
71         dh_installdeb -a
72         dh_shlibdeps -a
73         dh_gencontrol -a
74         dh_md5sums -a
75         dh_builddeb -a
77 binary: binary-indep binary-arch
78 .PHONY: build clean binary-indep binary-arch binary install