ess.SlackBuild 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #!/bin/bash
  2. # Slackware build script for ESS (Emacs Speaks Statistics)
  3. # Written by Joel J. Adamson <adamsonj@email.unc.edu>
  4. # Maintained by Nicky Chorley <nick.chorley@gmail.com>
  5. cd $(dirname $0) ; CWD=$(pwd)
  6. PRGNAM=ess
  7. VERSION=${VERSION:-17.11}
  8. BUILD=${BUILD:-1}
  9. TAG=${TAG:-_SBo}
  10. PKGTYPE=${PKGTYPE:-tgz}
  11. ARCH=noarch
  12. # If the variable PRINT_PACKAGE_NAME is set, then this script will report what
  13. # the name of the created package would be, and then exit. This information
  14. # could be useful to other scripts.
  15. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
  16. echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
  17. exit 0
  18. fi
  19. TMP=${TMP:-/tmp/SBo}
  20. PKG=$TMP/package-$PRGNAM
  21. OUTPUT=${OUTPUT:-/tmp}
  22. set -e
  23. rm -rf $PKG
  24. mkdir -p $TMP $PKG/usr $OUTPUT
  25. cd $TMP
  26. rm -rf $PRGNAM-$VERSION
  27. tar xvf $CWD/$PRGNAM-$VERSION.tgz
  28. cd $PRGNAM-$VERSION
  29. chown -R root:root .
  30. find -L . \
  31. \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
  32. -exec chmod 755 {} \; -o \
  33. \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
  34. -exec chmod 644 {} \;
  35. make all DOCDIR=/usr/doc/$PRGNAM-$VERSION
  36. make install DESTDIR=$PKG/usr DOCDIR=$PKG/usr/doc/$PRGNAM-$VERSION
  37. rm -f $PKG/usr/share/info/dir
  38. gzip -9 $PKG/usr/share/info/*
  39. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  40. cp -a \
  41. VERSION COPYING OONEWS ANNOUNCE NEWS ONEWS \
  42. $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