Source: mp3rename
Version: 0.6-10
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

mp3rename fails to cross build from source, because it does not pass
cross tools to make. The easiest way of fixing that is using
dh_auto_build. Unfortunately, it's not that easy as mp3rename uses
help2man. I really recommend using a proper manpage. In the presence of
help2man, we can build mp3rename twice: Once for help2man and then for
real. The attached patch implements that and makes mp3rename cross
buildable. Please consider applying the attached patch.

Helmut
diff -u mp3rename-0.6/debian/changelog mp3rename-0.6/debian/changelog
--- mp3rename-0.6/debian/changelog
+++ mp3rename-0.6/debian/changelog
@@ -1,3 +1,12 @@
+mp3rename (0.6-10.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Build twice: once for help2man and once for real.
+    + Let dh_auto_build pass cross tools to make.
+
+ -- Helmut Grohne <hel...@subdivi.de>  Mon, 11 Jun 2018 16:52:27 +0200
+
 mp3rename (0.6-10) unstable; urgency=medium
 
   * QA upload.
diff -u mp3rename-0.6/debian/rules mp3rename-0.6/debian/rules
--- mp3rename-0.6/debian/rules
+++ mp3rename-0.6/debian/rules
@@ -8,6 +8,9 @@
 # This is the debhelper compatability version to use.
 #export DH_COMPAT=3
 
+include /usr/share/dpkg/architecture.mk
+export DEB_BUILD_MAINT_OPTIONS=hardening=-format
+
 configure: configure-stamp
 configure-stamp:
        dh_testdir
@@ -20,12 +23,15 @@
 build-stamp:
        dh_testdir
 
-       # Add here commands to compile the package.
-       $(MAKE)
+       dpkg-architecture -a$(DEB_BUILD_ARCH) -f -c dh_auto_build
        #/usr/bin/docbook-to-man debian/mp3rename.sgml > mp3rename.1
        /usr/bin/help2man -h -h -v '-s help' -S 'Debian GNU/Linux' \
                -N -o mp3rename.1 -n 'Rename mp3 files based on id3tags' \
                ./mp3rename
+ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+       dh_auto_clean
+       dh_auto_build
+endif
 
        touch build-stamp
 

Reply via email to