pysetuptools.SlackBuild 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #!/bin/sh
  2. ## Written by hollywoodb (hollywoodb@fastmail.fm)
  3. ## Feel free to use, modify, redistribute this script.
  4. ## If you make changes please modify the "Written by"
  5. ## so that I don't recieve emails about a script I
  6. ## did not write. Thanks.
  7. # Mofified by the SlackBuilds.org project
  8. # Maintained by Audrius Kažukauskas <audrius@neutrino.lt>
  9. PRGNAM=pysetuptools
  10. SRC_NAME=setuptools
  11. VERSION=0.6c11
  12. BUILD=${BUILD:-1}
  13. TAG=${TAG:-_SBo}
  14. # Automatically determine the architecture we're building on:
  15. if [ -z "$ARCH" ]; then
  16. case "$( uname -m )" in
  17. i?86) ARCH=i486 ;;
  18. arm*) ARCH=arm ;;
  19. # Unless $ARCH is already set, use uname -m for all other archs:
  20. *) ARCH=$( uname -m ) ;;
  21. esac
  22. fi
  23. CWD=$(pwd)
  24. TMP=${TMP:-/tmp/SBo}
  25. PKG=${PKG:-$TMP/package-$SRC_NAME}
  26. OUTPUT=${OUTPUT:-/tmp}
  27. set -e
  28. rm -rf $PKG
  29. mkdir -p $TMP $PKG $OUTPUT
  30. cd $TMP
  31. rm -rf $SRC_NAME-$VERSION
  32. tar xvf $CWD/$SRC_NAME-$VERSION.tar.gz
  33. cd $SRC_NAME-$VERSION
  34. chown -R root:root .
  35. chmod -R u+w,go+r-w,a-s .
  36. # Don't need this.
  37. rm -f setuptools/*.exe
  38. python setup.py install --root=$PKG
  39. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  40. install -m 0644 *.txt $PKG/usr/doc/$PRGNAM-$VERSION
  41. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  42. mkdir -p $PKG/install
  43. cat $CWD/slack-desc > $PKG/install/slack-desc
  44. cd $PKG
  45. /sbin/makepkg -l y -c n -p $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}