X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=debian%2Frules;h=7118a4daac365d190809101e27ab85b07b8da1d3;hb=73bbc486ed4d7b1e7600e681a0d96eabbf77367f;hp=8d382133ada46f4e08d19bede6bb88b28a271270;hpb=5ccaeb5edb1a197043e0dab1fcdfb0a9810b1c54;p=mirror_spl-debian.git diff --git a/debian/rules b/debian/rules index 8d38213..7118a4d 100755 --- a/debian/rules +++ b/debian/rules @@ -1,10 +1,11 @@ #!/usr/bin/make -f -NAME := $(shell awk '$$1 == "Name:" { print $$2; }' META) -VERSION := $(shell dpkg-parsechangelog \ - | awk '$$1 == "Version:" { print $$2; }' | cut -d- -f1) -REVISION := $(shell dpkg-parsechangelog \ - | awk '$$1 == "Version:" { print $$2; }' | cut -d- -f2-) +include /usr/share/dpkg/pkg-info.mk + +NAME := spl +VERSION := $(DEB_VERSION_UPSTREAM) +REVISION := $(shell echo $(DEB_VERSION) | cut -d- -f2) +LINUX_NEXT := $(shell awk -F. '{print $$1 "." $$2+1}' debian/linux_compat) export DEB_BUILD_MAINT_OPTIONS = hardening=+all @@ -17,14 +18,13 @@ KVERS=$(shell uname -r) endif non_epoch_version=$(shell echo $(KVERS) | perl -pe 's/^\d+://') -PACKAGE=spl -pmodules = $(PACKAGE)-modules-$(non_epoch_version) +pmodules = $(NAME)-modules-$(non_epoch_version) %: dh $@ --with dkms,autoreconf --parallel override_dh_auto_configure: - sed "s/@LINUX_COMPAT@/linux-libc-dev \(<< $(shell debian/get_next.sh)\)/" debian/control.in > debian/control + sed "s/@LINUX_COMPAT@/linux-libc-dev \(<< $(LINUX_NEXT)~\)/" debian/control.in > debian/control @# Embed the downstream version in the module. @sed \ @@ -63,7 +63,7 @@ override_dh_dkms: override_dh_auto_clean: dh_auto_clean @if test -e META.orig; then mv META.orig META; fi - sed "s/@LINUX_COMPAT@/linux-libc-dev \(<< $(shell debian/get_next.sh)\)/" debian/control.in > debian/control + sed "s/@LINUX_COMPAT@/linux-libc-dev \(<< $(LINUX_NEXT)~\)/" debian/control.in > debian/control # ------------