From a94931d5e099821bc89867a0a68af318bf5fef7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sat, 28 Oct 2017 13:26:17 +0200 Subject: Use DEB* vars via default.mk instead own functions --- debian/rules | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'debian/rules') diff --git a/debian/rules b/debian/rules index 2a5ee68..293d798 100755 --- a/debian/rules +++ b/debian/rules @@ -4,20 +4,7 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed -DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) -DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) -DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) -DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) -DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS) - -VERSION = $(shell head -n1 debian/changelog | sed -e 's/.*(//;s/-.*).*//;s/\+/\-/') - -ifeq ($(DEB_HOST_ARCH_OS),) - DEB_HOST_ARCH_OS := $(subst -gnu,,$(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM)) - ifeq ($(DEB_HOST_ARCH_OS),gnu) - DEB_HOST_ARCH_OS := hurd - endif -endif +include /usr/share/dpkg/default.mk ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) CFLAGS += -g @@ -137,4 +124,4 @@ override_dh_systemd_enable-arch: dh_systemd_enable --no-enable debian/saned.socket override_dh_makeshlibs-arch: - dh_makeshlibs -- -v$(VERSION) -Pdebian/libsane1 -plibsane1 + dh_makeshlibs -- -v$(DEB_VERSION_UPSTREAM) -Pdebian/libsane1 -plibsane1 -- cgit v1.2.3