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>
This commit is contained in:
parent
5edb16d124
commit
68adae29ab
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue