X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=debian%2Frules;h=28c6dedb22faac463e440e8d90ba4e5f17c045db;hb=8172893ece7dfa04829f0f67881217f5f5f20d90;hp=0b85fbf7fffe78cd42f44953baa4a8a3a968e881;hpb=8e76eae395900539c40f2945bacde355cc8586a8;p=debian%2Ftar diff --git a/debian/rules b/debian/rules index 0b85fbf7..28c6dedb 100755 --- a/debian/rules +++ b/debian/rules @@ -11,6 +11,13 @@ CFLAGS += -Wall LDFLAGS += `dpkg-buildflags --get LDFLAGS` CPPFLAGS = `dpkg-buildflags --get CPPFLAGS` +export BUILD_DATE = $(shell dpkg-parsechangelog | sed -n -e 's/^Date: //p') + +ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + MAKEFLAGS += -j$(NUMJOBS) +endif + configure: configure-stamp configure-stamp: dh_testdir @@ -18,7 +25,8 @@ configure-stamp: cp -f /usr/share/misc/config.guess build-aux/config.guess RSH="/usr/bin/rsh" CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure \ --prefix=/usr \ - --libexecdir=/usr/sbin \ + --libexecdir=/usr/lib/tar \ + --enable-backup-scripts \ --with-lzma=xz \ $(CONFARGS) touch configure-stamp @@ -28,7 +36,8 @@ 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) + RSH="/usr/bin/rsh" CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" $(MAKE) ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) @@ -38,7 +47,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 @@ -60,11 +68,16 @@ install: build dh_installdirs make install bindir=`pwd`/debian/tar/bin prefix=`pwd`/debian/tar/usr \ - libexecdir=`pwd`/debian/tar/usr/sbin + libexecdir=`pwd`/debian/tar/usr/lib/tar install -m 755 debian/rmt.sh debian/tar/etc/rmt - mv debian/tar/usr/sbin/rmt debian/tar/usr/sbin/rmt-tar + mv debian/tar/usr/lib/tar/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/tar-backup + mv debian/tar/usr/sbin/restore debian/tar-scripts/usr/sbin/tar-restore + mv debian/tar/usr/lib/tar/backup.sh debian/tar-scripts/usr/lib/tar/ + mv debian/tar/usr/lib/tar/dump-remind debian/tar-scripts/usr/lib/tar/ + # Build architecture-independent files here. binary-indep: build install