3 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
4 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
8 configure: configure-stamp
11 cp /usr/share/misc/config.sub /usr/share/misc/config.guess .
12 CFLAGS="$(CFLAGS)" LDFLAGS="$(INSTALL_PROGRAM)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --with-chroot-dir=/var/lib/darkstat
15 build: configure-stamp build-stamp
17 build-stamp: configure-stamp
25 dh_clean build-stamp configure-stamp config.status config.log install-tamp config.sub config.guess
26 [ ! -f Makefile ] || $(MAKE) clean
27 [ ! -f Makefile ] || rm -f Makefile
28 [ ! -f config.h ] || rm -f config.h
29 [ ! -f darkstat.8 ] || rm -f darkstat.8
32 install: install-stamp
33 install-stamp: build-stamp
38 $(MAKE) install DESTDIR=$(CURDIR)/debian/darkstat
39 install -m 644 debian/init.cfg $(CURDIR)/debian/darkstat/etc/darkstat
42 binary-indep: build install
45 binary-arch: build install
51 dh_installchangelogs ChangeLog
61 binary: binary-indep binary-arch
62 .PHONY: build clean binary-indep binary-arch binary install