summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog1
-rwxr-xr-xdebian/rules17
2 files changed, 3 insertions, 15 deletions
diff --git a/debian/changelog b/debian/changelog
index 73ea225..af9757a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,7 @@ sane-backends (1.0.27-1~experimental3) experimental; urgency=medium
to override_dh_install-indep and override_dh_auto_install-indep
to build the arch all packages without error (CLoses: #870455).
- At dh_systemd_enable use debian/saned.socket instead saned.socket.
+ - Use DEB* vars via default.mk instead own functions.
* Move libsane-common.install.in to libsane-common.install.
* debian/copyright:
- Add year 2017 for debian/*.
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