Yolo.SlackBuild 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #!/bin/bash
  2. # Slackware build script for Yolo Lipsync
  3. # Copyright 2015 klaatu @ member.fsf.org
  4. # Icon for this Yolo package is cc-0 Klaatu
  5. #
  6. # GNU All-Permissive License
  7. # Copying and distribution of this file, with or without modification,
  8. # are permitted in any medium without royalty provided the copyright
  9. # notice and this notice are preserved. This file is offered as-is,
  10. # without any warranty.
  11. cd $(dirname $0) ; CWD=$(pwd)
  12. PRGNAM=Yolo
  13. VERSION=${VERSION:-"May_04_2009"}
  14. BUILD=${BUILD:-1}
  15. TAG=${TAG:-_SBo}
  16. PKGTYPE=${PKGTYPE:-tgz}
  17. ARCH="noarch"
  18. # If the variable PRINT_PACKAGE_NAME is set, then this script will report what
  19. # the name of the created package would be, and then exit. This information
  20. # could be useful to other scripts.
  21. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
  22. echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
  23. exit 0
  24. fi
  25. TMP=${TMP:-/tmp/SBo}
  26. PKG=$TMP/package-$PRGNAM
  27. OUTPUT=${OUTPUT:-/tmp}
  28. set -e
  29. rm -rf $PKG
  30. mkdir -p $TMP $PKG $OUTPUT
  31. cd $TMP
  32. rm -rf $PRGNAM-$VERSION
  33. mkdir $PRGNAM-$VERSION
  34. unzip $CWD/"$PRGNAM"_"$VERSION".zip -d $PRGNAM-$VERSION
  35. cd "$PRGNAM"-"$VERSION"
  36. chown -R root:root .
  37. find -L . \
  38. \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
  39. -o -perm 511 \) -exec chmod 755 {} \; -o \
  40. \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
  41. -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
  42. mkdir -p $PKG/usr/bin/
  43. cp $PRGNAM.jar $PKG/usr/bin/$PRGNAM.jar
  44. # desktop file, added to SlackBuild for convenience
  45. mkdir -p $PKG/usr/share/applications/
  46. cp $CWD/$PRGNAM.desktop $PKG/usr/share/applications/
  47. # icon file, added to SlackBuild for convenience
  48. mkdir -p $PKG/usr/share/icons/hicolor/scalable/apps
  49. cp $CWD/$PRGNAM.svg $PKG/usr/share/icons/hicolor/scalable/apps/
  50. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/
  51. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  52. mkdir -p $PKG/install
  53. cat $CWD/slack-desc > $PKG/install/slack-desc
  54. cd $PKG
  55. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE