#!/bin/sh CWD=`pwd` TMP=/tmp PKG=$TMP/package-sane BACKVER=1.0.18 FRONTVER=1.0.14 ARCH=alpha BUILD=1 TARGET=$ARCH-alphaslack-linux #Make the sane-backends mkdir -p $PKG ( cd $TMP tar xzf $CWD/sane-backends-$BACKVER.tar.gz cd sane-backends-$BACKVER chown -R root.root . ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/man \ --infodir=/usr/info \ $TARGET || exit make || exit make install make install DESTDIR=$PKG # Make the sane-frontends cd $TMP tar xzf $CWD/sane-frontends-$FRONTVER.tar.gz cd sane-frontends-$FRONTVER chown -R root.root . ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/man \ --infodir=/usr/info \ $TARGET || exit make || exit make install DESTDIR=$PKG # Move config files: ( cd $PKG/etc/sane.d for file in *.conf ; do mv $file ${file}.new done ) # gzip man-files strip files gzip -9 $PKG/usr/man/man?/* # strip remaining files ( cd $PKG find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null ) mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh cd $PKG makepkg -l y -c n $TMP/sane-$BACKVER-$ARCH-$BUILD.tgz ) 2>&1 | tee $TMP/sane.build.log