summaryrefslogtreecommitdiff
path: root/graphics/jpegoptim/jpegoptim.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/jpegoptim/jpegoptim.SlackBuild')
-rw-r--r--graphics/jpegoptim/jpegoptim.SlackBuild35
1 files changed, 21 insertions, 14 deletions
diff --git a/graphics/jpegoptim/jpegoptim.SlackBuild b/graphics/jpegoptim/jpegoptim.SlackBuild
index ecd78291cd..10b11de737 100644
--- a/graphics/jpegoptim/jpegoptim.SlackBuild
+++ b/graphics/jpegoptim/jpegoptim.SlackBuild
@@ -1,8 +1,12 @@
#!/bin/sh
# Slackware build script for jpegoptim
+
+# Originally written by:
# Ryan P.C. McQuen | Everett, WA | ryanpcmcquen@member.fsf.org
+# Now maintained by B. Watson (yalhcru@gmail.com)
+
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
@@ -21,6 +25,11 @@
# with this program (most likely, a file named COPYING). If not, see
# <https://www.gnu.org/licenses/>.
+# 20170309 bkw:
+# - take over maintenance
+# - use long-form github URL
+# - update configure to match template (actually use SLKCFLAGS).
+
PRGNAM=jpegoptim
VERSION=${VERSION:-1.4.4}
BUILD=${BUILD:-1}
@@ -59,11 +68,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-RELEASE.$VERSION
-if [ -e $CWD/RELEASE.$VERSION.tar.gz ]; then
- tar xvf $CWD/RELEASE.$VERSION.tar.gz
-else
- tar xvf $CWD/$PRGNAM-RELEASE.$VERSION.tar.gz
-fi
+tar xvf $CWD/$PRGNAM-RELEASE.$VERSION.tar.gz
cd $PRGNAM-RELEASE.$VERSION
chown -R root:root .
find -L . \
@@ -72,19 +77,21 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
./configure \
- --prefix=/usr
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --build=$ARCH-slackware-linux
+
make
make strip
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
-
-mv $PKG/usr/share/man $PKG/usr
-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
-rm -rf $PKG/usr/share
+gzip -9 $PKG/usr/man/man1/$PRGNAM.1
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a COPYING COPYRIGHT README $PKG/usr/doc/$PRGNAM-$VERSION