From 0c8c083cc01c03e1f292ca5f7e66d11d02784e1f Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Mon, 8 Jan 2007 18:17:35 +0000 Subject: [PATCH] debian/rules - Also extract the source package name from the changelog. - Simplify tar extraction. svn path=/dists/trunk/linux-2.6/; revision=8139 --- debian/rules | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/debian/rules b/debian/rules index 990390e85..405f18214 100755 --- a/debian/rules +++ b/debian/rules @@ -5,9 +5,8 @@ SHELL := sh -e DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH) DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH) -srcver := $(shell dpkg-parsechangelog | awk '/^Version:/ {print $$2}') -VERSION := $(shell echo $(srcver) | sed -e 's,-[^-]*$$,,') -MAJOR := $(word 1,$(subst ., ,$(VERSION))).$(word 2,$(subst ., ,$(VERSION))) +SOURCE := $(shell dpkg-parsechangelog | sed -ne 's,^Source: *\(.*\)$$,\1,p') +VERSION := $(shell dpkg-parsechangelog | sed -ne 's,^Version: *\(.*\)-[^-]*$$,\1,p') include debian/rules.defs @@ -36,20 +35,16 @@ $(STAMPS_DIR)/build-base: $(STAMPS_DIR)/setup-base $(BUILD_DIR) $(STAMPS_DIR): @[ -d $@ ] || mkdir $@ -DIR_ORIG = ../orig/linux-$(MAJOR)-$(VERSION) -TAR_ORIG = ../linux-$(MAJOR)_$(VERSION).orig.tar.gz +DIR_ORIG = ../orig/$(SOURCE)-$(VERSION) +TAR_ORIG = ../$(SOURCE)_$(VERSION).orig.tar.gz orig: $(DIR_ORIG) rsync --delete --exclude debian --exclude .svn --link-dest=$(DIR_ORIG)/ -a $(DIR_ORIG)/ . $(DIR_ORIG): - if [ -f $(TAR_ORIG) ]; then \ - mkdir -p ../orig; \ - tar -C ../orig -xzf $(TAR_ORIG); \ - else \ - echo "Can't find orig tarball." >&2; \ - exit 1; \ - fi + @[ -e $(TAR_ORIG) ] || ( echo "Can't find orig tarball" >&2; exit 1 ) + mkdir -p ../orig + tar -C ../orig -xzf $< maintainerclean: rm -f debian/control debian/control.md5sum debian/rules.gen debian/bin/patch.* debian/linux-*