#!/bin/sh CWD=`pwd` TMP=/tmp PKG=$TMP/package-flac VERSION=1.1.1 ARCH=alpha BUILD=1 TARGET=$ARCH-alphaslack-linux mkdir -p $PKG ( cd $TMP tar xzf $CWD/flac-$VERSION.tar.gz cd flac-$VERSION zcat $CWD/flac.man.diff.gz | patch -p1 --verbose --backup --suffix=.orig chown -R root.root . find . -perm 777 | xargs chmod 755 ./configure --prefix=/usr $TARGET make make install DESTDIR=$PKG # Adjust docs to traditional Slackware location: mv $PKG/usr/share/doc $PKG/usr rm $PKG/usr/doc/flac-$VERSION/FLAC.tag mv $PKG/usr/doc/flac-$VERSION/html/* $PKG/usr/doc/flac-$VERSION rmdir $PKG/usr/doc/flac-$VERSION/html # we're not putting 3MB of API docs in the binary package... ( cd $PKG/usr/doc/flac-$VERSION/api && rm -r * ) cat << EOF > $PKG/usr/doc/flac-$VERSION/api/README Full HTML based API documentation may be found in the FLAC source package. It is not included in the binary package due to size. EOF # Add a few more docs: cp -a AUTHORS COPYING* README $PKG/usr/doc/flac-$VERSION # Strip files ( cd $PKG find . -type f | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded ) gzip -9 $PKG/usr/man/man?/*.? chown -R root.bin $PKG/usr/bin mkdir $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG makepkg -l y -c n $TMP/flac-$VERSION-$ARCH-$BUILD.tgz ) 2>&1 | tee $TMP/flac.build.log