aboutsummaryrefslogtreecommitdiff
path: root/audio/mktoc/mktoc.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'audio/mktoc/mktoc.SlackBuild')
-rw-r--r--audio/mktoc/mktoc.SlackBuild53
1 files changed, 27 insertions, 26 deletions
diff --git a/audio/mktoc/mktoc.SlackBuild b/audio/mktoc/mktoc.SlackBuild
index 957cd26686a0..d6694b7362af 100644
--- a/audio/mktoc/mktoc.SlackBuild
+++ b/audio/mktoc/mktoc.SlackBuild
@@ -2,16 +2,29 @@
# Slackware build script for mktoc
-# Written by Luis Henrique <lmello.009@gmail.com>
+# Written by Luis Henrique <email removed>
+# Now maintained by B. Watson <yalhcru@gmail.com>
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# 20180111 bkw:
+# - take over maintenance
+# - BUILD=2
+# - i486 => i586
+# - don't include the install instructions in the package
+# - get rid of some useless boilerplate
+# - fix upstream typo/illiteracy: you LOSE information, you don't LOOSE it!
+# (sorry, this is a pet peeve, I can't not fix it)
+# - add man page, basically upstream's README
PRGNAM=mktoc
VERSION=${VERSION:-1.3}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -22,19 +35,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -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
+# 20180111 bkw: No CFLAGS here, this is pure Python code. Would be noarch,
+# except for the lib vs lib64 thing.
set -e
@@ -45,21 +47,20 @@ 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 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
+find . -type d -print0 | xargs -0 chmod 755
+find . -type f -print0 | xargs -0 chmod 644
+
+# You know, I never saw the "loose" for "lose" typo until the internet
+# age. Does that mean computers make people illiterate?
+patch -p1 < $CWD/lose_not_loose.diff
python setup.py install --root=$PKG
-find $PKG | xargs 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/man/man1
+gzip -9c $CWD/$PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a \
- CHANGELOG.rst LICENSE INSTALL.rst PKG-INFO README \
- $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a CHANGELOG.rst LICENSE PKG-INFO README $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install