#!/bin/sh PKGNAM=sane VERSION=1.0.19 BACKVER=1.0.19 FRONTVER=1.0.14 BUILD=${BUILD:-1} . /etc/pkghelpers pkghelpers_env rm -rf $PKG mkdir -p $PKG # First, we'll build the backends cd $TMP rm -rf sane-backends-$BACKVER tar xjvf $CWD/sane-backends-$BACKVER.tar.bz2 cd sane-backends-$BACKVER pkghelpers_permissions CFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ --libdir=/usr/lib$LIBSUFFIX \ --sysconfdir=/etc \ --mandir=/usr/man \ --with-docdir=/usr/doc/sane-$VERSION \ --localstatedir=/var/lib \ --enable-locking \ --with-lockdir=/var/lock/sane \ --with-group=scanner \ --build=$ARCH-$DISTRO-linux make -j6 || exit 1 make install || exit 1 make install DESTDIR=$PKG || exit 1 # Add the default udev rules, and until it's handled upstream, # fix their syntax work with recent versions of udev mkdir -p $PKG/etc/udev/rules.d sed s/SYSFS/ATTRS/g tools/udev/libsane.rules \ > $PKG/etc/udev/rules.d/80-libsane.rules # Add the hal fdi file mkdir -p $PKG/usr/share/hal/fdi/policy/10osvendor/ cat tools/hal/libsane.fdi \ > $PKG/usr/share/hal/fdi/policy/10osvendor/10-libsane.fdi # Now let's build the frontends cd $TMP rm -rf sane-frontends-$FRONTVER tar xjvf $CWD/sane-frontends-$FRONTVER.tar.bz2 cd sane-frontends-$FRONTVER pkghelpers_permissions CFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ --libdir=/usr/lib$LIBSUFFIX \ --sysconfdir=/etc \ --mandir=/usr/man \ --with-docdir=/usr/doc/sane-$VERSION \ --build=$ARCH-$DISTRO-linux make -j6 || exit 1 make install || exit 1 make install DESTDIR=$PKG || exit 1 # List additional backends in /etc/sane.d/dll.conf. # I don't think it will hurt anything to do this, even # if these backends turn out not to be available: zcat $CWD/dll.conf.additions.gz >> $PKG/etc/sane.d/dll.conf # Move config files: ( cd $PKG/etc/sane.d for file in *.conf ; do mv $file ${file}.new done ) rm -f /etc/sane.d/*.conf mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh cd $PKG pkghelpers_fixup pkghelpers_makepkg