summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2020-09-10 19:11:27 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2020-09-10 19:11:27 +0200
commit7e9455b3b15671ff99ed168638c405e2acedb6df (patch)
tree444e59ece236e09dc153f665e42160aeb0208c24 /debian/rules
parentbc8a517abd2e11e1435f4ef042cfcc8648b62ef7 (diff)
parentbce41b3c37c2a68e7dab234ce0247755a61ceb40 (diff)
Merge branch 'release/debian/1.0.31-1_experimental1' into masterdebian/1.0.31-1_experimental1
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules29
1 files changed, 23 insertions, 6 deletions
diff --git a/debian/rules b/debian/rules
index eac8ba3..8bab3c0 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 \
@@ -34,7 +48,7 @@ override_dh_auto_configure:
--datadir=\$${prefix}/share \
--mandir=\$${prefix}/share/man \
--docdir=\$${prefix}/share/doc/libsane \
- --disable-locking \
+ --enable-locking \
--enable-static \
--enable-pthread \
--with-gphoto2 \
@@ -49,8 +63,8 @@ override_dh_autoreconf:
override_dh_auto_build-indep:
# generate POT file for translators
- (cd po && make sane-backends.pot)
$(MAKE)
+ (cd po && make sane-backends.pot)
override_dh_auto_clean:
# Autoconf-generated files
@@ -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
@@ -75,6 +90,7 @@ override_dh_install-arch:
# Install the pkg-config file
mkdir -p debian/libsane-dev/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/
cp tools/sane-backends.pc debian/libsane-dev/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/
+ cp debian/sane-utils.logrotate debian/sane-utils/etc/logrotate.d/sane-utils
override_dh_install-indep:
dh_install
@@ -116,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