update approach to handling config.sub/guess for better git compatibility
[debian/dump] / debian / rules
index c51ac44f60b56df7bbe5e5bd391123b79e923787..bffe7e9f4ad113591c2b19c849aae8bc282135e4 100755 (executable)
@@ -1,14 +1,18 @@
 #!/usr/bin/make -f
 
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-build: build-stamp
-build-stamp:
+configure: configure-stamp
+configure-stamp:
        dh_testdir
+       cp -f /usr/share/misc/config.sub config.sub
+       cp -f /usr/share/misc/config.guess config.guess
        ./configure --prefix=/usr --with-ccopts="-O2 -g -Wall" \
                --with-dumpdatespath=/var/lib/dumpdates \
                --enable-largefile --enable-qfa --enable-staticz
+       touch configure-stamp
+
+build: configure-stamp build-stamp
+build-stamp:
+       dh_testdir
        make
        touch build-stamp
 
@@ -16,7 +20,7 @@ clean:
        dh_testdir
        dh_testroot
        rm -f build-stamp
-       -make distclean
+       [ ! -f Makefile ] || make distclean
        dh_clean
 
 binary-indep: build
@@ -27,22 +31,20 @@ binary-arch: build
        dh_clean -k
        dh_installdirs
        make install \
-               SBINDIR=`pwd`/debian/tmp/sbin \
-               MANDIR=`pwd`/debian/tmp/usr/share/man/man8
+               SBINDIR=`pwd`/debian/dump/sbin \
+               MANDIR=`pwd`/debian/dump/usr/share/man/man8
 
-       mv debian/tmp/usr/share/man/man8/rmt.8 \
-               debian/tmp/usr/share/man/man8/rmt-dump.8
-       mv debian/tmp/sbin/rmt debian/tmp/usr/sbin/rmt-dump
+       mv debian/dump/usr/share/man/man8/rmt.8 \
+               debian/dump/usr/share/man/man8/rmt-dump.8
+       mv debian/dump/sbin/rmt debian/dump/usr/sbin/rmt-dump
 
-       (cd debian/tmp/sbin ; rm -f rdump rrestore ; \
+       (cd debian/dump/sbin ; rm -f rdump rrestore ; \
                ln -s dump rdump ; ln -s restore rrestore )
-       (cd debian/tmp/usr/share/man/man8 ; rm -f rdump* rrestore* ; \
+       (cd debian/dump/usr/share/man/man8 ; rm -f rdump* rrestore* ; \
                ln -s dump.8.gz rdump.8.gz ; ln -s restore.8.gz rrestore.8.gz )
        dh_installdocs KNOWNBUGS MAINTAINERS README THANKS TODO
        dh_installexamples examples/*
-       dh_installmanpages rmt.8
        dh_installchangelogs CHANGES
-       dh_installdebconf
        dh_strip
        dh_compress
        dh_fixperms