aboutsummaryrefslogtreecommitdiff
path: root/multimedia
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2022-03-31 14:22:10 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-04-02 18:18:48 +0700
commit68adae29ab7262b5e9f57b034ce41e884110ffcc (patch)
treeb206527332f6dfca9729f24e0517a2166d6c93ba /multimedia
parent5edb16d124a795fbd8fcd73f18b57024aac74fe6 (diff)
multimedia/JSampler: Add doinst, CLI launcher, fix jdk detection.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'multimedia')
-rw-r--r--multimedia/JSampler/JSampler.SlackBuild24
-rw-r--r--multimedia/JSampler/JSampler.desktop2
-rw-r--r--multimedia/JSampler/doinst.sh3
3 files changed, 27 insertions, 2 deletions
diff --git a/multimedia/JSampler/JSampler.SlackBuild b/multimedia/JSampler/JSampler.SlackBuild
index 54099e930cbb0..d90897d403012 100644
--- a/multimedia/JSampler/JSampler.SlackBuild
+++ b/multimedia/JSampler/JSampler.SlackBuild
@@ -11,11 +11,20 @@
# notice and this notice are preserved. This file is offered as-is,
# without any warranty.
+# 20220331 bkw: Modified by SlackBuilds.org, BUILD=2:
+# - abort if JAVA_HOME not set and can't be set from /etc/profile.d.
+# this avoids creating a /jre in the package root.
+# - include an icon in the package, since there's a .desktop file.
+# - add a doinst.sh, needed for the icon and .desktop.
+# - include a wrapper script to launch from the command line.
+# Note: this really should be noarch, and should install the .jar file
+# to /usr/share/$PRGNAM. I don't have time to test such changes right now.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=JSampler
VERSION=${VERSION:-0.9}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -96,6 +105,18 @@ install -D -m 0644 $CWD/$PRGNAM.desktop \
echo -e "\nExec=java -jar $JAVA_HOME/jre/bin/$(echo "${THEME[@]^}")-0.9.jar" \
>> $PKG/usr/share/applications/$PRGNAM-$THEME.desktop
+# 20220331 bkw: for those of us who don't use KDE or XFCE or want to:
+mkdir -p $PKG/usr/bin
+cat > $PKG/usr/bin/$PRGNAM <<EOF
+#!/bin/sh
+exec java -jar $JAVA_HOME/jre/bin/$(echo "${THEME[@]^}")-0.9.jar
+EOF
+chmod 0755 $PKG/usr/bin/$PRGNAM
+
+# 20220331 bkw: icon. should be multiple sizes in /usr/share/icons...
+mkdir -p $PKG/usr/share/pixmaps
+cat res/fantasia/icons/LinuxSampler-logo.png > $PKG/usr/share/pixmaps/$PRGNAM.png
+
# docs
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -ar \
@@ -106,6 +127,7 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
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
diff --git a/multimedia/JSampler/JSampler.desktop b/multimedia/JSampler/JSampler.desktop
index 4dfe780082563..9fbf1be85f70a 100644
--- a/multimedia/JSampler/JSampler.desktop
+++ b/multimedia/JSampler/JSampler.desktop
@@ -3,7 +3,7 @@ Name=JSampler
Version=1.0
GenericName=LinuxSampler GUI
Comment=JSampler is a LinuxSampler Java GUI Interface
-Icon=qsampler
+Icon=/usr/share/pixmaps/JSampler.png
Categories=Audio;AudioVideo;Midi;X-Alsa;X-Jack;
Terminal=false
Type=Application
diff --git a/multimedia/JSampler/doinst.sh b/multimedia/JSampler/doinst.sh
new file mode 100644
index 0000000000000..5fb28930db0b9
--- /dev/null
+++ b/multimedia/JSampler/doinst.sh
@@ -0,0 +1,3 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi