File: rules

package info (click to toggle)
sane-backends-extras 1.0.22.3
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 3,060 kB
  • ctags: 2,708
  • sloc: ansic: 27,680; sh: 10,433; makefile: 447
file content (48 lines) | stat: -rwxr-xr-x 1,431 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/make -f

DEB_HOST_MULTIARCH  ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
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

%:
	dh $@ --with=autotools_dev

override_dh_auto_configure:
	dh_auto_configure -- \
		--with-snmp=no \
		--disable-locking \
		--enable-static \
		--enable-pthread \
		--enable-libusb=yes \
		--enable-libusb_1_0 \
		--without-gphoto2

# udev file is currently not useful but leave as an example
override_dh_installudev:

# not really needed, but it thinks otherwise
override_dh_makeshlibs:

override_dh_install:
	dh_install
ifeq (kfreebsd,$(DEB_HOST_ARCH_OS))
	rm -f debian/libsane-extras-common/usr/share/man/man5/sane-geniusvp2.5
	rm -rf debian/libsane-extras-common/usr/share/doc/libsane-extras/geniusvp2
endif
	# remove wrong libsane.so.1 symlink
	rm -f debian/libsane-extras/usr/lib/$(DEB_HOST_MULTIARCH)/sane/libsane.so.1

	# remove damn rpath
	find debian/libsane-extras/usr/lib/$(DEB_HOST_MULTIARCH)/sane -name "libsane-*.so.1" -exec chrpath -d {} \;

	# install the dll.d config file
	install -d debian/libsane-extras/etc/sane.d/dll.d
	cp debian/dll.d/libsane-extras debian/libsane-extras/etc/sane.d/dll.d

override_dh_strip-arch:
	dh_strip --dbg-package=libsane-extras-dbg