From d07f65467bb1191b071975c35252405d0af63511 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Fri, 28 Aug 2020 13:10:52 +0200 Subject: Fix FTCBFS --- debian/rules | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'debian/rules') diff --git a/debian/rules b/debian/rules index 4d9b6e1..d798b9e 100755 --- a/debian/rules +++ b/debian/rules @@ -23,10 +23,24 @@ endif %: dh $@ +ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH)) +SANE_DESC = $(CURDIR)/tools/sane-desc +else +SANE_DESC = $(CURDIR)/debian/sane-desc +endif + override_dh_auto_configure: autoconf - dh_auto_configure -- --host=$(DEB_HOST_GNU_TYPE) \ - --build=$(DEB_BUILD_GNU_TYPE) \ +ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH)) + dpkg-architecture -f "-a$(DEB_BUILD_ARCH)" -c dh_auto_configure + $(MAKE) -C $(CURDIR)/lib liblib.la + $(MAKE) -C $(CURDIR)/sanei libsanei.la + $(MAKE) -C $(CURDIR)/tools sane-desc + mv $(CURDIR)/tools/sane-desc $(CURDIR)/debian/sane-desc + $(RM) include/byteorder.h include/_stdint.h + dh_auto_clean +endif + dh_auto_configure -- \ --prefix=/usr \ --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \ --sysconfdir=/etc \ @@ -59,6 +73,7 @@ override_dh_auto_clean: [ ! -f Makefile ] || $(MAKE) distclean $(RM) debian/libsane1.udev dh_auto_clean + $(RM) $(SANE_DESC) override_dh_auto_install-arch: $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp @@ -117,8 +132,9 @@ override_dh_installudev-arch: ifeq (linux,$(DEB_HOST_ARCH_OS)) # udev support # Generate the udev rules file - $(CURDIR)/tools/sane-desc -s $(CURDIR)/doc/descriptions -m udev+hwdb > $(CURDIR)/debian/libsane1.udev - $(CURDIR)/tools/sane-desc -s $(CURDIR)/doc/descriptions -m hwdb > $(CURDIR)/debian/20-sane.hwdb + $(SANE_DESC) -s $(CURDIR)/doc/descriptions -m udev+hwdb > $(CURDIR)/debian/libsane1.udev + $(SANE_DESC) -s $(CURDIR)/doc/descriptions -m hwdb > $(CURDIR)/debian/20-sane.hwdb + cp $(CURDIR)/debian/20-sane.hwdb $(CURDIR)/debian/libsane1/lib/udev/hwdb.d/ dh_installudev endif -- cgit v1.2.3