#!/bin/sh CWD=`pwd` TMP=${TMP:-/tmp} PKG=$TMP/package-abiword VERSION=2.4.6 ARCH=${ARCH:-i486} BUILD=G1 if [ ! -d $TMP ]; then mkdir -p $TMP # location to build the source fi rm -rf $PKG mkdir -p $PKG if [ "$ARCH" = "i386" ]; then SLKCFLAGS="-O2 -march=i386 -mcpu=i686" elif [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mcpu=i686" elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2" fi cd $TMP tar xzvf $CWD/abiword-$VERSION.tar.gz cd abiword-$VERSION ( cd abi if [ ! -r configure ]; then sh autogen.sh fi CFLAGS="$SLKCFLAGS" \ ./configure --prefix=/usr \ --disable-static \ --sysconfdir=/etc \ --localstatedir=/var/lib \ --enable-gnome \ --disable-static \ --enable-extra-optimization \ --enable-xft \ --with-libxml2 \ --enable-curl \ --disable-magick \ $ARCH-slackware-linux make make install DESTDIR=$PKG ) ( cd abiword-plugins if [ ! -r configure ]; then sh autogen.sh fi CFLAGS="$SLKCFLAGS" \ ./configure --prefix=/usr \ --disable-static \ --enable-gnome \ --enable-all \ $ARCH-slackware-linux make make install DESTDIR=$PKG ) chown -R root.bin $PKG/usr/bin mkdir -p $PKG/usr/share/pixmaps mv $PKG/usr/share/icons/abiword_48.png $PKG/usr/share/pixmaps ( cd $PKG/usr/share/icons/ ln -sf ../pixmaps/abiword_48.png . ) cd abi mkdir -p $PKG/usr/doc/abiword-$VERSION/docs cp -a BUILD.TXT BiDiReadme.txt COPYING CREDITS.TXT README.TXT \ COPYRIGHT.TXT \ $PKG/usr/doc/abiword-$VERSION cp -a \ docs/*.abw \ $PKG/usr/doc/abiword-$VERSION/docs find $PKG/usr/doc/abiword-$VERSION/ -type f -exec chmod 644 {} \; ( cd ../abiword-docs/man mkdir -p $PKG/usr/man/man8 cat abiword.8 | gzip -9c > $PKG/usr/man/man8/abiword.8.gz cd .. cp -a Manual/en/Abiword_Manual.abw $PKG/usr/doc/abiword-$VERSION/docs ) chown -R root.root $PKG/usr/doc/abiword-$VERSION/* mkdir $PKG/usr/share/applications cat abiword.desktop > $PKG/usr/share/applications/abiword.desktop find $PKG -type f | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded gzip -9 $PKG/usr/man/*/* mkdir -p $PKG/install cat $CWD/slack-required > $PKG/install/slack-required cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG makepkg -l y -c n $TMP/abiword-$VERSION-$ARCH-$BUILD.tgz # Clean up the extra stuff: if [ "$1" = "--cleanup" ]; then rm -rf $TMP/abiword-$VERSION rm -rf $PKG fi