#!/usr/bin/make -f #export DH_VERBOSE=1 DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS) ifeq ($(DEB_HOST_ARCH_OS), linux) led = --enable-led else led = endif ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) MAKEFLAGS += -j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) endif DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) hostoptions = --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) else hostoptions = --build=$(DEB_BUILD_GNU_TYPE) endif CFLAGS := $(shell dpkg-buildflags --get CFLAGS) CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS) LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) CFLAGS += -Wall LDFLAGS += -Wl,-z,defs config.status: configure.in Makefile.in dh_testdir autoheader autoconf ./configure --prefix=/usr --sysconfdir=/etc --enable-nntp $(led) \ --mandir=/usr/share/man \ --x-includes="" --x-libraries="" \ $(hostoptions) \ CFLAGS='$(CFLAGS)' CPPFLAGS='$(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' \ || ( echo configure failed with $$? ; echo BEGIN config.log: ; \ cat config.log ; echo "END config.log" ; exit 1 ) build: build-arch-stamp build-arch: build-arch-stamp build-indep: build-arch-stamp: config.status dh_testdir $(MAKE) touch build-arch-stamp clean: dh_testdir dh_testroot -rm -f build-arch-stamp if [ -e config.status ] ; then $(MAKE) distclean ; fi test ! -e config.status test ! -e Makefile if [ -e config.h.in ] ; then rm configure config.h.in ; fi test ! -e configure test ! -e config.h.in dh_clean binary-indep: # We have nothing to do. binary-arch: build-arch-stamp dh_testdir dh_testroot dh_prep dh_installdirs $(MAKE) install DESTDIR=$(CURDIR)/debian/xbuffy dh_install dh_installdocs dh_installexamples dh_installmenu dh_installchangelogs CHANGES dh_installman dh_strip dh_compress dh_fixperms dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build build-arch build-indep clean binary-indep binary-arch binary clean