Source: bchunk
Version: 1.2.0-12
Tags: patch
User: [email protected]
Usertags: rebootstrap

bchunk fails to cross build from source, because it uses the build
architecture linker and strip programs. While debhelper has learned to
pass cross compilers for CC and CXX via the makefile buildsystem used by
dh_auto_build, it doesn't do so for other variables such as LD. Simply
setting 'LD=$(CC)' fixes this part though. Further down the road, bchunk
strips during install and does so using the build architecture strip.
This is bad, because it also breaks the generation of -dbgsym packages.
Thus I propose not stripping during install. Please consider applying
the attached patch.

Helmut
diff --minimal -Nru bchunk-1.2.0/debian/changelog bchunk-1.2.0/debian/changelog
--- bchunk-1.2.0/debian/changelog       2012-03-27 08:44:45.000000000 +0200
+++ bchunk-1.2.0/debian/changelog       2017-01-10 21:11:16.000000000 +0100
@@ -1,3 +1,12 @@
+bchunk (1.2.0-12.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Use triplet-prefixed LD.
+    + Do not strip during install.
+
+ -- Helmut Grohne <[email protected]>  Tue, 10 Jan 2017 21:11:16 +0100
+
 bchunk (1.2.0-12) unstable; urgency=low
 
   * New maintainer. (Closes: #540585)
diff --minimal -Nru bchunk-1.2.0/debian/rules bchunk-1.2.0/debian/rules
--- bchunk-1.2.0/debian/rules   2012-03-11 07:16:04.000000000 +0100
+++ bchunk-1.2.0/debian/rules   2017-01-10 21:11:16.000000000 +0100
@@ -3,5 +3,11 @@
 %:
        dh ${@}
 
+override_dh_auto_build:
+       dh_auto_build -- 'LD=$$(CC)'
+
 override_dh_auto_install:
-       $(MAKE) BIN_DIR=$(CURDIR)/debian/bchunk/usr/bin 
MAN_DIR=$(CURDIR)/debian/bchunk/usr/share/man install
+       dh_auto_install -- \
+               INSTALL='install --strip-program=/bin/true' \
+               BIN_DIR=$(CURDIR)/debian/bchunk/usr/bin \
+               MAN_DIR=$(CURDIR)/debian/bchunk/usr/share/man

Reply via email to