diff options
author | Oleg O. Chukaev <oleg.chukaev@mail.ru> | 2010-05-12 23:29:44 +0200 |
---|---|---|
committer | David Somero <xgizzmo@slackbuilds.org> | 2010-05-12 23:29:44 +0200 |
commit | b524fa5911ae6915f6a6db16b572a38e2cc96280 (patch) | |
tree | fb47ca43e0b9a9e446a850ec45dfcc103e28cbab /graphics/optipng/optipng.SlackBuild | |
parent | 8a59f1f82b6abcc519fb2ad0f6b337f0351cafa0 (diff) | |
download | slackbuilds-b524fa5911ae6915f6a6db16b572a38e2cc96280.tar.gz |
graphics/optipng: Added to 12.2 repository
Diffstat (limited to 'graphics/optipng/optipng.SlackBuild')
-rw-r--r-- | graphics/optipng/optipng.SlackBuild | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/graphics/optipng/optipng.SlackBuild b/graphics/optipng/optipng.SlackBuild new file mode 100644 index 0000000000..93a922b69c --- /dev/null +++ b/graphics/optipng/optipng.SlackBuild @@ -0,0 +1,69 @@ +#!/bin/sh + +# Slackware build script for OptiPNG +# Written by Oleg O. Chukaev <oleg.chukaev@mail.ru> + +PRGNAM=optipng +VERSION=0.6.3 +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +cd src +make -f scripts/gcc.mak CFLAGS="$SLKCFLAGS -W -Wall" +make -f scripts/gcc.mak install DESTDIR=$PKG prefix=/usr +cd .. + +( cd $PKG + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null || true + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +( cd $PKG/usr/man + find . -type f -exec gzip -9 {} \; + for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done +) + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + LICENSE.txt README.txt doc/caveat.txt doc/history.txt doc/manual.html \ + doc/manual.pdf doc/manual.txt doc/png_optimization_guide.html \ + doc/thanks.html doc/todo.txt \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz |