diff --git a/debian/rules b/debian/rules index 1980ee02c..72ca25c0b 100755 --- a/debian/rules +++ b/debian/rules @@ -4,7 +4,7 @@ # version := 2.6.11 abiname := 1 -ktver := 5 +ltver := 5 # # Generally nothing needs to be modified below this line # @@ -13,12 +13,13 @@ controls := $(wildcard debian/arch/*/control.in debian/arch/*/*/control.in) karch := $(shell dpkg-architecture -qDEB_HOST_ARCH) major := $(basename $(version)) srcver := $(shell dpkg-parsechangelog | awk '/^Version:/ {print $$2}') +release := $(version)-$(ltver) # # Construct depends and provides for the linux-tree # lt_depends += $(shell seq -f 'linux-source-$(version) (= $(version)-%g)' \ - -s ' | ' 1 $(ktver)) -lt_provides := $(shell seq -f 'linux-tree-$(version)-%g' -s ', ' 1 $(ktver)) + -s ' | ' 1 $(ltver)) +lt_provides := $(shell seq -f 'linux-tree-$(version)-%g' -s ', ' 1 $(ltver)) # # If we are not passed a subarchs variable, we obtain the complete # subarch list as a list of subdirectories in arch/$(karch). We @@ -35,8 +36,18 @@ ifeq (,$(subarchs)) subarchs := none endif -export version abiname ktver kbuildver flavours +export version abiname ltver kbuildver flavours +patch: debian/patch-stamp +debian/patch-stamp: debian/bin/apply + override_version=$(release) home=debian/patches debian/bin/apply + touch debian/patch-stamp + +unpatch: + if [ -e debian/patch-stamp ]; then + override_version=$(release) home=debian/patches debian/bin/apply $(version) + rm -f debian/patch-stamp + fi unpack: debian/linux-source-$(version).tar.bz2 unpack-stamp unpack-stamp: @@ -83,7 +94,7 @@ debian/control: debian/templates/control.main.in cat debian/templates/control.main.in | \ sed -e 's/@version@/$(version)/g' \ -e 's/@major@/$(major)/g' \ - -e 's/@ktver@/$(ktver)/g' \ + -e 's/@ltver@/$(ltver)/g' \ -e 's/@srcver@/$(srcver)/g' \ -e 's/@lt_depends@/$(lt_depends)/g' \ -e 's/@lt_provides@/$(lt_provides)/g' \ @@ -104,4 +115,4 @@ debian/linux-source-$(version).tar.bz2: debian/Makefile.source $(MAKE) -f debian/Makefile.source binary; \ fi -.PHONY: clean build unpack binary-indep binary-arch binary +.PHONY: clean build unpack binary-indep binary-arch binary patch unpatch