summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-11-12 13:54:12 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-11-12 13:54:12 +0100
commitdea49f00449b6f64b29dc7afd400a219ea7bc4ab (patch)
treeec8a5bf4f74a3d88b45d5849a02bd70529e17a23 /debian/rules
parentaebef15eb84193642aa42e3dcaacada6b825b006 (diff)
parent9ec2719599329a797985443f8f32150e62a718c2 (diff)
Merge branch 'release/experimental/1.0.27-1_experimental3'experimental/1.0.27-1_experimental3
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules58
1 files changed, 24 insertions, 34 deletions
diff --git a/debian/rules b/debian/rules
index ad09a43..293d798 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,20 +4,7 @@
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
-DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
-DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
-DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
-
-VERSION = $(shell head -n1 debian/changelog | sed -e 's/.*(//;s/-.*).*//;s/\+/\-/')
-
-ifeq ($(DEB_HOST_ARCH_OS),)
- DEB_HOST_ARCH_OS := $(subst -gnu,,$(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM))
- ifeq ($(DEB_HOST_ARCH_OS),gnu)
- DEB_HOST_ARCH_OS := hurd
- endif
-endif
+include /usr/share/dpkg/default.mk
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
CFLAGS += -g
@@ -62,8 +49,7 @@ override_dh_auto_clean:
$(RM) include/byteorder.h include/_stdint.h
# Add here commands to clean up after the build process.
[ ! -f Makefile ] || $(MAKE) distclean
- $(RM) debian/libsane-common.install
- $(RM) debian/libsane.udev
+ $(RM) debian/libsane1.udev
dh_auto_clean
override_dh_auto_install-arch:
@@ -72,24 +58,33 @@ override_dh_auto_install-arch:
$(RM) debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/sane/libsane.so.1
# remove libsane-dll, same as regular libsane
$(RM) debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/sane/libsane-dll.*
- # install only the manpages for the backends which have been built
- cp debian/libsane-common.install.in debian/libsane-common.install
- ls debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/sane/*.so | sed -e \
- "s#.*/lib\([^.]\+\)[.]so#usr/share/man/man5/\1.5#" | { while read mp; do \
- test -e debian/tmp/$$mp && echo $$mp >> debian/libsane-common.install; done }
+
+override_dh_auto_install-indep:
+ dh_auto_install
override_dh_install-arch:
dh_install
+ # 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/
+
+override_dh_install-indep:
+ dh_install
# Install HAL fdi file
mkdir -p $(CURDIR)/debian/libsane-common/usr/share/hal/fdi/preprobe/10osvendor
$(CURDIR)/tools/sane-desc -s $(CURDIR)/doc/descriptions -m hal-new > \
$(CURDIR)/debian/libsane-common/usr/share/hal/fdi/preprobe/10osvendor/20-libsane.fdi
- # 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/
- #
- mkdir -p $(CURDIR)/debian//sane-utils/usr/share/man/man5/
- cp $(CURDIR)/doc/sane-umax_pp.man $(CURDIR)/debian/sane-utils/usr/share/man/man5/umax_pp.5
+
+override_dh_installman-indep:
+ dh_installman
+ # remove man files from package sane-utils
+ $(RM) $(CURDIR)/debian/libsane-common/usr/share/man/man1/gamma4scanimage.1
+ $(RM) $(CURDIR)/debian/libsane-common/usr/share/man/man1/sane-find-scanner.1
+ $(RM) $(CURDIR)/debian/libsane-common/usr/share/man/man1/scanimage.1
+ $(RM) $(CURDIR)/debian/libsane-common/usr/share/man/man5/sane-umax_pp.5
+ $(RM) -r $(CURDIR)/debian/libsane-common/usr/share/man/man8/
+ # remove manpages for not build libs
+ $(RM) $(CURDIR)/debian/libsane-common/usr/share/man/man5/sane-v4l.5
override_dh_installdocs-arch:
dh_installdocs
@@ -98,8 +93,6 @@ override_dh_installdocs-arch:
override_dh_installdocs-indep:
dh_installdocs
- # create the /etc/sane.d/dll.d directory in libsane-common
- install -d debian/libsane-common/etc/sane.d/dll.d
# Platform-specific documentation
$(RM) debian/libsane-common/etc/sane.d/saned.conf
ifeq (kfreebsd,$(DEB_HOST_ARCH_OS))
@@ -113,7 +106,6 @@ 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+acl > $(CURDIR)/debian/libsane1.udev
$(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
cp $(CURDIR)/debian/20-sane.hwdb $(CURDIR)/debian/libsane1/lib/udev/hwdb.d/
@@ -129,9 +121,7 @@ override_dh_installinit-arch:
dh_installinit -psane-utils --name=saned
override_dh_systemd_enable-arch:
- dh_systemd_enable --no-enable saned.socket
+ dh_systemd_enable --no-enable debian/saned.socket
override_dh_makeshlibs-arch:
- dh_makeshlibs -- -v$(VERSION) -Pdebian/libsane1 -plibsane1
- # Empty dependency_libs in all .la files
- #find debian -name "*.la" -type f -exec sed -i "/dependency_libs/ s/'.*'/''/" -i {} \;
+ dh_makeshlibs -- -v$(DEB_VERSION_UPSTREAM) -Pdebian/libsane1 -plibsane1