dejagnu.SlackBuild 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. #!/bin/bash
  2. # Slackware build script for Dejagnu
  3. # Written by Andres Fuentes (rafu@riseup.net)
  4. # This script is public domain
  5. cd $(dirname $0) ; CWD=$(pwd)
  6. PRGNAM=dejagnu
  7. VERSION=${VERSION:-1.5}
  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 $OUTPUT
  25. cd $TMP
  26. rm -rf $PRGNAM-$VERSION
  27. tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
  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. ./configure \
  36. --prefix=/usr \
  37. --sysconfdir=/etc \
  38. --localstatedir=/var/lib \
  39. --mandir=/usr/man \
  40. --infodir=/usr/info \
  41. --disable-static \
  42. --build=$ARCH-slackware-linux
  43. make
  44. make install DESTDIR=$PKG
  45. find $PKG/usr/man -type f -exec gzip -9 {} \;
  46. for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
  47. rm -f $PKG/usr/info/dir
  48. gzip -9 $PKG/usr/info/*.info*
  49. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  50. cp -a \
  51. AUTHORS COPYING ChangeLog INSTALL NEWS README TODO \
  52. $PKG/usr/doc/$PRGNAM-$VERSION
  53. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  54. mkdir -p $PKG/install
  55. cat $CWD/slack-desc > $PKG/install/slack-desc
  56. cat $CWD/slack-desc > $PKG/usr/doc/$PRGNAM-$VERSION/slack-desc
  57. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  58. cd $PKG
  59. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE