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

# 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='cups libjpeg-turbo libtiff libusb v4l-utils'
SLACKDESC='sane-backend: sane-backend 2015.05 (Generic Scanner Driver)  
sane-backend:  
sane-backend: SANE is short for Scanner Access Now Easy. Scanner access; 
sane-backend: however, is far from easy, since every vendor has their own 
sane-backend: protocols. The only known protocol that should bring some unity 
sane-backend: into this chaos is the TWAIN interface, but this is too 
sane-backend: imprecise to allow a stable scanning framework. Therefore, SANE 
sane-backend: comes with its own protocol, and the vendor drivers can'\''t be 
sane-backend: used. This package contains drivers for the supported scanners 
sane-backend: and cameras.  
sane-backend: 
'

### default pkg_download
### default pkg_prepare
### default pkg_package
pkg_package() {
	rm -f etc/group # remove temporary group
}

### 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{,-64} &&
	ln -sfv multiarch_wrapper /usr/bin/sane-config

}


