Code

8bbe2d23bb3940e685f3258d01e949e6409be701
[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                         --mandir=\$${prefix}/share/man \
30                         CFLAGS="$(CFLAGS)"
32 build: build-stamp
34 build-stamp: config.status
35         dh_testdir
36         
37         $(MAKE)
38         
39         touch build-stamp
41 clean:
42         dh_testdir
43         dh_testroot
44         rm -f build-stamp
45         
46         [ ! -f Makefile ] || $(MAKE) distclean
47         
48         dh_clean
50 install: build
51         dh_testdir
52         dh_testroot
53         dh_prep
54         dh_installdirs
55         
56         $(MAKE) install DESTDIR=$(CURDIR)/debian/collection4
58 binary-indep: build install
59         # nothing to do here
61 binary-arch: build install
62         dh_testdir
63         dh_testroot
64         dh_installchangelogs
65         dh_installdocs -a -A AUTHORS README
66         dh_link -a
67         dh_strip -a
68         dh_compress -a
69         dh_fixperms -a
70         dh_installdeb -a
71         dh_shlibdeps -a
72         dh_gencontrol -a
73         dh_md5sums -a
74         dh_builddeb -a
76 binary: binary-indep binary-arch
77 .PHONY: build clean binary-indep binary-arch binary install