#!/bin/sh # Heavily based on the Slackware 12.2 SlackBuild # http://www.w3.org/Amaya # http://www.slacky.it CWD=`pwd` TMP=${TMP:-/tmp/tgz} PKG=$TMP/package-amaya rm -rf $PKG mkdir -p $PKG/usr/{bin,share/applications} NAME=amaya VERSION=11.1 SRCNAME=$NAME-sources-$VERSION ARCH=${ARCH:-i486} TARGET=$ARCH-slackware-linux BUILD=1bj SOURCE=http://www.w3.org/Amaya/Distribution/$SRCNAME.tgz if [ ! -e $SRCNAME.tgz ]; then wget -c $SOURCE fi cd $TMP rm -rf Amaya* tar xzvf $CWD/amaya-sources-11.1.tgz cd Amaya11.1/Amaya chown -R root:root . (mkdir WX ; cd WX ../configure \ --prefix=/usr/share \ --program-prefix= \ --program-suffix= \ --disable-debug \ --build=${TARGET} # replace-flags sed -i.back \ -e "s|CFLAGS= -O2|CFLAGS= -O2 -march=i486 -mtune=i686|g" \ -e "s|CXXFLAGS= -O2|CXXFLAGS= -O2 -march=i486 -mtune=i686|g" Options.orig make make install prefix=$PKG/usr/share cd $PKG/usr/bin ; ln -sf ../share/Amaya/wx/bin/amaya amaya rm -rf $PKG/usr/share/bin ) cat > $PKG/usr/share/applications/amaya.desktop < /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 cat $CWD/slack-desc > $PKG/usr/doc/$NAME-$VERSION/slack-desc cat $CWD/$NAME.SlackBuild > $PKG/usr/doc/$NAME-$VERSION/$NAME.SlackBuild requiredbuilder -y -v -s $CWD $PKG makepkg -l y -c n $CWD/$NAME-$VERSION-$ARCH-$BUILD.tgz if [ "$1" = "--cleanup" ]; then rm -rf $TMP fi