#!/bin/sh # Set initial variables: CWD=`pwd` PKG=/tmp/package-seyon VERSION=2.20c ARCH=${ARCH:-x86_64} BUILD=${BUILD:-1} if [ "$ARCH" = "i386" ]; then SLKCFLAGS="-O2 -march=i386 -mcpu=i686" elif [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" SLKLDFLAGS="-L/usr/lib64" LIBSUFFIX=64 fi rm -rf $PKG mkdir -p $PKG cd /tmp rm -rf seyon-$VERSION tar xzvf $CWD/seyon-$VERSION.tar.gz cd seyon-$VERSION chown -R root.root . zcat $CWD/seyon-2.20c.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1 zcat $CWD/seyon.usleep.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1 zcat $CWD/seyon.bison-fix.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1 # Taken from Debian chmod 755 makever.sh xmkmf CFLAGS="$SLKCFLAGS" make make install DESTDIR=$PKG chown -R root.root $PKG/usr/bin ( 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/usr/doc/seyon-$VERSION cp -a \ 1-* COPYING \ $PKG/usr/doc/seyon-$VERSION chmod 644 $PKG/usr/doc/seyon-$VERSION/* mkdir -p $PKG/usr/doc/seyon-$VERSION/.seyon cp -a \ phonelist protocols script.CIS script.PCBoard script.QWK script.unix startup \ $PKG/usr/doc/seyon-$VERSION/.seyon chmod 644 $PKG/usr/doc/seyon-$VERSION/.seyon/* cat seyon.man | gzip -9c > /usr/X11R6/man/man1/seyon.1.gz mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG makepkg -l y -c n ../seyon-$VERSION-$ARCH-$BUILD.tgz # Clean up the extra stuff: if [ "$1" = "--cleanup" ]; then rm -rf /tmp/seyon-$VERSION rm -rf $PKG fi