traduisons.SlackBuild 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #!/bin/bash
  2. # Slackware build script for traduisons
  3. # Written by John Tyree johntyree@gmail.com
  4. cd $(dirname $0) ; CWD=$(pwd)
  5. PRGNAM=traduisons
  6. VERSION=${VERSION:-0.6.1}
  7. BUILD=${BUILD:-1}
  8. TAG=${TAG:-_SBo}
  9. PKGTYPE=${PKGTYPE:-tgz}
  10. if [ -z "$ARCH" ]; then
  11. case "$( uname -m )" in
  12. i?86) ARCH=i586 ;;
  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 \
  37. -o -perm 511 \) -exec chmod 755 {} \; -o \
  38. \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
  39. -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
  40. python setup.py install --root=$PKG
  41. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  42. cp -a LICENSE README.md PKG-INFO $PKG/usr/doc/$PRGNAM-$VERSION
  43. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  44. mkdir -p $PKG/install
  45. cat $CWD/slack-desc > $PKG/install/slack-desc
  46. cd $PKG
  47. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE