#!/bin/sh CWD=`pwd` PKG=/tmp/package-libungif TMP=${TMP:-/tmp} if [ ! -d $TMP ]; then mkdir -p $TMP fi VERSION=4.1.4 ARCH=${ARCH:-x86_64} BUILD=${BUILD:-2} 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" fi rm -rf $PKG mkdir -p $PKG cd $TMP rm -rf libungif-$VERSION tar xjvf $CWD/libungif-$VERSION.tar.bz2 cd libungif-$VERSION chown -R root:root . find . -perm 777 -exec chmod 755 {} \; find . -perm 664 -exec chmod 644 {} \; CFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ --libdir=/usr/lib64 \ --with-x=no \ $ARCH-slackware-linux make || exit 1 make install DESTDIR=$PKG mkdir -p $PKG/usr/doc/libungif-$VERSION cp -a AUTHORS BUGS COPYING ChangeLog INSTALL NEWS ONEWS README TODO \ UNCOMPRESSED_GIF doc $PKG/usr/doc/libungif-$VERSION rm $PKG/usr/doc/libungif-$VERSION/doc/Makefile* ( 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 ) ## I don't believe we need all this slop. Correct me if I'm wrong. # I've been corrected... #rm -rf $PKG/usr/bin ( cd $PKG/usr/lib64 SOVER=$(/bin/ls libungif.so.*.*.* | cut -f 3-5 -d .) ln -sf libungif.so.$SOVER libgif.so.$SOVER ln -sf libgif.so.$SOVER libgif.so.4 ln -sf libgif.so.4 libgif.so ln -sf libungif.a libgif.a ) mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG makepkg -l y -c n $TMP/libungif-$VERSION-$ARCH-$BUILD.tgz