pycscope.SlackBuild 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #!/bin/bash
  2. # Slackware build script for PyCscope
  3. # Written by Grissiom <chaos.proton@gmail.com>
  4. cd $(dirname $0) ; CWD=$(pwd)
  5. PRGNAM=pycscope
  6. VERSION=${VERSION:-0.3}
  7. BUILD=${BUILD:-2}
  8. TAG=${TAG:-_SBo}
  9. PKGTYPE=${PKGTYPE:-tgz}
  10. if [ -z "$ARCH" ]; then
  11. case "$( uname -m )" in
  12. i?86) ARCH=i486 ;;
  13. arm*) ARCH=arm ;;
  14. *) ARCH=$( uname -m ) ;;
  15. esac
  16. fi
  17. # If the variable PRINT_PACKAGE_NAME is set, then this script will report what
  18. # the name of the created package would be, and then exit. This information
  19. # could be useful to other scripts.
  20. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
  21. echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
  22. exit 0
  23. fi
  24. TMP=${TMP:-/tmp/SBo}
  25. PKG=$TMP/package-$PRGNAM
  26. OUTPUT=${OUTPUT:-/tmp}
  27. set -e
  28. rm -rf $PKG
  29. mkdir -p $TMP $PKG $OUTPUT
  30. cd $TMP
  31. rm -rf $PRGNAM-$VERSION
  32. tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
  33. cd $PRGNAM-$VERSION
  34. chown -R root:root .
  35. find -L . \
  36. \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
  37. -exec chmod 755 {} \; -o \
  38. \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
  39. -exec chmod 644 {} \;
  40. python setup.py install --prefix=/usr --root=$PKG
  41. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  42. cp -a \
  43. README LICENSE \
  44. $PKG/usr/doc/$PRGNAM-$VERSION
  45. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  46. mkdir -p $PKG/install
  47. cat $CWD/slack-desc > $PKG/install/slack-desc
  48. cd $PKG
  49. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE