summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules17
1 files changed, 2 insertions, 15 deletions
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