diff options
author | B. Watson <urchlay@slackware.uk> | 2024-09-05 01:16:37 -0400 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-09-07 09:08:50 +0700 |
commit | 64e1c01e84f2107718652587ef2ae124a7871a60 (patch) | |
tree | e7bb9d75022af4a3e84c17101e329a79d492b9af /graphics | |
parent | baecdc09a5eba0ed9183f1f725fe236a279271a2 (diff) |
graphics/optipng: Updated for version 0.7.8, new maintainer.
Signed-off-by: B. Watson <urchlay@slackware.uk>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/optipng/README | 4 | ||||
-rw-r--r-- | graphics/optipng/optipng.SlackBuild | 52 | ||||
-rw-r--r-- | graphics/optipng/optipng.info | 12 |
3 files changed, 31 insertions, 37 deletions
diff --git a/graphics/optipng/README b/graphics/optipng/README index 89c6c2bb2676..92d87915254c 100644 --- a/graphics/optipng/README +++ b/graphics/optipng/README @@ -1,4 +1,8 @@ +optipng (Advanced PNG Optimizer) + OptiPNG is a PNG optimizer that recompresses image files to a smaller size, without losing any information. This program also converts external formats (BMP, GIF, PNM and TIFF) to optimized PNG, and performs PNG integrity checks and corrections. + +See also: graphics/pngcrush diff --git a/graphics/optipng/optipng.SlackBuild b/graphics/optipng/optipng.SlackBuild index 471f4ee37af1..f3992098748f 100644 --- a/graphics/optipng/optipng.SlackBuild +++ b/graphics/optipng/optipng.SlackBuild @@ -1,13 +1,21 @@ #!/bin/bash # Slackware build script for OptiPNG -# Written by Oleg O. Chukaev <oleg.chukaev@mail.ru> +# Written by Oleg O. Chukaev +# Modified and now maintained by B. Watson <urchlay@slackware.uk> + # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20240905 bkw: +# - new maintainer. +# - update for v0.7.8. +# - build with system libpng as well as zlib. +# - run 'make test' by default, include results in doc dir. + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=optipng -VERSION=${VERSION:-0.7.7} +VERSION=${VERSION:-0.7.8} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -20,9 +28,6 @@ if [ -z "$ARCH" ]; then esac fi -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what -# the name of the created package would be, and then exit. This information -# could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 @@ -34,16 +39,12 @@ OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" - LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" - LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" else SLKCFLAGS="-O2" - LIBDIRSUFFIX="" fi set -e @@ -55,30 +56,19 @@ rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION chown -R root:root . -find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -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 {} \; - -./configure -with-system-zlib -cd src - make CFLAGS="$SLKCFLAGS -W -Wall" - make install DESTDIR=$PKG prefix=/usr -cd .. - -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} + -find $PKG/usr/man -type f -exec gzip -9 {} \; +./configure -with-system-libs +make -C src CFLAGS="$SLKCFLAGS" +[ "${MAKETEST:-yes}" = "yes" ] && make -s -C src test &> maketest.txt +make -C src install DESTDIR=$PKG prefix=/usr +gzip -9 $PKG/usr/man/man*/* -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a \ - AUTHORS.txt LICENSE.txt README.txt doc/history.txt doc/optipng.man.html \ - doc/optipng.man.pdf doc/optipng.man.txt doc/png_optimization.html \ - doc/todo.txt \ - $PKG/usr/doc/$PRGNAM-$VERSION -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKGDOC +cp -a *.txt doc/*.{html,pdf,txt} $PKGDOC +cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc diff --git a/graphics/optipng/optipng.info b/graphics/optipng/optipng.info index ff73d4a8a5e2..d861b184ce55 100644 --- a/graphics/optipng/optipng.info +++ b/graphics/optipng/optipng.info @@ -1,10 +1,10 @@ PRGNAM="optipng" -VERSION="0.7.7" -HOMEPAGE="http://optipng.sourceforge.net/" -DOWNLOAD="http://prdownloads.sourceforge.net/optipng/optipng-0.7.7.tar.gz" -MD5SUM="211101965baf42fd24a2aa990b7e842e" +VERSION="0.7.8" +HOMEPAGE="https://optipng.sourceforge.net/" +DOWNLOAD="https://downloads.sourceforge.net/project/optipng/OptiPNG/optipng-0.7.8/optipng-0.7.8.tar.gz" +MD5SUM="e340235722cc39ed3b8bc539b9c63f2d" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" -MAINTAINER="Oleg O. Chukaev" -EMAIL="oleg.chukaev@mail.ru" +MAINTAINER="B. Watson" +EMAIL="urchlay@slackware.uk" |