### this file is sourced not run
PKGVER=2015.05
PKGBUILD=1
PKGARCH=i686

# BLFS 7.5 updated to latest git
TARBALL=sane-backends-2015.05.tar.bz2
MD5SUM=2ccc9610d6b0be1cc4ed28231786cecb
SRC_URL=http://distro.ibiblio.org/fatdog/source/700/$TARBALL
BUNDLE=

SLACKREQ='cups32 libjpeg-turbo32 libtiff32 libusb32 v4l-utils32'
SLACKDESC='sane-backend32: sane-backend32 2015.05 (Generic Scanner Driver)  
sane-backend32:  
sane-backend32: SANE is short for Scanner Access Now Easy. Scanner access; 
sane-backend32: however, is far from easy, since every vendor has their own 
sane-backend32: protocols. The only known protocol that should bring some unity 
sane-backend32: into this chaos is the TWAIN interface, but this is too 
sane-backend32: imprecise to allow a stable scanning framework. Therefore, SANE 
sane-backend32: comes with its own protocol, and the vendor drivers can'\''t be 
sane-backend32: used. This package contains drivers for the supported scanners 
sane-backend32: and cameras.  
sane-backend32: 
'

### default pkg_download
### default pkg_prepare
### package - only collect the libraries
pkg_package() {
	rm -f etc/group # remove temporary group
	rm -rf bin sbin usr/bin usr/sbin usr/include usr/share etc
	mkdir -p usr/bin &&
	mv -v tmp/*-32 usr/bin
}

### build
pkg_build() {
	echo "scanner::130:" >> /etc/group # make sure "scanner" group is defined
	CONFFLAGS="$CONFFLAGS --with-group=scanner --enable-libusb_1_0 \
		--with-docdir=/usr/share/doc/sane-backend-2015.05 --with-gphoto2=no"
	pkg_build_autoconf &&
	pkg_build_slackdesc &&
	install -m 644 -v tools/udev/libsane.rules           \
                  /etc/udev/rules.d/65-scanner.rules
    
    # multilib
	mv -v /usr/bin/sane-config /tmp/sane-config-32
}


