]> git.donarmstrong.com Git - unscd.git/commitdiff
Fix FTCBFS: Build twice for help2man and cross. (Closes: #902291)
authorDon Armstrong <don@donarmstrong.com>
Sat, 13 Oct 2018 17:08:35 +0000 (10:08 -0700)
committerDon Armstrong <don@donarmstrong.com>
Sat, 13 Oct 2018 17:08:35 +0000 (10:08 -0700)
debian/changelog
debian/rules

index 0b22710ba7ca984f335efbdac074e75bd0b5afcd..041247bee8e803d4a2b4616f4e31e56b06b67548 100644 (file)
@@ -8,6 +8,9 @@ unscd (0.53-2) unstable; urgency=medium
   * Let systemctl help find the man page.
   * Switch to HTTPS in the watch file.
 
+  [ Thanks to Helmut Grohne]
+  * Fix FTCBFS: Build twice for help2man and cross. (Closes: #902291)
+
   [ Don Armstrong ]
   * Integrate patches from Ferenc
 
index c29b81548401c68ed879f07e4dc064bcb7862a21..29c7baf8cb84f795d7d7fab15290b1551b35a199 100755 (executable)
@@ -2,6 +2,10 @@
 
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
+include /usr/share/dpkg/architecture.mk
+-include /usr/share/dpkg/buildtools.mk
+CC_FOR_BUILD ?= $(CC)
+
 %:
        dh $@
 
@@ -10,12 +14,15 @@ override_dh_auto_clean:
        dh_auto_clean
 
 override_dh_auto_build:
-       gcc $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o nscd nscd.c -lsystemd
+       $(CC_FOR_BUILD) $(CFLAGS) $(LDFLAGS) -o nscd nscd.c -lsystemd
        help2man --name 'nscd which does not hang' \
                --include debian/help2man \
                --no-info \
                ./nscd > debian/unscd.man
        ln -fs unscd.man debian/nscd.man
+ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+       $(CC) $(CFLAGS) $(LDFLAGS) -o nscd nscd.c
+endif
 
 override_dh_auto_install:
        install -d debian/unscd/usr/sbin/