use the new flag by default
[packages/xinetd.git] / debian / rules
old mode 100644 (file)
new mode 100755 (executable)
index 621f59b..25e856f
@@ -4,7 +4,7 @@ CFLAGS=-Wall -Wextra -g $(if $(findstring noopt,$(DEB_BUILD_OPTIONS)),-O0,-O2)
 tmp = $(CURDIR)/debian/xinetd
 
 srcpkg = $(shell dpkg-parsechangelog | sed -ne 's/Source: *//p')
-srcver = $(shell dpkg-parsechangelog | sed -ne 's/Version: *\(.*\)-[0-9]*$$/\1/p')
+srcver = $(shell dpkg-parsechangelog | sed -ne 's/Version: *\(.*:\)\?\(.*\)-[0-9.]*$$/\2/p')
 pkgdir = '$(CURDIR)'/debian/xinetd
 #{{{ generic rules
 
@@ -46,14 +46,14 @@ unpatch:
        rm -f patch-stamp
 
 configure: configure-stamp
-configure-stamp:
+configure-stamp: patch
        dh_testdir
-       chmod -R a=rX,u=rwX .
-       CFLAGS="-O2" ./configure --prefix=/usr             \
-              --mandir=\$${prefix}/share/man              \
-              --infodir=\$${prefix}/share/info            \
-              --host=$(DEB_HOST_GNU_TYPE)                 \
-              --build=$(DEB_BUILD_GNU_TYPE)               \
+       cp /usr/share/misc/config.* '$(CURDIR)'
+       CFLAGS="-O2" ./configure --prefix=/usr         \
+              --mandir=\$${prefix}/share/man          \
+              --infodir=\$${prefix}/share/info        \
+              --host=$(DEB_HOST_GNU_TYPE)             \
+              --build=$(DEB_BUILD_GNU_TYPE)           \
               \
               --with-loadavg          \
               --with-libwrap
@@ -77,8 +77,7 @@ install: build
        dh_testroot
        dh_clean -k
        dh_installdirs
-       $(MAKE) install prefix=$(pkgdir)
-       mv $(pkgdir)/etc/xinetd.d/xinetd.conf $(pkgdir)/etc/
+       $(MAKE) install prefix=$(pkgdir)/usr
 
 binary-indep: build install
 
@@ -102,4 +101,4 @@ binary-arch: build install
 
 binary: binary-indep binary-arch
 
-.PHONY: build clean binary-indep binary-arch binary install configure
+.PHONY: patch build clean binary-indep binary-arch binary install configure