gnome-doc-utils.SlackBuild 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #!/bin/sh
  2. # Slackbuild Script for gnome-doc-utils
  3. #
  4. # Written by James Rich james@chowhouse.com
  5. #
  6. # Modified by the SlackBuilds.org team.
  7. # Assumed to be public domain per our submission policy
  8. # Script maintained by Frank Caraballo <fecaraballo{at}gmail{dot}com>
  9. PRGNAM=gnome-doc-utils
  10. VERSION=0.12.2
  11. ARCH=${ARCH:-i486}
  12. BUILD=${BUILD:-1}
  13. TAG=${TAG:-_SBo}
  14. CWD=$(pwd)
  15. TMP=${TMP:-/tmp/SBo}
  16. PKG=$TMP/package-$PRGNAM
  17. OUTPUT=${OUTPUT:-/tmp}
  18. # Exit on most errors
  19. set -e
  20. rm -rf $PKG
  21. mkdir -p $TMP $PKG $OUTPUT
  22. cd $TMP
  23. rm -rf $PRGNAM-$VERSION
  24. tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
  25. cd $PRGNAM-$VERSION
  26. chown -R root:root .
  27. find . \
  28. \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
  29. -exec chmod 755 {} \; -o \
  30. \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
  31. -exec chmod 644 {} \;
  32. CFLAGS="$SLKCFLAGS" \
  33. CXXFLAGS="$SLKCFLAGS" \
  34. ./configure \
  35. --prefix=/usr \
  36. --sysconfdir=/etc \
  37. --mandir=/usr/man \
  38. --disable-scrollkeeper
  39. make
  40. make install DESTDIR=$PKG
  41. ( cd $PKG
  42. find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
  43. find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
  44. )
  45. ( cd $PKG/usr/man
  46. find . -type f -exec gzip -9 {} \;
  47. for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
  48. )
  49. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  50. cp -a README COPYING AUTHORS $PKG/usr/doc/$PRGNAM-$VERSION
  51. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  52. mkdir -p $PKG/install
  53. cat $CWD/slack-desc > $PKG/install/slack-desc
  54. cd $PKG
  55. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz