aboutsummaryrefslogtreecommitdiff
path: root/audio/fantasia/fantasia.SlackBuild
blob: 12d5584c26b60aecf153e5144857067b33a24965 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/sh

# Slackware build script for fantasia

# Written by B. Watson (yalhcru@gmail.com)

# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.

PRGNAM=fantasia
VERSION=${VERSION:-0.9}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
ARCH=noarch

CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

SRCNAM=Fantasia

set -e

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION

# Don't really need our own "source" dir, but it makes cleanup easier.
mkdir $PRGNAM-$VERSION
cd $PRGNAM-$VERSION

# Jar file
mkdir -p $PKG/usr/{bin,share/$PRGNAM}
install -m0644 -oroot -groot $CWD/$SRCNAM-$VERSION.jar $PKG/usr/share/$PRGNAM

# Shell script wrapper
cat <<EOF > $PKG/usr/bin/$PRGNAM
#!/bin/sh
exec java -jar /usr/share/$PRGNAM/$SRCNAM-$VERSION.jar
EOF
chmod 0755 $PKG/usr/bin/$PRGNAM

# Stick the icon where it goes
unzip -j $CWD/$SRCNAM-$VERSION.jar \
  org/jsampler/view/fantasia/res/icons/LinuxSampler-logo.png
mkdir -p $PKG/usr/share/pixmaps
install -m0644 -oroot -groot LinuxSampler-logo.png \
  $PKG/usr/share/pixmaps/$PRGNAM.png

# .desktop file written by SlackBuild author
mkdir -p $PKG/usr/share/applications
cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop

# No real docs ship with this app, but here ya go:
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README
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:-tgz}