Pull in darkstat-3.0.718
[darkstat-debian] / debian / rules
1 #!/usr/bin/make -f
2
3 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
4 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
5
6 # CFLAGS += -Wall -g
7
8
9 DPKG_EXPORT_BUILDFLAGS = 1
10 include /usr/share/dpkg/buildflags.mk
11
12 configure: configure-stamp
13 configure-stamp: 
14         dh_testdir
15         cp /usr/share/misc/config.sub /usr/share/misc/config.guess .
16         CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man
17         touch $@
18
19 build: configure-stamp build-stamp
20 build-arch: build
21 build-indep: build 
22
23 build-stamp: configure-stamp
24         dh_testdir
25         $(MAKE)
26         touch $@
27
28 clean: 
29         dh_testdir
30         dh_testroot
31         dh_clean build-stamp configure-stamp config.status config.log install-tamp config.sub config.guess
32         [ ! -f Makefile ] || $(MAKE) clean
33         [ ! -f Makefile ] || rm -f Makefile
34         [ ! -f config.h ] || rm -f config.h
35         [ ! -f darkstat.8 ] || rm -f darkstat.8
36         debconf-updatepo
37
38 install: install-stamp
39 install-stamp: build-stamp
40         dh_testdir
41         dh_testroot
42         dh_prep
43         dh_installdirs
44         $(MAKE) install DESTDIR=$(CURDIR)/debian/darkstat
45         install -m 644 debian/init.cfg $(CURDIR)/debian/darkstat/etc/darkstat
46         touch $@
47
48 binary-indep: build install
49 # nothing to do
50
51 binary-arch: build install
52         dh_testdir
53         dh_testroot
54         dh_installdebconf
55         dh_installdocs -n
56         dh_installinit -R
57         dh_installchangelogs ChangeLog
58         dh_strip
59         dh_compress
60         dh_fixperms
61         dh_installdeb
62         dh_shlibdeps
63         dh_gencontrol
64         dh_md5sums
65         dh_builddeb
66
67 binary: binary-indep binary-arch
68 .PHONY: build clean binary-indep binary-arch binary install