[kernel] r11304 - dists/trunk/redhat-cluster/redhat-cluster/debian

Bastian Blank waldi at alioth.debian.org
Tue May 6 10:41:34 UTC 2008


Author: waldi
Date: Tue May  6 10:41:33 2008
New Revision: 11304

Log:
debian/rules: Add orig handling.


Modified:
   dists/trunk/redhat-cluster/redhat-cluster/debian/rules

Modified: dists/trunk/redhat-cluster/redhat-cluster/debian/rules
==============================================================================
--- dists/trunk/redhat-cluster/redhat-cluster/debian/rules	(original)
+++ dists/trunk/redhat-cluster/redhat-cluster/debian/rules	Tue May  6 10:41:33 2008
@@ -6,6 +6,9 @@
 include /usr/share/dpatch/dpatch.make
 
 DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
+SOURCE   := $(shell dpkg-parsechangelog | sed -ne 's,^Source: *\(.*\)$$,\1,p')
+VERSION_DEBIAN := $(shell dpkg-parsechangelog | sed -ne 's,^Version: *\(.*\)$$,\1,p')
+VERSION  := $(shell echo "$(VERSION_DEBIAN)" | sed -e 's,-[^-]*$$,,')
 
 xen_arches = amd64 i386
 ifneq (,$(filter $(DEB_HOST_ARCH), $(xen_arches))) 
@@ -133,9 +136,26 @@
 
 binary: binary-arch binary-indep 
 
+DIR_ORIG = ../orig/$(SOURCE)-$(VERSION)
+TAR_ORIG_NAME = $(SOURCE)_$(VERSION).orig.tar.gz
+TAR_ORIG = $(firstword $(wildcard ../$(TAR_ORIG_NAME)) $(wildcard ../orig/$(TAR_ORIG_NAME)))
+
+orig: $(DIR_ORIG)
+	rsync --delete --exclude debian --exclude .svk --exclude .svn --link-dest=$(DIR_ORIG)/ -a $(DIR_ORIG)/ .
+
+$(DIR_ORIG):
+ifeq ($(TAR_ORIG),)
+	$(error Cannot find orig tarball $(TAR_ORIG_NAME))
+else
+	mkdir -p ../orig
+	tar -C ../orig -xzf $(TAR_ORIG)
+endif
+
+maintainerclean:
+	rm -rf $(filter-out debian .svk .svn, $(wildcard * .[^.]*))
+
 clean: unpatch
 	dh_testdir
-	dh_testroot
 	dh_clean
 	
 	 [ ! -f make/defines.mk ] || $(MAKE) distclean



More information about the Kernel-svn-changes mailing list