1 #! /usr/bin/make -f
2 # debian/rules for collection4
3 #
4 # Written by Sebastian Harl <tokkee@debian.org>
6 include /usr/share/quilt/quilt.make
8 # Uncomment this to turn on verbose mode.
9 #export DH_VERBOSE=1
11 # These are used for cross-compiling and for saving the configure script
12 # from having to guess our platform (since we know it already)
13 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
14 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
16 CFLAGS = -Wall -g -UCONFIGFILE -DCONFIGFILE='\"/etc/collection4/collection.conf\"'
18 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
19 CFLAGS += -O0
20 else
21 CFLAGS += -O2
22 endif
24 config.status: configure
25 dh_testdir
27 ./configure \
28 --host=$(DEB_HOST_GNU_TYPE) \
29 --build=$(DEB_BUILD_GNU_TYPE) \
30 --prefix=/usr \
31 --sysconfdir=/etc \
32 --mandir=\$${prefix}/share/man \
33 CFLAGS="$(CFLAGS)" LDFLAGS="-lm"
35 build: build-stamp
37 build-stamp: $(QUILT_STAMPFN) config.status
38 dh_testdir
40 $(MAKE)
42 touch build-stamp
44 clean: unpatch
45 dh_testdir
46 dh_testroot
47 rm -f build-stamp
49 [ ! -f Makefile ] || $(MAKE) distclean
51 dh_clean
52 debconf-updatepo
54 install: build
55 dh_testdir
56 dh_testroot
57 dh_prep
58 dh_installdirs
60 $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
62 dh_install --sourcedir=debian/tmp --fail-missing
64 binary-indep: build install
65 # nothing to do here
67 binary-arch: build install
68 dh_testdir
69 dh_testroot
70 dh_installchangelogs
71 dh_installdocs -a -A AUTHORS README
72 dh_installdebconf -a
73 dh_link -a
74 dh_strip -a
75 dh_compress -a
76 dh_fixperms -a
77 dh_installdeb -a
78 dh_shlibdeps -a
79 dh_gencontrol -a
80 dh_md5sums -a
81 dh_builddeb -a
83 binary: binary-indep binary-arch
84 .PHONY: build clean binary-indep binary-arch binary install