tuxpaint-stamps.SlackBuild 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #!/bin/bash
  2. # Slackware build script for tuxpaint-stamps
  3. # Written by Pablo Santamaria (pablosantamaria@gmail.com)
  4. # updated by Tim Dickson (dickson.tim@googlemail.com)
  5. cd $(dirname $0) ; CWD=$(pwd)
  6. PRGNAM=tuxpaint-stamps
  7. VERSION=${VERSION:-2021.11.25}
  8. ARCH=noarch
  9. BUILD=${BUILD:-1}
  10. TAG=${TAG:-_SBo}
  11. PKGTYPE=${PKGTYPE:-tgz}
  12. # If the variable PRINT_PACKAGE_NAME is set, then this script will report what
  13. # the name of the created package would be, and then exit. This information
  14. # could be useful to other scripts.
  15. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
  16. echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
  17. exit 0
  18. fi
  19. TMP=${TMP:-/tmp/SBo}
  20. PKG=$TMP/package-$PRGNAM
  21. OUTPUT=${OUTPUT:-/tmp}
  22. set -e
  23. rm -rf $PKG
  24. mkdir -p $TMP $PKG $OUTPUT
  25. cd $TMP
  26. rm -rf $PRGNAM-$VERSION
  27. tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
  28. cd $PRGNAM-$VERSION
  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. #the "source" is just data which needs copying to the right place.
  36. mkdir -p $PKG/usr/share/tuxpaint
  37. cp -ar stamps $PKG/usr/share/tuxpaint/
  38. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  39. cp -a docs/*.txt $PKG/usr/doc/$PRGNAM-$VERSION
  40. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  41. mkdir -p $PKG/install
  42. cat $CWD/slack-desc > $PKG/install/slack-desc
  43. cd $PKG
  44. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE