summaryrefslogtreecommitdiff
path: root/graphics/trimage
diff options
context:
space:
mode:
authorYth - Arnaud <yth@ythogtha.org>2018-02-08 16:34:34 +0000
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2018-02-10 08:09:33 +0700
commit7a995de505bfbb5ecdfbe82007b1d14924e8cde0 (patch)
treeed91758d7c0e16040416c9a688ebac06a05422a0 /graphics/trimage
parentb5c43c36f08c9ded2ca4cef2609d6abdfaae5f22 (diff)
downloadslackbuilds-7a995de505bfbb5ecdfbe82007b1d14924e8cde0.tar.gz
graphics/trimage: Added (image compressor).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'graphics/trimage')
-rw-r--r--graphics/trimage/README16
-rw-r--r--graphics/trimage/doinst.sh9
-rw-r--r--graphics/trimage/slack-desc19
-rw-r--r--graphics/trimage/trimage.SlackBuild79
-rw-r--r--graphics/trimage/trimage.info10
5 files changed, 133 insertions, 0 deletions
diff --git a/graphics/trimage/README b/graphics/trimage/README
new file mode 100644
index 0000000000..10952840d2
--- /dev/null
+++ b/graphics/trimage/README
@@ -0,0 +1,16 @@
+Trimage image compressor
+A cross-platform tool for optimizing PNG and JPG files.
+
+Trimage is a cross-platform GUI and command-line interface to optimize image files via
+"optipng":http://optipng.sourceforge.net/,
+"pngcrush":http://pmt.sourceforge.net/pngcrush/,
+"advpng":http://advancemame.sourceforge.net/comp-readme.html and
+"jpegoptim":http://www.kokkonen.net/tjko/projects.html,
+depending on the filetype (currently, PNG and JPG files are supported).
+It was inspired by "imageoptim":http://imageoptim.pornel.net/.
+All image files are losslessly compressed on the highest available compression levels,
+and EXIF and other metadata is removed.
+Trimage gives you various input functions to fit your own workflow:
+A regular file dialog, dragging and dropping and various command line options.
+
+Visit "Trimage.org":http://trimage.org for more information
diff --git a/graphics/trimage/doinst.sh b/graphics/trimage/doinst.sh
new file mode 100644
index 0000000000..65c7e2eeb9
--- /dev/null
+++ b/graphics/trimage/doinst.sh
@@ -0,0 +1,9 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
diff --git a/graphics/trimage/slack-desc b/graphics/trimage/slack-desc
new file mode 100644
index 0000000000..d47fce6e3c
--- /dev/null
+++ b/graphics/trimage/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------------------------------------------------------|
+trimage: trimage (image compressor)
+trimage:
+trimage: Trimage is a cross-platform GUI and command-line interface to optimize
+trimage: image files via optipng, pngcrush, advpng and jpegoptim, depending on
+trimage: the filetype (currently, PNG and JPG files are supported).
+trimage:
+trimage: All image files are losslessly compressed on the highest available
+trimage: compression levels, and EXIF and other metadata is removed.
+trimage:
+trimage: https://trimage.org
+trimage:
diff --git a/graphics/trimage/trimage.SlackBuild b/graphics/trimage/trimage.SlackBuild
new file mode 100644
index 0000000000..d9b60e8122
--- /dev/null
+++ b/graphics/trimage/trimage.SlackBuild
@@ -0,0 +1,79 @@
+#!/bin/sh
+
+# Slackware build script for Trimage
+
+# Yth | Pont-en-Royans, France | yth@ythogtha.org
+
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=trimage
+SRCNAM=Trimage
+VERSION=${VERSION:-1.0.5}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
+cd $SRCNAM-$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 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+sed -i -e 's:share/man:man:' setup.py
+
+python setup.py install --root $PKG
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+for i in COPYING README MANIFEST.in ; do
+ ln -s /usr/share/mirage/$i $PKG/usr/doc/$PRGNAM-$VERSION/$i ;
+done
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/graphics/trimage/trimage.info b/graphics/trimage/trimage.info
new file mode 100644
index 0000000000..c4ca402549
--- /dev/null
+++ b/graphics/trimage/trimage.info
@@ -0,0 +1,10 @@
+PRGNAM="trimage"
+VERSION="1.0.5"
+HOMEPAGE="https://trimage.org/"
+DOWNLOAD="https://github.com/Kilian/Trimage/archive/1.0.5/trimage-1.0.5.tar.gz"
+MD5SUM="4d29d54bd714694dd913ce7bb7999fe6"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="optipng pngcrush jpegoptim advancecomp"
+MAINTAINER="Yth - Arnaud"
+EMAIL="yth@ythogtha.org"