Browse Source

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>
pull/249/head
B. Watson 1 year ago
committed by Willy Sudiarto Raharjo
parent
commit
64e1c01e84
No known key found for this signature in database GPG Key ID: 3F617144D7238786
  1. 4
      graphics/optipng/README
  2. 52
      graphics/optipng/optipng.SlackBuild
  3. 12
      graphics/optipng/optipng.info

4
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

52
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

12
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"
Loading…
Cancel
Save