#!/bin/sh CWD=`pwd` if [ "$TMP" = "" ]; then TMP=/tmp fi PKG=$TMP/package-libtiff VERSION=3.5.7 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/tiff-v$VERSION.tar.gz cd tiff-v$VERSION chown -R root.root . mkdir -p $PKG/usr/doc/libtiff-$VERSION cp -a COPYRIGHT README TODO VERSION html $PKG/usr/doc/libtiff-$VERSION chown -R root.root $PKG/usr/doc/libtiff-$VERSION zcat $CWD/tiff-v$VERSION.solib.diff.gz | patch -p1 -E --backup --suffix=.orig --verbose zcat $CWD/libtiff-v3.5.7.fax2tiff.diff.gz | patch -p1 -E --backup --suffix=.orig --verbose mkdir -p $PKG/usr/doc/tiff-v$VERSION/html GCOPTS="-m32" CFLAGS="-O" ./configure --target=sparc-slackware-linux \ --with-ZIP=yes \ --with-DIR_GZLIB=/usr/lib \ --with-DIRS_LIBINC=/usr/include << EOF no /usr/bin /usr/lib /usr/include $PKG/usr/man /usr/doc/tiff-v$VERSION/html bsd-source-cat yes EOF make mkdir -p $PKG/usr/man/man{1,3} DESTDIR=$PKG make install ( cd $PKG/usr/man find . -type f -exec gzip -9 {} \; ) mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc # Build the package: cd $PKG makepkg -l y -c n $TMP/libtiff-$VERSION-$ARCH-$BUILD.tgz # Clean up the extra stuff: if [ "$1" = "--cleanup" ]; then rm -rf $TMP/tiff-$VERSION rm -rf $PKG fi