summaryrefslogtreecommitdiffstats
path: root/system/isomd5sum/isomd5sum.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/isomd5sum/isomd5sum.SlackBuild')
-rw-r--r--system/isomd5sum/isomd5sum.SlackBuild26
1 files changed, 20 insertions, 6 deletions
diff --git a/system/isomd5sum/isomd5sum.SlackBuild b/system/isomd5sum/isomd5sum.SlackBuild
index 8cfa66f69d..e40d5d12be 100644
--- a/system/isomd5sum/isomd5sum.SlackBuild
+++ b/system/isomd5sum/isomd5sum.SlackBuild
@@ -9,7 +9,7 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
PRGNAM=isomd5sum
-VERSION=${VERSION:-1.0.12}
+VERSION=${VERSION:-1.1.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -45,7 +45,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || tar xvf $CWD/$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
@@ -54,13 +54,27 @@ 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 {} \;
-patch -p1 < $CWD/fix_makefile.diff
-
sed -i 's,/usr/share/man,/usr/man,' Makefile
sed -i -e 's/-Werror/ /' Makefile
-make RPM_OPT_FLAGS="$SLKCFLAGS"
-make install DESTDIR=$PKG
+# Build & install binaries, libs, and python2 support:
+make -j1 \
+ RPM_OPT_FLAGS="$SLKCFLAGS" \
+ PYTHON=python2 \
+ DESTDIR=$PKG \
+ all install
+
+# If python3 is installed, build support for it.
+# Slack's python 2.x package has a python2-config command, but SBo's
+# python 3.x doesn't have python3-config (only e.g. python3.3-config).
+# The readlink/which stuff avoids hard-coding 3.3 in this script:
+if python3 --version >/dev/null 2>&1; then
+ make -j1 \
+ RPM_OPT_FLAGS="$SLKCFLAGS" \
+ PYTHON=$( readlink $( which python3 ) ) \
+ DESTDIR=$PKG \
+ clean all install-python
+fi
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