asciiquarium.SlackBuild 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #!/bin/bash
  2. # Slackware build script for asciiquarium
  3. # Written by Vincent Batts, vbatts@hashbangbash.com
  4. cd $(dirname $0) ; CWD=$(pwd)
  5. PRGNAM=asciiquarium
  6. VERSION=${VERSION:-1.1}
  7. BUILD=${BUILD:-1}
  8. ARCH=noarch
  9. TAG=${TAG:-_SBo}
  10. PKGTYPE=${PKGTYPE:-tgz}
  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}_${VERSION}
  26. tar xvf $CWD/${PRGNAM}_${VERSION}.tar.gz
  27. cd ${PRGNAM}_${VERSION}
  28. chown -R root:root .
  29. find -L . \
  30. \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
  31. -exec chmod 755 {} \; -o \
  32. \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
  33. -exec chmod 644 {} \;
  34. mkdir -p $PKG/usr/games/
  35. install -m 0755 $PRGNAM $PKG/usr/games/
  36. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  37. cp -a \
  38. CHANGES gpl.txt MANIFEST README \
  39. $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