From 231b7c6e16314766a38ae0c86e6c6c3e28255b39 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 8 Apr 2018 15:06:34 +0200 Subject: [PATCH] only run the option when available --- debian/rules | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/debian/rules b/debian/rules index 0ca4cfdd..e2d9e2da 100755 --- a/debian/rules +++ b/debian/rules @@ -21,6 +21,7 @@ ifneq (,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS)))) endif VENDOR=$(shell lsb_release -is) +DH_VERSION := $(shell dpkg -s debhelper | grep '^Version' | awk '{print $$2}') DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) @@ -501,9 +502,12 @@ override_dh_installman: override_dh_strip: : # running out of diskspace on the buildds find $(TARGET_BUILD) -name '*.o' -o -name '*.a' | xargs -r rm -f +ifeq (0, $(strip $(shell dpkg --compare-versions $(DH_VERSION) ge 9.20160114; echo $$?))) + : # If we don't have the right version of debhelper, don't run the option dh_strip -p libclang$(SONAME_EXT)-$(LLVM_VERSION) --dbgsym-migration='libclang$(SONAME_EXT)-$(LLVM_VERSION)-dbg (<< 1:6.0-2~)' dh_strip -p libllvm$(LLVM_VERSION) --dbgsym-migration='libllvm$(LLVM_VERSION)-dbg (<< 1:6.0-2~)' dh_strip -p liblldb-$(LLVM_VERSION) --dbgsym-migration='liblldb-$(LLVM_VERSION)-dbg (<< 1:6.0-2~)' +endif # ifeq (${LLD_ENABLE},yes) # dh_strip -p liblld-$(LLVM_VERSION) --dbg-package=liblld-$(LLVM_VERSION)-dbg # endif