3fdad91bf9
Discussed with @chneukirchen.
140 lines
3.8 KiB
Bash
140 lines
3.8 KiB
Bash
# Template file for 'sane'
|
|
pkgname=sane
|
|
version=1.0.25
|
|
revision=1
|
|
wrksrc="sane-backends-${version}"
|
|
build_style=gnu-configure
|
|
build_options="snmp"
|
|
configure_args="--disable-locking --enable-avahi --disable-latex --enable-ipv6
|
|
--with-docdir=/usr/share/doc/sane --enable-libusb_1_0 --enable-pthread
|
|
$(vopt_with snmp)"
|
|
hostmakedepends="pkg-config"
|
|
makedepends="avahi-libs-devel libjpeg-turbo-devel tiff-devel libgphoto2-devel
|
|
v4l-utils-devel libusb-devel libressl-devel $(vopt_if snmp net-snmp-devel)"
|
|
depends="$(vopt_if snmp net-snmp)"
|
|
replaces="sane-udev-rules>=0"
|
|
conf_files="
|
|
/etc/sane.d/abaton.conf
|
|
/etc/sane.d/agfafocus.conf
|
|
/etc/sane.d/apple.conf
|
|
/etc/sane.d/artec.conf
|
|
/etc/sane.d/artec_eplus48u.conf
|
|
/etc/sane.d/avision.conf
|
|
/etc/sane.d/bh.conf
|
|
/etc/sane.d/canon.conf
|
|
/etc/sane.d/canon630u.conf
|
|
/etc/sane.d/canon_dr.conf
|
|
/etc/sane.d/cardscan.conf
|
|
/etc/sane.d/coolscan.conf
|
|
/etc/sane.d/coolscan2.conf
|
|
/etc/sane.d/coolscan3.conf
|
|
/etc/sane.d/dc25.conf
|
|
/etc/sane.d/dc210.conf
|
|
/etc/sane.d/dc240.conf
|
|
/etc/sane.d/dell1600n_net.conf
|
|
/etc/sane.d/dll.conf
|
|
/etc/sane.d/dmc.conf
|
|
/etc/sane.d/epjitsu.conf
|
|
/etc/sane.d/epson.conf
|
|
/etc/sane.d/epson2.conf
|
|
/etc/sane.d/epsonds.conf
|
|
/etc/sane.d/fujitsu.conf
|
|
/etc/sane.d/genesys.conf
|
|
/etc/sane.d/gphoto2.conf
|
|
/etc/sane.d/gt68xx.conf
|
|
/etc/sane.d/hp.conf
|
|
/etc/sane.d/hp3900.conf
|
|
/etc/sane.d/hp4200.conf
|
|
/etc/sane.d/hp5400.conf
|
|
/etc/sane.d/hs2p.conf
|
|
/etc/sane.d/ibm.conf
|
|
/etc/sane.d/kodak.conf
|
|
/etc/sane.d/kodakaio.conf
|
|
/etc/sane.d/leo.conf
|
|
/etc/sane.d/lexmark.conf
|
|
/etc/sane.d/ma1509.conf
|
|
/etc/sane.d/magicolor.conf
|
|
/etc/sane.d/matsushita.conf
|
|
/etc/sane.d/microtek.conf
|
|
/etc/sane.d/microtek2.conf
|
|
/etc/sane.d/mustek.conf
|
|
/etc/sane.d/mustek_usb.conf
|
|
/etc/sane.d/nec.conf
|
|
/etc/sane.d/net.conf
|
|
/etc/sane.d/p5.conf
|
|
/etc/sane.d/pie.conf
|
|
/etc/sane.d/pieusb.conf
|
|
/etc/sane.d/pixma.conf
|
|
/etc/sane.d/plustek.conf
|
|
/etc/sane.d/plustek_pp.conf
|
|
/etc/sane.d/ricoh.conf
|
|
/etc/sane.d/rts8891.conf
|
|
/etc/sane.d/s9036.conf
|
|
/etc/sane.d/saned.conf
|
|
/etc/sane.d/sceptre.conf
|
|
/etc/sane.d/sharp.conf
|
|
/etc/sane.d/sm3840.conf
|
|
/etc/sane.d/snapscan.conf
|
|
/etc/sane.d/sp15c.conf
|
|
/etc/sane.d/st400.conf
|
|
/etc/sane.d/stv680.conf
|
|
/etc/sane.d/tamarack.conf
|
|
/etc/sane.d/teco1.conf
|
|
/etc/sane.d/teco2.conf
|
|
/etc/sane.d/teco3.conf
|
|
/etc/sane.d/test.conf
|
|
/etc/sane.d/u12.conf
|
|
/etc/sane.d/umax.conf
|
|
/etc/sane.d/umax1220u.conf
|
|
/etc/sane.d/umax_pp.conf
|
|
/etc/sane.d/v4l.conf
|
|
/etc/sane.d/xerox_mfp.conf"
|
|
short_desc="Scanner Access Now Easy"
|
|
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
|
homepage="http://www.sane-project.org/"
|
|
license="GPL-2"
|
|
distfiles="http://ftp.lfs-matrix.net/pub/blfs/conglomeration/sane-backends/sane-backends-${version}.tar.gz"
|
|
checksum=a4d7ba8d62b2dea702ce76be85699940992daf3f44823ddc128812da33dc6e2c
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
# musl provides ioperm but not inb/outb for any arch expect
|
|
# i386/x32/x86_64 (using bits/io.h included in sys/io.h).
|
|
# Then, qcam backend is disabled for arm arch.
|
|
armv[67]l-musl) ;;
|
|
*) conf_files+=" /etc/sane.d/qcam.conf";;
|
|
esac
|
|
|
|
post_install() {
|
|
# fix hp officejets
|
|
echo "#hpaio" >> ${DESTDIR}/etc/sane.d/dll.conf
|
|
|
|
vinstall ${FILESDIR}/saned.xinetd 644 etc/xinetd.d saned.conf
|
|
vinstall ${wrksrc}/tools/sane-backends.pc 644 usr/lib/pkgconfig
|
|
|
|
# generate udev file
|
|
cd tools
|
|
mkdir -p udev
|
|
make udev/libsane.rules
|
|
# install udev file
|
|
vinstall udev/libsane.rules 644 usr/lib/udev/rules.d 49-sane.rules
|
|
# fix udev rules
|
|
sed -i 's|NAME="%k", ||g' ${DESTDIR}/usr/lib/udev/rules.d/49-sane.rules
|
|
}
|
|
|
|
libsane_package() {
|
|
short_desc+=" - runtime shared library"
|
|
pkg_install() {
|
|
vmove usr/lib/libsane.so.*
|
|
}
|
|
}
|
|
sane-devel_package() {
|
|
depends="libsane>=${version}_${revision}"
|
|
short_desc+=" - development files"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove usr/bin/sane-config
|
|
vmove usr/share/man/man1/sane-config.1
|
|
vmove usr/lib/pkgconfig
|
|
vmove usr/lib/*.so
|
|
}
|
|
}
|