From: Hans van Kranenburg Date: Wed, 20 Dec 2017 00:56:42 +0000 (+0100) Subject: debian/rules: Add orig command X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~127 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e352a1fe73325d1f596341e032b5e30d8fa78708;p=xen.git debian/rules: Add orig command I copied this one from the linux team. It combines the orig file with the packaging, so we can start using quilt to refresh the patches. --- diff --git a/debian/rules b/debian/rules index 08c6f19c62..acbface3ce 100755 --- a/debian/rules +++ b/debian/rules @@ -5,8 +5,11 @@ include /usr/share/dpkg/default.mk -SOURCE := $(shell dpkg-parsechangelog | sed -ne 's,^Source: *\(.*\)$$,\1,p') -VERSION_BINNMU := $(shell echo "$(DEB_VERSION)" | sed -ne 's,.*\+b\(.*\)$$,\1,p') +SHELL := sh -e +SOURCE := $(shell dpkg-parsechangelog -SSource) +VERSION := $(shell dpkg-parsechangelog -SVersion) +VERSION_UPSTREAM := $(shell echo "$(VERSION)" | sed -e 's,-[^-]*$$,,') +VERSION_BINNMU := $(shell echo "$(VERSION)" | sed -rne 's,.*\+b([0-9]+)$$,\1,p') include debian/rules.defs @@ -42,6 +45,22 @@ binary-arch: binary: binary-indep binary-arch +DIR_ORIG = ../orig/$(SOURCE)-$(VERSION_UPSTREAM) +TAR_ORIG_NAME = $(SOURCE)_$(VERSION_UPSTREAM).orig.tar.xz +TAR_ORIG = $(firstword $(wildcard ../$(TAR_ORIG_NAME)) $(wildcard ../orig/$(TAR_ORIG_NAME))) + +orig: $(DIR_ORIG) + rsync --delete --exclude /debian --exclude .git -a $(DIR_ORIG)/ . + QUILT_PATCHES='$(CURDIR)/debian/patches' QUILT_PC=.pc quilt push --quiltrc - -a -q --fuzz=0 + +$(DIR_ORIG): +ifeq ($(TAR_ORIG),) + $(error Cannot find orig tarball $(TAR_ORIG_NAME)) +else + mkdir -p ../orig + tar -C ../orig -xaf $(TAR_ORIG) +endif + CONTROL_FILES += debian/changelog debian/bin/gencontrol.py $(wildcard debian/templates/*.in) CONTROL_FILES += $(wildcard debian/arch/defines) $(wildcard debian/arch/*/defines) GENCONTROL = $(__MODULES_DIR)gencontrol.py