#!/bin/sh CWD=`pwd` TMP=/tmp PKG=$TMP/package-amp VERSION=0.7.6 ARCH=alpha BUILD=3 TARGET=$ARCH-alphaslack-linux rm -rf $PKG mkdir -p $PKG ( cd $TMP rm -rf amp-$VERSION tar xzf $CWD/amp-$VERSION.tar.gz cd amp-$VERSION zcat $CWD/guicontrol.c.diff.gz | patch -p0 --verbose || exit ./configure \ --prefix=/usr \ --build=$TARGET make || exit mkdir -p $PKG/usr/{doc/amp-$VERSION,bin,man/man1} cat amp > $PKG/usr/bin/amp chown root:bin $PKG/usr/bin/amp chmod 0755 $PKG/usr/bin/amp cat amp.1 | gzip -9c > $PKG/usr/man/man1/amp.1.gz cp -a BUGS CHANGES README TODO doc/jukebox.txt doc/layer2.txt doc/linuxrealtime.txt doc/BeOS.txt $PKG/usr/doc/amp-$VERSION chown -R root.root $PKG/usr/doc/amp-$VERSION chmod 644 $PKG/usr/doc/amp-$VERSION/* ( 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 cd $PKG makepkg -l y -c n $TMP/amp-$VERSION-$ARCH-$BUILD.tgz ) 2>&1 | tee $TMP/amp.build.log