#!/bin/sh # Set initial variables: CWD=`pwd` PKG=/tmp/package-ispell VERSION=3.2.06 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 ispell-$VERSION tar xzvf $CWD/ispell-$VERSION.tar.gz cd ispell-$VERSION zcat $CWD/ispell.diff.gz | patch -p1 --verbose || exit 1 zcat $CWD/ispell.destdir.diff.gz | patch -p1 --verbose || exit 1 if [ $LIBSUFFIX = 64 ]; then zcat $CWD/ispell.config64.diff.gz | patch -p1 --verbose || exit 1 fi make LIBDIR=/usr/lib$LIBSUFFIX make install DESTDIR=$PKG LIBDIR=$PKG/usr/lib$LIBSUFFIX make install ( cd /usr/lib$LIBSUFFIX/ispell ln -sf americanmed.hash american.hash ln -sf americanmed.hash english.hash ) 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/ispell-$VERSION cp -a \ Contributors Magiclines README WISHES \ $PKG/usr/doc/ispell-$VERSION chmod 644 $PKG/usr/doc/ispell-$VERSION/* gzip -9 $PKG/usr/man/man?/* mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG makepkg -l y -c n ../ispell-$VERSION-$ARCH-$BUILD.tgz # Clean up the extra stuff: if [ "$1" = "--cleanup" ]; then rm -rf /tmp/ispell-$VERSION rm -rf $PKG fi