fantasia.SlackBuild 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #!/bin/bash
  2. # Slackware build script for fantasia
  3. # Written by B. Watson (yalhcru@gmail.com)
  4. PRGNAM=fantasia
  5. VERSION=${VERSION:-0.9}
  6. BUILD=${BUILD:-1}
  7. TAG=${TAG:-_SBo}
  8. ARCH=noarch
  9. CWD=$(pwd)
  10. TMP=${TMP:-/tmp/SBo}
  11. PKG=$TMP/package-$PRGNAM
  12. OUTPUT=${OUTPUT:-/tmp}
  13. SRCNAM=Fantasia
  14. set -e
  15. rm -rf $PKG
  16. mkdir -p $TMP $PKG $OUTPUT
  17. cd $TMP
  18. rm -rf $PRGNAM-$VERSION
  19. # Don't really need our own "source" dir, but it makes cleanup easier.
  20. mkdir $PRGNAM-$VERSION
  21. cd $PRGNAM-$VERSION
  22. # Jar file
  23. mkdir -p $PKG/usr/{bin,share/$PRGNAM}
  24. install -m0644 -oroot -groot $CWD/$SRCNAM-$VERSION.jar $PKG/usr/share/$PRGNAM
  25. # Shell script wrapper
  26. cat <<EOF > $PKG/usr/bin/$PRGNAM
  27. #!/bin/sh
  28. exec java -jar /usr/share/$PRGNAM/$SRCNAM-$VERSION.jar
  29. EOF
  30. chmod 0755 $PKG/usr/bin/$PRGNAM
  31. # Stick the icon where it goes
  32. unzip -j $CWD/$SRCNAM-$VERSION.jar \
  33. org/jsampler/view/fantasia/res/icons/LinuxSampler-logo.png
  34. mkdir -p $PKG/usr/share/pixmaps
  35. install -m0644 -oroot -groot LinuxSampler-logo.png \
  36. $PKG/usr/share/pixmaps/$PRGNAM.png
  37. # .desktop file written by SlackBuild author
  38. mkdir -p $PKG/usr/share/applications
  39. cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
  40. # No real docs ship with this app, but here ya go:
  41. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  42. cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README
  43. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  44. mkdir -p $PKG/install
  45. cat $CWD/slack-desc > $PKG/install/slack-desc
  46. cat $CWD/doinst.sh > $PKG/install/doinst.sh
  47. cd $PKG
  48. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}