Code

rules: Remove manpages to force a rebuild to avoid errors from man.
[pkg-liboping.git] / debian / rules
index a5e8cf1d9b39c166731f66128de1d7a5df3e6ff4..9d2efbf5562ac7005edeb2a11e2c7aaa8fe46cbc 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/make -f
 # debian/rules for liboping
 #
-# Written by Sebastian Harl <sh@tokkee.org>
+# Written by Sebastian Harl <tokkee@debian.org>
 
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
@@ -19,15 +19,13 @@ else
        CFLAGS += -O2
 endif
 
-include /usr/share/dpatch/dpatch.make
-
 # $srcver-$perlver-$debrev
 LIBPERL_VERSION := $(shell pm_ver=`perl -MExtUtils::MM -e \
                'print MM->parse_version("bindings/perl/lib/Net/Oping.pm");'`; \
        pkg_ver=`dpkg-parsechangelog | egrep '^Version:' | cut -d' ' -f2`; \
        echo -n "$${pkg_ver%-*}-$$pm_ver-$${pkg_ver\#\#*-}")
 
-config.status: configure $(DPATCH_STAMPFN)
+config.status: configure
        dh_testdir
        
        for file in config.guess config.sub; do \
@@ -35,12 +33,13 @@ config.status: configure $(DPATCH_STAMPFN)
                ln -s /usr/share/misc/$$file .; \
        done
        
-       CFLAGS="$(CFLAGS)" ./configure \
+       ./configure \
                        --host=$(DEB_HOST_GNU_TYPE) \
                        --build=$(DEB_BUILD_GNU_TYPE) \
                        --prefix=/usr \
                        --mandir=\$${prefix}/share/man \
-                       --with-perl-bindings="INSTALLDIRS=vendor"
+                       --with-perl-bindings="INSTALLDIRS=vendor" \
+                       CFLAGS="$(CFLAGS)"
 
 build: build-stamp
 
@@ -51,7 +50,7 @@ build-stamp:  config.status
        
        touch build-stamp
 
-clean: unpatch
+clean:
        dh_testdir
        dh_testroot
        rm -f build-stamp
@@ -66,6 +65,9 @@ clean: unpatch
        done
        
        dh_clean
+       
+       # force a rebuild of the manpages
+       rm -f src/mans/*.3 src/mans/*.8
 
 install: build
        dh_testdir
@@ -87,10 +89,11 @@ binary-arch: build install
        dh_testroot
        dh_installchangelogs -Nlibnet-oping-perl ChangeLog
        dh_installchangelogs -plibnet-oping-perl bindings/perl/Changes
+       dh_installdocs -A AUTHORS
        dh_installdocs -A -Nlibnet-oping-perl README
        dh_installdocs -plibnet-oping-perl bindings/perl/README
        dh_installman
-       dh_install --sourcedir=debian/tmp --list-missing
+       dh_install --sourcedir=debian/tmp --fail-missing
        dh_perl -plibnet-oping-perl
        dh_link
        dh_strip