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
11 -include /usr/share/dpkg/buildtools.mk
14 configure: configure-stamp
17 cp /usr/share/misc/config.sub /usr/share/misc/config.guess .
18 CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --disable-silent-rules
21 build: configure-stamp build-stamp
25 build-stamp: configure-stamp
27 $(MAKE) HOSTCC=$(CC_FOR_BUILD)
33 dh_clean build-stamp configure-stamp config.status config.log install-tamp config.sub config.guess
34 [ ! -f Makefile ] || $(MAKE) clean
35 [ ! -f Makefile ] || rm -f Makefile
36 [ ! -f config.h ] || rm -f config.h
37 [ ! -f darkstat.8 ] || rm -f darkstat.8
40 install: install-stamp
41 install-stamp: build-stamp
46 $(MAKE) install DESTDIR=$(CURDIR)/debian/darkstat
47 install -m 644 debian/init.cfg $(CURDIR)/debian/darkstat/etc/darkstat
50 binary-indep: build install
53 binary-arch: build install
59 dh_installchangelogs ChangeLog
69 binary: binary-indep binary-arch
70 .PHONY: build clean binary-indep binary-arch binary install