]> git.proxmox.com Git - mirror_spl-debian.git/commitdiff
debian/rules: Use DEB_VERSION* instead of manually parsing.
authorNicolas Braud-Santoni <nicolas@braud-santoni.eu>
Sat, 5 May 2018 17:48:08 +0000 (19:48 +0200)
committerMo Zhou <cdluminate@gmail.com>
Tue, 18 Sep 2018 09:21:40 +0000 (09:21 +0000)
debian/rules

index 8d382133ada46f4e08d19bede6bb88b28a271270..a50085ae129bbb207b77e6cedb6245d8c33daccc 100755 (executable)
@@ -1,10 +1,10 @@
 #!/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)
 
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
@@ -17,8 +17,7 @@ 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