3 CFLAGS=-Wall -Wextra -g $(if $(findstring noopt,$(DEB_BUILD_OPTIONS)),-O0,-O2)
4 tmp = $(CURDIR)/debian/xinetd
6 srcpkg = $(shell dpkg-parsechangelog | sed -ne 's/Source: *//p')
7 srcver = $(shell dpkg-parsechangelog | sed -ne 's/Version: *\(.*:\)\?\(.*\)-[0-9.]*$$/\2/p')
8 pkgdir = '$(CURDIR)'/debian/xinetd
11 ../$(srcpkg)_$(srcver).orig.tar.gz:
12 @if git rev-parse --git-dir >/dev/null 2>&1; then \
13 echo -n 'Regenerating $(@F)'; \
14 git show pristine-tar:$(@F).delta | pristine-tar gentar - $@; \
18 check-tarball: ../$(srcpkg)_$(srcver).orig.tar.gz
25 refresh-patches: check-tarball
27 @echo 'refreshing debian/patches:'
28 @rm -rf '$(CURDIR)'/debian/patches
29 @mkdir -p '$(CURDIR)'/debian/patches
30 @cd '$(CURDIR)'/debian/patches && git format-patch upstream..upstream+patches
35 patch: patch-stamp check-tarball
38 set -e; test -e patch-stamp || \
39 for i in `ls -1 debian/patches/*.patch || :`; do patch -p1 <$$i > /dev/null; done
44 set -e; ! test -e patch-stamp || \
45 for i in `ls -1r debian/patches/*.patch || :`; do patch -p1 -R <$$i > /dev/null; done
48 configure: configure-stamp
49 configure-stamp: patch
51 cp /usr/share/misc/config.* '$(CURDIR)'
52 CFLAGS="-O2" ./configure --prefix=/usr \
53 --mandir=\$${prefix}/share/man \
54 --infodir=\$${prefix}/share/info \
55 --host=$(DEB_HOST_GNU_TYPE) \
56 --build=$(DEB_BUILD_GNU_TYPE) \
62 build: configure-stamp build-stamp
71 ! test -e Makefile || $(MAKE) distclean
72 rm -f build-stamp configure-stamp
80 $(MAKE) install prefix=$(pkgdir)/usr
82 binary-indep: build install
84 binary-arch: build install
87 dh_installchangelogs CHANGELOG
88 dh_installdocs README debian/README.update-inetd debian/xinetd.org-FAQ.html
89 dh_installexamples xinetd/sample.conf
102 binary: binary-indep binary-arch
104 .PHONY: patch build clean binary-indep binary-arch binary install configure