aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/sane/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'unmaintained/sane/APKBUILD')
-rw-r--r--unmaintained/sane/APKBUILD164
1 files changed, 100 insertions, 64 deletions
diff --git a/unmaintained/sane/APKBUILD b/unmaintained/sane/APKBUILD
index a6fee51fd3..a093fefb83 100644
--- a/unmaintained/sane/APKBUILD
+++ b/unmaintained/sane/APKBUILD
@@ -1,79 +1,115 @@
# Contributor: Fabio Riga <rifabio@dpersonam.me>
-# Maintainer:
+# Contributor: Valery Kartel <valery.kartel@gmail.com>
+# Maintainer: Valery Kartel <valery.kartel@gmail.com>
pkgname=sane
-pkgver=1.0.24
-pkgrel=1
-pkgdesc="Scanner Access Now Easy"
+pkgver=1.0.25
+pkgrel=0
+pkgdesc="Scanner Access Now Easy - an universal scanner interface"
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
+depends_dev=""
+makedepends="libtool libusb-dev v4l-utils-dev net-snmp-dev avahi-dev libjpeg-turbo-dev tiff-dev libgphoto2-dev"
+install="$pkgname-saned.pre-install $pkgname.pre-install"
+pkgusers="saned"
+pkggroups="scanner"
+_backends="abaton agfafocus apple artec artec_eplus48u as6e avision bh canon canon630u canon_dr cardscan
+ coolscan coolscan2 coolscan3 dc25 dc210 dc240 dell1600n_net dmc epjitsu epson epson2 epsonds
+ fujitsu genesys gphoto2 gt68xx hp hp3500 hp3900 hp4200 hp5400 hp5590 hpljm1005 hs2p ibm kodak kodakaio
+ kvs1025 kvs20xx kvs40xx leo lexmark ma1509 magicolor matsushita microtek microtek2 mustek mustek_usb
+ mustek_usb2 nec net niash pie pieusb pixma plustek plustek_pp qcam ricoh rts8891 s9036 sceptre sharp sm3600
+ sm3840 snapscan sp15c st400 stv680 tamarack teco1 teco2 teco3 test u12 umax umax_pp umax1220u xerox_mfp p5"
+_pkgdesc_dell1600n_net="SANE backend for Dell 1600n that supports colour and monochrome scans over ethernet, usb not supported"
+for _backend in $_backends; do
+ subpackages="$subpackages $pkgname-backend-$_backend:_backend"
+done
+subpackages="$pkgname-doc $pkgname-dev $subpackages $pkgname-utils $pkgname-saned"
+source="https://alioth.debian.org/frs/download.php/file/4146/$pkgname-backends-$pkgver.tar.gz
+ $pkgname-saned.initd
+ include.patch
+ network.patch
+ pidfile.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
-}
+builddir="$srcdir"/$pkgname-backends-$pkgver
build() {
- cd "$_builddir"
+ 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
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --with-docdir=/usr/share/doc/$pkgname \
+ --enable-avahi \
+ --enable-libusb_1_0 \
+ --disable-rpath \
+ --disable-locking \
+ || return 1
+ make || return 1
}
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
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ echo -n "" > "$pkgdir"/etc/$pkgname.d/dll.conf
+ install -Dm644 backend/dll.aliases "$pkgdir"/etc/$pkgname.d/dll.aliases
+ install -Dm644 tools/udev/lib$pkgname.rules \
+ "$pkgdir"/usr/lib/udev/rules.d/49-$pkgname.rules
+ sed -i 's|NAME="%k", ||g' "$pkgdir"/usr/lib/udev/rules.d/49-$pkgname.rules
+}
+
+saned() {
+ local name=${subpkgname#$pkgname-}
+ pkgdesc="$pkgdesc (network scanner server)"
+ mkdir -p "$subpkgdir"/etc/$pkgname.d "$subpkgdir"/usr
+ mv "$pkgdir"/etc/$pkgname.d/$name.conf "$subpkgdir"/etc/$pkgname.d
+ mv "$pkgdir"/usr/sbin "$subpkgdir"/usr/
+ install -Dm755 "$srcdir"/$pkgname-$name.initd "$subpkgdir"/etc/init.d/$name
+}
+
+utils() {
+ pkgdesc="$pkgdesc (utilities)"
+ mkdir -p "$subpkgdir"/usr
+ mv "$pkgdir"/usr/bin "$subpkgdir"/usr
+ rm -fr "$pkgdir"/usr/share
+}
+
+_backend() {
+ local name=${subpkgname#$pkgname-backend-}
+ depends="$pkgname"
+ pkgdesc=$(eval echo \$_pkgdesc_$name)
+ if [ ! "$pkgdesc" ]; then
+ # cut description from man-page
+ pkgdesc=$(tr '\n' ' ' < "$builddir"/doc/$pkgname-$name.man)
+ pkgdesc=${pkgdesc#*\- }
+ pkgdesc=${pkgdesc%% .SH *};
+ fi
+ mkdir -p "$subpkgdir"/usr/lib/$pkgname \
+ "$subpkgdir"/etc/$pkgname.d/dll.d
+ mv "$pkgdir"/usr/lib/$pkgname/lib$pkgname-$name.* \
+ "$subpkgdir"/usr/lib/$pkgname || return 1
+ echo "$name" > "$subpkgdir"/etc/$pkgname.d/dll.d/$name
+ if [ -f "$pkgdir"/etc/$pkgname.d/$name.conf ]; then
+ mv "$pkgdir"/etc/$pkgname.d/$name.conf \
+ "$subpkgdir"/etc/$pkgname.d
+ fi
+ if [ -f "$pkgdir"/usr/bin/$name ]; then
+ mkdir -p "$subpkgdir"/usr/bin
+ mv "$pkgdir"/usr/bin/$name "$subpkgdir"/usr/bin
+ fi
}
-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"
+md5sums="f9ed5405b3c12f07c6ca51ee60225fe7 sane-backends-1.0.25.tar.gz
+042bb035974918365e83568fd3a285df sane-saned.initd
+bc249a3ab2f9cdd12443831b5a999469 include.patch
+9084841146b6d10b957c60594f707937 network.patch
+f266a1ec6db5461e39531acf509738a4 pidfile.patch"
+sha256sums="a4d7ba8d62b2dea702ce76be85699940992daf3f44823ddc128812da33dc6e2c sane-backends-1.0.25.tar.gz
+a3885af89b86b827d491ac67a78321e8bb9d9a05cb652c1a046986217b1e28b0 sane-saned.initd
+4112c9d6a9d7b9a3ac836e02c4617a71c0519451faf1138ee1038db8cc3422df include.patch
+8400ed2fb2109447eb9d4e343e2964ece964ba5999b2eb6553762e9c984092c3 network.patch
+8d81005e5b350b109e186c8fa267f9938a8c35b8bbf353534e99aadd4261da8f pidfile.patch"
+sha512sums="b9548646fff13558a4da4a4e9e8bad730f05121bcc65b72d24ded3bfddc6fe574e08c39c8651544b8fbfeab036fffd76cc14d76ef5d5d47e7513a2ce3afcc9df sane-backends-1.0.25.tar.gz
+0a06eaa28b345202f2bdf8361e06f843bb7a010b7d8f80132f742672c94249c43f64031cefa161e415e2e2ab3a53b23070fb63854283f9e040f5ff79394ac7d1 sane-saned.initd
+1779ff8beb1ba5f9238c25d819a7f0045f7e257c19b511315feb85650e445ca86450a9e1d7ff8650499d3dae808589a6c2e358d5f3f39a3f40ce4999179b86d6 include.patch
+9cb595841f59b5105ecc85e4c0ad8781c52caa2354fb823c920ec467e88afbe47f2b3f4a7a3980bef5dbf22983c5786f051a9d10aea97b4bf7c4a05378592029 network.patch
+09505943f9441854a6c333f19e2535b4a646a8cc060fe82c6261e7d29c72773ebe98d43a91acc951f4336a3c8b4c84ab7c7b0763426136b4b59d9546bc2fa8c0 pidfile.patch"