diff options
author | B. Watson <urchlay@slackware.uk> | 2025-01-17 17:58:13 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2025-01-18 08:13:21 +0700 |
commit | 0645cf6a08a0855448dc29658bd5157a576aba6f (patch) | |
tree | c745eb95a5f69975528150b04a5df33eccae6732 /graphics | |
parent | 4e9a06a67da1ecdb9985707b2aecbe5f81085bf3 (diff) |
graphics/pngcheck: Added (check integrity of PNG files).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/pngcheck/README | 10 | ||||
-rw-r--r-- | graphics/pngcheck/pngcheck.SlackBuild | 81 | ||||
-rw-r--r-- | graphics/pngcheck/pngcheck.info | 10 | ||||
-rw-r--r-- | graphics/pngcheck/slack-desc | 19 |
4 files changed, 120 insertions, 0 deletions
diff --git a/graphics/pngcheck/README b/graphics/pngcheck/README new file mode 100644 index 0000000000..c85b73be9b --- /dev/null +++ b/graphics/pngcheck/README @@ -0,0 +1,10 @@ +pngcheck (check integrity of PNG files) + +pngcheck verifies the integrity of PNG, JNG and MNG files (by checking +the internal 32-bit CRCs, a.k.a. checksums, and decompressing the +image data); it can optionally dump almost all of the chunk-level +information in the image in human-readable form. For example, it can +be used to print the basic statistics about an image (dimensions, +bit depth, etc.); to list the color and transparency info in its +palette (assuming it has one); or to extract the embedded text +annotations. This is a command-line program with batch capabilities. diff --git a/graphics/pngcheck/pngcheck.SlackBuild b/graphics/pngcheck/pngcheck.SlackBuild new file mode 100644 index 0000000000..410bc214a4 --- /dev/null +++ b/graphics/pngcheck/pngcheck.SlackBuild @@ -0,0 +1,81 @@ +#!/bin/bash + +# Slackware build script for pngcheck + +# Written by B. Watson (urchlay@slackware.uk) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +# I've been using this for ages, off and on, and was kinda shocked I'd +# never done a SBo build for it. So here it is. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=pngcheck +VERSION=${VERSION:-3.0.3} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" +else + SLKCFLAGS="-O2" +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 -L . -perm /111 -a \! -perm 755 -a -exec chmod -h 755 {} + -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod -h 644 {} + + +sed -i "/^CFLAGS/s,-O,$SLKCFLAGS," Makefile.unx +make ZINC=" " ZLIB=-lz -f Makefile.unx + +# no 'make install', but dead simple. +PKGBIN=$PKG/usr/bin +PKGMAN1=$PKG/usr/man/man1 + +mkdir -p $PKGBIN $PKGMAN1 + +install -m0755 -s pngcheck pngsplit png-fix-IDAT-windowsize $PKGBIN +install -m0644 *.1 gpl/*.1 $PKGMAN1 +gzip -9 $PKGMAN1/* + +PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKGDOC +cp -a CHANGELOG LICENSE gpl/COPYING README $PKGDOC +cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$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.$PKGTYPE diff --git a/graphics/pngcheck/pngcheck.info b/graphics/pngcheck/pngcheck.info new file mode 100644 index 0000000000..bf963912f2 --- /dev/null +++ b/graphics/pngcheck/pngcheck.info @@ -0,0 +1,10 @@ +PRGNAM="pngcheck" +VERSION="3.0.3" +HOMEPAGE="http://www.libpng.org/pub/png/apps/pngcheck.html" +DOWNLOAD="http://www.libpng.org/pub/png/src/pngcheck-3.0.3.tar.gz" +MD5SUM="ac3fe8c134c16e8dec2db2bf60e2b2f2" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="B. Watson" +EMAIL="urchlay@slackware.uk" diff --git a/graphics/pngcheck/slack-desc b/graphics/pngcheck/slack-desc new file mode 100644 index 0000000000..aa669ac932 --- /dev/null +++ b/graphics/pngcheck/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +pngcheck: pngcheck (check integrity of PNG files) +pngcheck: +pngcheck: pngcheck verifies the integrity of PNG, JNG and MNG files (by checking +pngcheck: the internal 32-bit CRCs, a.k.a. checksums, and decompressing the +pngcheck: image data); it can optionally dump almost all of the chunk-level +pngcheck: information in the image in human-readable form. For example, it can +pngcheck: be used to print the basic statistics about an image (dimensions, +pngcheck: bit depth, etc.); to list the color and transparency info in its +pngcheck: palette (assuming it has one); or to extract the embedded text +pngcheck: annotations. This is a command-line program with batch capabilities. +pngcheck: |