[kernel] r8139 - dists/trunk/linux-2.6/debian
Bastian Blank
waldi at alioth.debian.org
Mon Jan 8 19:17:35 CET 2007
Author: waldi
Date: Mon Jan 8 19:17:35 2007
New Revision: 8139
Modified:
dists/trunk/linux-2.6/debian/rules
Log:
debian/rules
- Also extract the source package name from the changelog.
- Simplify tar extraction.
Modified: dists/trunk/linux-2.6/debian/rules
==============================================================================
--- dists/trunk/linux-2.6/debian/rules (original)
+++ dists/trunk/linux-2.6/debian/rules Mon Jan 8 19:17:35 2007
@@ -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 @@
$(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-*
More information about the Kernel-svn-changes
mailing list