3 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
4 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
9 DPKG_EXPORT_BUILDFLAGS = 1
10 include /usr/share/dpkg/buildflags.mk
12 configure: configure-stamp
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
19 build: configure-stamp build-stamp
23 build-stamp: configure-stamp
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
38 install: install-stamp
39 install-stamp: build-stamp
44 $(MAKE) install DESTDIR=$(CURDIR)/debian/darkstat
45 install -m 644 debian/init.cfg $(CURDIR)/debian/darkstat/etc/darkstat
48 binary-indep: build install
51 binary-arch: build install
57 dh_installchangelogs ChangeLog
67 binary: binary-indep binary-arch
68 .PHONY: build clean binary-indep binary-arch binary install