#!/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
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