#!/usr/bin/make -f include /usr/share/dpatch/dpatch.make DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) CFLAGS = -Wall -g ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 else CFLAGS += -O2 endif config.status: patch configure dh_testdir ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --sysconfdir=/etc/ngircd --without-epoll --with-gnutls build: build-stamp build-stamp: config.status dh_testdir $(MAKE) touch build-stamp clean: unpatch dh_testdir dh_testroot rm -f build-stamp [ ! -f Makefile ] || $(MAKE) distclean ifneq "$(wildcard /usr/share/misc/config.sub)" "" cp -f /usr/share/misc/config.sub config.sub endif ifneq "$(wildcard /usr/share/misc/config.guess)" "" cp -f /usr/share/misc/config.guess config.guess endif dh_clean install: build dh_testdir dh_testroot dh_clean -k dh_installdirs $(MAKE) install DESTDIR=$(CURDIR)/debian/ngircd rm -rf $(CURDIR)/debian/ngircd/etc install -m 640 -D $(CURDIR)/debian/ngircd.conf $(CURDIR)/debian/ngircd/etc/ngircd/ngircd.conf install -m 640 -D $(CURDIR)/debian/ngircd.motd $(CURDIR)/debian/ngircd/etc/ngircd/ngircd.motd rm -rf $(CURDIR)/debian/ngircd/usr/share binary-indep: build install binary-arch: build install dh_testdir dh_testroot dh_installchangelogs ChangeLog dh_installexamples doc/sample-ngircd.conf dh_installdocs dh_installinit dh_installman man/ngircd.8 man/ngircd.conf.5 dh_compress dh_strip dh_fixperms dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install