summaryrefslogtreecommitdiffstats
path: root/audio/mp3splt-gtk/mp3splt-gtk.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'audio/mp3splt-gtk/mp3splt-gtk.SlackBuild')
-rw-r--r--audio/mp3splt-gtk/mp3splt-gtk.SlackBuild75
1 files changed, 52 insertions, 23 deletions
diff --git a/audio/mp3splt-gtk/mp3splt-gtk.SlackBuild b/audio/mp3splt-gtk/mp3splt-gtk.SlackBuild
index 96e5bf1a02..f3e8a859dc 100644
--- a/audio/mp3splt-gtk/mp3splt-gtk.SlackBuild
+++ b/audio/mp3splt-gtk/mp3splt-gtk.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for mp3splt-gtk
@@ -22,17 +22,17 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# 20140819 bkw:
-# - Updated for v0.9.1a
-# - Use make install-strip instead of find/xargs/strip
-# - Get rid of redundant/empty TODO and INSTALL from /usr/doc
-# - Don't waste time building doxygen docs, since we don't install them
+# 20211121 bkw: note to self: upstream moved to github and
+# combined all 3 projects (libmp3splt, mp3splt, mp3splt-gtk) into
+# one repo. Probably should combine the SlackBuilds, too. See
+# https://github.com/mp3splt/mp3splt
-# 20150107 bkw:
-# - Updated for v0.9.2
-# - Added GSTREAMER=no option, as requested by Arthur Fontolan.
-# - Added default_player.diff: if GSTREAMER=no, the default player
-# will be audacious. Sent patch to upstream too.
+# 20211121 bkw: BUILD=2
+# - new-style icons.
+# - don't pollute /usr/share/pixmaps with internal-use-only images.
+# - GSTREAMER=no and audacious support are gone. I didn't do this,
+# rworkman did, just reminding myself why: mp3splt-gtk doesn't
+# support our newer version of audacious. Sorry, Arthur.
# 20150304 bkw:
# - Upstream accepted my patch, in somewhat modified form, as revision
@@ -40,10 +40,25 @@
# of mine.
# - Bump BUILD.
+# 20150107 bkw:
+# - Updated for v0.9.2
+# - Added GSTREAMER=no option, as requested by Arthur Fontolan.
+# - Added default_player.diff: if GSTREAMER=no, the default player
+# will be audacious. Sent patch to upstream too.
+
+# 20140819 bkw:
+# - Updated for v0.9.1a
+# - Use make install-strip instead of find/xargs/strip
+# - Get rid of redundant/empty TODO and INSTALL from /usr/doc
+# - Don't waste time building doxygen docs, since we don't install them
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=mp3splt-gtk
VERSION=${VERSION:-0.9.2}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -53,7 +68,11 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -81,15 +100,14 @@ 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 -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
# patch made with 'svn diff -c 1509' in a checked-out repo.
patch -p1 < $CWD/default_player-r1509.diff
+sed -i '/Icon/s,=.*,='$PRGNAM',' $PRGNAM.desktop.in
+
# Disabled audacious support, upstream mp3splt-gtk does not yet support audacious-3.6
CFLAGS="$SLKCFLAGS -fcommon" \
CXXFLAGS="$SLKCFLAGS" \
@@ -105,11 +123,22 @@ CXXFLAGS="$SLKCFLAGS" \
--disable-doxygen_doc \
--build=$ARCH-slackware-linux
-make
-make install-strip DESTDIR=$PKG
+make appicondir=/usr/share/$PRGNAM
+make install-strip DESTDIR=$PKG appicondir=/usr/share/$PRGNAM
+
+gzip -9 $PKG/usr/man/man?/*
+
+HICOLOR=$PKG/usr/share/icons/hicolor
+SVG=src/mp3splt-gtk_ico.svg
+for px in 16 32 48 64 128; do
+ size=${px}x${px}
+ dir=$HICOLOR/$size/apps
+ mkdir -p $dir
+ convert -resize $size $SVG $dir/$PRGNAM.png
+done
-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/share/pixmaps
+ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS ChangeLog COPYING NEWS README $PKG/usr/doc/$PRGNAM-$VERSION
@@ -120,4 +149,4 @@ 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}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE