aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/sane/APKBUILD
blob: a6fee51fd304b955ad71fd22ed5a32ac53971ac3 (plain)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# Contributor: Fabio Riga <rifabio@dpersonam.me>
# Maintainer:
pkgname=sane
pkgver=1.0.24
pkgrel=1
pkgdesc="Scanner Access Now Easy"
url="http://www.sane-project.org/"
arch="all"
license="GPL"
depends=""
depends_dev="tiff-dev libjpeg-turbo-dev libgphoto2-dev libusb-dev cups-dev
	v4l-utils-dev avahi-dev bash net-snmp-dev"
makedepends="$depends_dev"
install=""
subpackages="$pkgname-dbg $pkgname-dev $pkgname-doc"
source="https://alioth.debian.org/frs/download.php/file/3958/$pkgname-backends-$pkgver.tar.gz
	10-network.patch
	20-segfault-avahi-fix-kodakio.patch
	30-musl-header-fixes.patch
	"

_builddir="${srcdir}/${pkgname}-backends-${pkgver}"
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	./configure \
		--prefix=/usr \
		--sbindir=/usr/bin \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--with-docdir=/usr/share/doc/sane \
		--enable-avahi \
		--enable-pthread \
		--disable-rpath \
		--disable-latex \
		--enable-libusb_1_0 \
		--disable-locking \
		|| return 1

	make
}

package() {
	cd "$_builddir"
        make DESTDIR="${pkgdir}" install
        # fix hp officejets
        echo "#hpaio" >> "${pkgdir}/etc/sane.d/dll.conf"
        # install udev files
        install -D -m0644 tools/udev/libsane.rules \
          "${pkgdir}/usr/lib/udev/rules.d/49-sane.rules"
        # fix udev rules
        sed -i 's|NAME="%k", ||g' "${pkgdir}/usr/lib/udev/rules.d/49-sane.rules"
        # Install the pkg-config file
        install -D -m644 tools/sane-backends.pc \
            "${pkgdir}/usr/lib/pkgconfig/sane-backends.pc"
        # Remove libtool files
}

md5sums="1ca68e536cd7c1852322822f5f6ac3a4  sane-backends-1.0.24.tar.gz
9084841146b6d10b957c60594f707937  10-network.patch
039524a38af8721f2e97d45e889295ca  20-segfault-avahi-fix-kodakio.patch
dd5c05ee306a1ca2cd4cbb0149997007  30-musl-header-fixes.patch"
sha256sums="27c7085a54f1505d8b551e6f1e69d30e1ee57328b18429bb2225dabf4c45462d  sane-backends-1.0.24.tar.gz
8400ed2fb2109447eb9d4e343e2964ece964ba5999b2eb6553762e9c984092c3  10-network.patch
91e01450f87d52fa82e5e0e112a3ac7f5355f5a133467b8a38d0e1f52e94d25a  20-segfault-avahi-fix-kodakio.patch
3147e7011d64297f6fa0229a51f5451fee151ccfe09dd2cc05d9feaf2f45fcf2  30-musl-header-fixes.patch"
sha512sums="1e9f962bb9d27f17067eb662dabfc0a1aa0d06e16bec4bd28868124b468578d82f14f6d2c1f5de63d2cec57ca4584ec12d3b2c2b1de20f1199aece581453ebc5  sane-backends-1.0.24.tar.gz
9cb595841f59b5105ecc85e4c0ad8781c52caa2354fb823c920ec467e88afbe47f2b3f4a7a3980bef5dbf22983c5786f051a9d10aea97b4bf7c4a05378592029  10-network.patch
43e91fe2452eca4fbfbd256aae3f44a28674af7210f59b60b34c1149f0cd208318678a810313aabff84f18bb712982e10ae320ef3179b6437e413adda6298fbe  20-segfault-avahi-fix-kodakio.patch
f7a2ce1826a967fdd1ee8e2bfa2080e79547564dec28012cc8fcc3955730eac8a352d55e1b2478e6092bd968f17745feb81ce8462ccd582a2282ff572c46e351  30-musl-header-fixes.patch"