aboutsummaryrefslogtreecommitdiff
path: root/graphics/imgmin
diff options
context:
space:
mode:
authorIcaro Perseo <icaroperseo@riseup.net>2016-08-19 18:41:43 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2016-08-20 07:49:48 +0700
commita436c466b3dbe6879512aa8dcaa9793e9227e698 (patch)
tree9e22e66571e837088bfe650c5daefdaee3b191e7 /graphics/imgmin
parent7b6bec4a4294e24c53bf25a6675b2b841fd9d221 (diff)
graphics/imgmin: Added (Automated lossy JPEG optimization).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'graphics/imgmin')
-rw-r--r--graphics/imgmin/README22
-rw-r--r--graphics/imgmin/imgmin.SlackBuild95
-rw-r--r--graphics/imgmin/imgmin.info10
-rw-r--r--graphics/imgmin/slack-desc19
4 files changed, 146 insertions, 0 deletions
diff --git a/graphics/imgmin/README b/graphics/imgmin/README
new file mode 100644
index 0000000000000..100c397865280
--- /dev/null
+++ b/graphics/imgmin/README
@@ -0,0 +1,22 @@
+imgmin is a CLI app uses a lossless mechanism to generate the optimized images
+by manipulating pixel blocks. imgmin offers an automated means for enforcing
+image quality as a standalone tool and as a webserver module. imgmin
+determines the optimal balance of image quality and filesize, often greatly
+reducing image size while retaining quality for casual use, which translates
+into more efficient use of storage and network bandwidth, which saves money
+and improves user experience.
+
+The JPEG quality settings most used by graphics professionals tend to be
+highly conservative because Compression and image quality are inversely
+proportional and graphics people are interested in utmost visual quality and
+not in spending time worrying about network efficiency.
+
+The result of overly conservative JPEG compression and webservers' inability
+to compress them any further means that many images on the web are too large.
+JPEG's overwhelming popularity as the most common image format means that many
+pages contain dozens of JPEG images.
+
+These bloated images take longer to transfer, leading to extended load time,
+which does not produce a good viewer experience.
+
+This software is licensed under the MIT license.
diff --git a/graphics/imgmin/imgmin.SlackBuild b/graphics/imgmin/imgmin.SlackBuild
new file mode 100644
index 0000000000000..52c5a2159bd88
--- /dev/null
+++ b/graphics/imgmin/imgmin.SlackBuild
@@ -0,0 +1,95 @@
+#!/bin/sh
+
+# Slackware build script for imgmin
+
+# Copyright 2015-2016 Icaro Perseo <icaroperseo@riseup.net>
+# All rights reserved.
+#
+# 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=imgmin
+VERSION=${VERSION:-1.1}
+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}
+
+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
+
+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 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 {} \;
+
+autoreconf -vif
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --build=$ARCH-slackware-linux
+
+make
+make install DESTDIR=$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
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a LICENSE-MIT.txt README.md $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.${PKGTYPE:-tgz}
diff --git a/graphics/imgmin/imgmin.info b/graphics/imgmin/imgmin.info
new file mode 100644
index 0000000000000..569c251be498b
--- /dev/null
+++ b/graphics/imgmin/imgmin.info
@@ -0,0 +1,10 @@
+PRGNAM="imgmin"
+VERSION="1.1"
+HOMEPAGE="https://github.com/rflynn/imgmin"
+DOWNLOAD="https://github.com/rflynn/imgmin/archive/v1.1/imgmin-1.1.tar.gz"
+MD5SUM="4302fc67aec3f628881bf0e9d5ff34c1"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="pngnq-s9 pngcrush pngquant"
+MAINTAINER="Icaro Perseo"
+EMAIL="icaroperseo@riseup.net"
diff --git a/graphics/imgmin/slack-desc b/graphics/imgmin/slack-desc
new file mode 100644
index 0000000000000..bc6e891e1c72b
--- /dev/null
+++ b/graphics/imgmin/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------------------------------------------------------|
+imgmin: imgmin (Automated lossy JPEG optimization)
+imgmin:
+imgmin: imgmin is a CLI app uses a lossless mechanism to generate the
+imgmin: optimized images by manipulating pixel blocks. imgmin offers an
+imgmin: automated means for enforcing image quality as a standalone tool
+imgmin: and as a webserver module.
+imgmin:
+imgmin: This software is licensed under the MIT license.
+imgmin:
+imgmin:
+imgmin: