jugglinglab.SlackBuild 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #!/bin/bash
  2. # Slackware build script for Juggling Lab
  3. # Petr Kletecka admin@zonglovani.info <2014>
  4. cd $(dirname $0) ; CWD=$(pwd)
  5. PRGNAM=jugglinglab
  6. VERSION=${VERSION:-0.6.2}
  7. BUILD=${BUILD:-1}
  8. TAG=${TAG:-_SBo}
  9. PKGTYPE=${PKGTYPE:-tgz}
  10. ARCH=noarch
  11. # If the variable PRINT_PACKAGE_NAME is set, then this script will report what
  12. # the name of the created package would be, and then exit. This information
  13. # could be useful to other scripts.
  14. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
  15. echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
  16. exit 0
  17. fi
  18. TMP=${TMP:-/tmp/SBo}
  19. PKG=$TMP/package-$PRGNAM
  20. OUTPUT=${OUTPUT:-/tmp}
  21. set -e
  22. rm -rf $PKG
  23. mkdir -p $TMP $PKG $OUTPUT
  24. cd $TMP
  25. rm -rf $PRGNAM
  26. tar xvf $CWD/JugglingLab-${VERSION}_other.tar.gz
  27. mv JugglingLab $PRGNAM
  28. cd $PRGNAM
  29. chown -R root:root .
  30. find -L . \
  31. \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
  32. -o -perm 511 \) -exec chmod 755 {} \; -o \
  33. \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
  34. -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
  35. mkdir -p $PKG/usr/share/jugglinglab
  36. cp -a * $PKG/usr/share/jugglinglab
  37. mkdir -p $PKG/usr/share/applications
  38. cat $CWD/jugglinglab.desktop > $PKG/usr/share/applications/jugglinglab.desktop
  39. mkdir -p $PKG/usr/share/pixmaps
  40. cat $CWD/jugglinglab.png > $PKG/usr/share/pixmaps/jugglinglab.png
  41. mkdir -p $PKG/install
  42. cat $CWD/slack-desc > $PKG/install/slack-desc
  43. cat $CWD/doinst.sh > $PKG/install/doinst.sh
  44. cd $PKG
  45. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE