From: LaMont Jones Date: Sun, 26 Aug 2007 05:49:01 +0000 (-0600) Subject: debian/rules: cleanup and support nostrip option X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4da691bea20a945772ed61324e01ddae264de217;p=util-linux debian/rules: cleanup and support nostrip option --- diff --git a/debian/rules b/debian/rules index 446a1c89..1ff3d583 100755 --- a/debian/rules +++ b/debian/rules @@ -7,6 +7,10 @@ DISTRO :=$(shell lsb_release -is 2>/dev/null || echo Debian) +ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) +STRIP=y +endif + ifndef DEB_HOST_ARCH DEB_BUILD_ARCH := $(shell dpkg --print-installation-architecture) DEB_HOST_ARCH = $(DEB_BUILD_ARCH) @@ -107,29 +111,27 @@ ifeq ($(arch),$(findstring $(arch),powerpc ppc64)) mv -f debian/util-linux/sbin/fdisk debian/util-linux/sbin/ddisk mv -f debian/util-linux/usr/share/man/man8/fdisk.8 debian/util-linux/usr/share/man/man8/ddisk.8 else - (cd debian/util-linux && if [ -f sbin/hwclock ] ; then ln -sf hwclock.8.gz usr/share/man/man8/clock.8.gz; fi) + cd debian/util-linux && if [ -f sbin/hwclock ] ; then ln -sf hwclock.8.gz usr/share/man/man8/clock.8.gz; fi endif - (cd debian/util-linux/sbin ; mv agetty getty) - (cd debian/util-linux/usr/share/man/man8 ; mv agetty.8 getty.8) + cd debian/util-linux/sbin ; mv agetty getty + cd debian/util-linux/usr/share/man/man8 ; mv agetty.8 getty.8 install -m 644 debian/mount.fstab debian/mount/usr/share/doc/mount/examples/fstab endif ifeq ($(DEB_HOST_GNU_SYSTEM),gnu) - (cd debian/util-linux/sbin ; mv mkswap mkswap.linux) - (cd debian/util-linux/usr/share/man/man8 ; mv mkswap.8 mkswap.linux.8) + cd debian/util-linux/sbin ; mv mkswap mkswap.linux + cd debian/util-linux/usr/share/man/man8 ; mv mkswap.8 mkswap.linux.8 endif dh_compress -i -a dh_fixperms -i -a -Xusr/bin/wall -Xbin/mount -Xbin/umount rm -rf debian/*-udeb/usr/share/doc + dh_link -i -a # Build architecture-independent files here. binary-indep: build install dh_testdir -i dh_testroot -i - dh_link -i dh_installdeb -i - #for i in $$(sed -n '/^Package:/s/^.* //p' debian/control); do cat debian/vars.in >> debian/$$i.substvars; done - #cat debian/vars.in >> debian/substvars dh_gencontrol -i -- -VUpstream=$(Upstream) dh_md5sums -i dh_builddeb -i @@ -139,13 +141,10 @@ binary-arch: build install dh_testdir -a dh_testroot -a dh_installinit -a -- defaults 15 85 - dh_link -a - dh_strip -a + [ -n "$(STRIP)" ] || dh_strip -a dh_makeshlibs -a dh_installdeb -a dh_shlibdeps -a - #for i in $$(sed -n '/^Package:/s/^.* //p' debian/control); do cat debian/vars.in >> debian/$$i.substvars; done - #cat debian/vars.in >> debian/substvars ifneq ($(DEB_HOST_ARCH_OS),linux) echo util-linux:Conflicts=getty >> debian/util-linux.substvars endif