GPS.SlackBuild 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #!/bin/bash
  2. # Slackware build script for GIMP Paint Studio
  3. # Klaatu <klaatu@member.fsf.org>
  4. # GNU All-Permissive License
  5. # Copying and distribution of this file, with or without modification,
  6. # are permitted in any medium without royalty provided the copyright
  7. # notice and this notice are preserved. This file is offered as-is,
  8. # without any warranty.
  9. cd $(dirname $0) ; CWD=$(pwd)
  10. PRGNAM=GPS
  11. VERSION=${VERSION:-2_0}
  12. BUILD=${BUILD:-1}
  13. TAG=${TAG:-_SBo}
  14. PKGTYPE=${PKGTYPE:-tgz}
  15. ARCH="noarch"
  16. # If the variable PRINT_PACKAGE_NAME is set, then this script will report what
  17. # the name of the created package would be, and then exit. This information
  18. # could be useful to other scripts.
  19. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
  20. echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
  21. exit 0
  22. fi
  23. TMP=${TMP:-/tmp/SBo}
  24. PKG=$TMP/package-$PRGNAM
  25. OUTPUT=${OUTPUT:-/tmp}
  26. set -e
  27. rm -rf $PKG
  28. mkdir -p $TMP $PKG $OUTPUT
  29. cd $PKG
  30. mkdir -p $PKG/usr/share/gimp/2.0/
  31. tar -xf $CWD/${PRGNAM}_${VERSION}.tar.gz -C $PKG/usr/share/gimp/2.0/
  32. chown -R root:root .
  33. find -L . \
  34. \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
  35. -o -perm 511 -o -perm 700 \) -exec chmod 755 {} \; -o \
  36. \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
  37. -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
  38. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  39. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  40. mkdir -p $PKG/install
  41. cat $CWD/slack-desc > $PKG/install/slack-desc
  42. cd $PKG
  43. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE