stops.SlackBuild 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #!/bin/bash
  2. # Slackware build script for <stops>
  3. # Written by Michales Michaloudes korgie@gmail.com
  4. cd $(dirname $0) ; CWD=$(pwd)
  5. PRGNAM=stops
  6. VERSION=${VERSION:-0.3.0}
  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-$VERSION
  26. tar xjvf $CWD/$PRGNAM-$VERSION.tar.bz2 || exit 1
  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/etc
  35. cat $CWD/aeolus.conf.new > $PKG/etc/aeolus.conf.new
  36. mkdir -p $PKG/usr/share/aeolus/$PRGNAM-$VERSION
  37. cp -ar $TMP/$PRGNAM-$VERSION/ $PKG/usr/share/aeolus/
  38. rm $PKG/usr/share/aeolus/$PRGNAM-$VERSION/Makefile
  39. mkdir -p $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. 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