summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules8
1 files changed, 3 insertions, 5 deletions
diff --git a/debian/rules b/debian/rules
index 9a38cfb..7a0e1b5 100755
--- a/debian/rules
+++ b/debian/rules
@@ -10,6 +10,8 @@ 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)
@@ -26,8 +28,6 @@ ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
STRIP = ""
endif
-VERSION = $(shell head -n1 debian/changelog | sed -e 's/.*(//;s/-.*).*//;s/\+/\-/')
-
%:
dh $@ --parallel --with autotools_dev,systemd
@@ -136,7 +136,5 @@ override_dh_systemd_enable:
override_dh_strip:
dh_strip --dbg-package=libsane-dbg
-UPSTREAM_VERSION=$(shell dpkg-parsechangelog | sed -n '/\(Version:\)/{s/^Version:[[:space:]]\+\([0-9]\+:\)\?\(.*\)/\2/p}' | rev | cut -d- -f 2- | rev)
-
override_dh_makeshlibs:
- dh_makeshlibs -- -v$(UPSTREAM_VERSION) -Pdebian/libsane -plibsane
+ dh_makeshlibs -- -v$(VERSION) -Pdebian/libsane -plibsane