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
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
38 $(MAKE)
40 touch build-stamp
42 clean:
43 dh_testdir
44 dh_testroot
45 rm -f build-stamp
47 [ ! -f Makefile ] || $(MAKE) distclean
49 dh_clean
51 install: build
52 dh_testdir
53 dh_testroot
54 dh_prep
55 dh_installdirs
57 $(MAKE) install DESTDIR=$(CURDIR)/debian/collection4
59 mkdir -p debian/collection4/usr/lib/
60 mv debian/collection4/usr/bin/ debian/collection4/usr/lib/collection4
61 mkdir -p debian/collection4/usr/share/collection4
62 mv debian/collection4/usr/share/*.css debian/collection4/usr/share/collection4
63 mv debian/collection4/usr/share/*.js debian/collection4/usr/share/collection4
65 binary-indep: build install
66 # nothing to do here
68 binary-arch: build install
69 dh_testdir
70 dh_testroot
71 dh_installchangelogs
72 dh_installdocs -a -A AUTHORS README
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