From 4695443abd8fd0d7c499241e1327f73036422cb0 Mon Sep 17 00:00:00 2001 From: Matthew Vernon Date: Sun, 21 Feb 2021 16:07:29 +0000 Subject: [PATCH] Patch from Helmut Grohne to fix FTCBFS: (Closes: #947616) Let dh_auto_build pass cross tools to make. Additionally override LD. Keep building the build tools for the build architecture. Seed the compiler used for randverse from dpkg's buildtools.mk. Use dh_strip as it uses the correct cross tool. --- debian/control | 2 +- debian/rules | 26 +++++++++++--------------- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/debian/control b/debian/control index 7a6f793..15a1e1c 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: bible-kjv Section: doc Priority: optional Maintainer: Matthew Vernon -Build-Depends: libreadline-dev +Build-Depends: libreadline-dev, debhelper-compat (= 9) Standards-Version: 4.5.1 Package: bible-kjv diff --git a/debian/rules b/debian/rules index 4b585fa..bdde468 100755 --- a/debian/rules +++ b/debian/rules @@ -13,12 +13,17 @@ # dpkg-buildpackage in a package-independent way, and so these targets # are obsolete. +include /usr/share/dpkg/architecture.mk +-include /usr/share/dpkg/buildtools.mk + package=bible-kjv build: $(checkdir) - $(MAKE) all - cd debian && gcc -g -O2 -o randverse randverse.c + dpkg-architecture -a$(DEB_BUILD_ARCH) -f -c dh_auto_build -- bible-index.c bible.data bible.data.conc 'LD=$$(CC)' + rm -f *.o + dh_auto_build -- bible 'LD=$$(CC)' + cd debian && $(CC) -g -O2 -o randverse randverse.c touch build build-arch: build @@ -65,19 +70,10 @@ binary-arch: checkroot build install -d debian/tmp/usr/share/man/man1 install -d debian/tmp/usr/bin debian/tmp/usr/lib make install DEST=debian/tmp/usr - #Is nostrip set in DEB_BUILD_OPTIONS? - case "$$DEB_BUILD_OPTIONS" in \ - *nostrip*)\ - install -m 755 debian/randverse debian/tmp/usr/bin && \ - install -m 755 bible debian/tmp/usr/bin && \ - install -m 644 debian/randverse.1 debian/tmp/usr/share/man/man1 \ - ;; \ - *) \ - install -s -m 755 debian/randverse debian/tmp/usr/bin && \ - install -s -m 755 bible debian/tmp/usr/bin && \ - install -m 644 debian/randverse.1 debian/tmp/usr/share/man/man1 \ - ;; \ - esac + install -m 755 debian/randverse debian/tmp/usr/bin + install -m 755 bible debian/tmp/usr/bin + install -m 644 debian/randverse.1 debian/tmp/usr/share/man/man1 + dh_strip -p$(package) --tmpdir=debian/tmp cp debian/notes debian/copyright debian/tmp/usr/share/doc/$(package)/. cp debian/changelog debian/tmp/usr/share/doc/$(package)/changelog cp README* debian/README* debian/tmp/usr/share/doc/$(package) -- 2.30.2