add a tar-scripts package to contain --enable-backup-scripts content
[debian/tar] / debian / rules
index 7344973281f6e6c253d3ec1e61d0d91c6376021d..fe0fc0a3f41c59556eda6808ca65b3ecac60af58 100755 (executable)
@@ -6,19 +6,27 @@ ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
 CONFARGS = --host=$(DEB_HOST_GNU_TYPE)
 endif
 
+CFLAGS = `dpkg-buildflags --get CFLAGS`
+CFLAGS += -Wall
+LDFLAGS += `dpkg-buildflags --get LDFLAGS`
+CPPFLAGS = `dpkg-buildflags --get CPPFLAGS`
+
 configure: configure-stamp
 configure-stamp:
        dh_testdir
        cp -f /usr/share/misc/config.sub build-aux/config.sub
        cp -f /usr/share/misc/config.guess build-aux/config.guess
-       RSH="/usr/bin/rsh" CFLAGS="-O2 -g -Wall" ./configure \
+       RSH="/usr/bin/rsh" CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure \
                --prefix=/usr \
                --libexecdir=/usr/sbin \
+               --enable-backup-scripts \
                --with-lzma=xz \
                $(CONFARGS) 
        touch configure-stamp
 
-build: build-stamp
+build: build-arch build-indep
+build-arch: build-stamp
+build-indep: build-stamp
 build-stamp: configure-stamp
        dh_testdir
        RSH="/usr/bin/rsh" CFLAGS="-O2 -g -Wall -fno-gnu89-inline" $(MAKE)
@@ -31,7 +39,6 @@ ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
          echo "Sorry, but the test suite is not designed to be run as root."; \
          exit 1 ;\
        fi
-       (cd tests ; $(MAKE) clean)
        $(MAKE) check
 endif
 endif
@@ -56,6 +63,11 @@ install: build
                libexecdir=`pwd`/debian/tar/usr/sbin 
        install -m 755 debian/rmt.sh debian/tar/etc/rmt
        mv debian/tar/usr/sbin/rmt debian/tar/usr/sbin/rmt-tar
+       install -m 755 debian/tarcat debian/tar/usr/sbin/tarcat
+
+       mv debian/tar/usr/sbin/backup* debian/tar-scripts/usr/sbin/
+       mv debian/tar/usr/sbin/restore debian/tar-scripts/usr/sbin/
+       mv debian/tar/usr/sbin/dump-remind debian/tar-scripts/usr/sbin/
 
 # Build architecture-independent files here.
 binary-indep: build install
@@ -72,7 +84,7 @@ binary-arch: build install
        dh_installexamples
        dh_installmenu
        dh_installcron
-       dh_installman debian/tar.1 debian/rmt.8
+       dh_installman debian/tar.1 debian/rmt.8 debian/tarcat.1
        mv debian/tar/usr/share/man/man8/rmt.8 \
           debian/tar/usr/share/man/man8/rmt-tar.8
        dh_installinfo