#!/bin/sh CWD=`pwd` if [ "$TMP" = "" ]; then TMP=/tmp fi PKG=$TMP/package-expat VERSION=1.95.6 ARCH=sparc BUILD=1 if [ ! -d $TMP ]; then mkdir -p $TMP # location to build the source fi rm -rf $PKG mkdir -p $PKG # place for the package to be built cd $TMP tar xzvf $CWD/expat-$VERSION.tar.gz cd expat-$VERSION chown -R root.root . for file in $CWD/*.patch.gz ; do zcat $file | patch -p1 done find . -perm 664 -exec chmod 644 {} \; CFLAGS="-O2" ./configure --prefix=/usr \ sparc-slackware-linux make make install DESTDIR=$PKG mkdir -p $PKG/usr/doc/expat-$VERSION cp -a \ COPYING Changes README doc/reference.html \ $PKG/usr/doc/expat-$VERSION gzip $PKG/usr/man/man1/xmlwf.1 mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc # Build the package: cd $PKG makepkg -l y -c n $TMP/expat-$VERSION-$ARCH-$BUILD.tgz # Clean up the extra stuff: if [ "$1" = "--cleanup" ]; then rm -rf $TMP/expat-$VERSION rm -rf $PKG fi