chiark / gitweb /
Patch from Helmut Grohne to fix FTCBFS: (Closes: #947616)
authorMatthew Vernon <matthew@debian.org>
Sun, 21 Feb 2021 16:07:29 +0000 (16:07 +0000)
committerMatthew Vernon <matthew@debian.org>
Sun, 21 Feb 2021 16:07:29 +0000 (16:07 +0000)
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
debian/rules

index 7a6f793f9b0d8366a34c0c2b0f9fa72e33d41404..15a1e1c654685f878ae1214efd119c5e45ad670c 100644 (file)
@@ -2,7 +2,7 @@ Source: bible-kjv
 Section: doc
 Priority: optional
 Maintainer: Matthew Vernon <matthew@debian.org>
-Build-Depends: libreadline-dev
+Build-Depends: libreadline-dev, debhelper-compat (= 9)
 Standards-Version: 4.5.1
 
 Package: bible-kjv
index 4b585fa48f1fc32e6fa808e755d84439ea09438b..bdde4683cd2abd6206f169b4bc28a8d818726196 100755 (executable)
 # 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)