full-pack.SlackBuild 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #!/bin/bash
  2. ## Written by Martin Ivanov (tramni@abv.bg)
  3. ## Package Homepage: http://bgoffice.sourceforge.net/assistant/
  4. ## Feel free to use, modify, redistribute this script.
  5. ## If you make changes please add a "Modified by" line so that I don't
  6. ## receive kudos or flames for things I didn't write... Thanks.
  7. # Modified by Michiel van Wessem <michiel@slackbuilds.org> 20081020
  8. # Modified by Robby Workman <rworkman@slackbuilds.org> 20101209
  9. # * My changes are all good, so flames should still go to Martin... ;-)
  10. # 20220217 bkw: Modified by SlackBuilds.org: get rid of the Makefile
  11. # check for an installed copy of gbgoffice or kbgoffice. Allows the
  12. # package to be built standalone. Having them installed doesn't change
  13. # the contents of this package one whit, anyway.
  14. cd $(dirname $0) ; CWD=$(pwd)
  15. PRGNAM=full-pack
  16. VERSION=${VERSION:-1.0}
  17. BUILD=${BUILD:-1}
  18. TAG=${TAG:-_SBo}
  19. PKGTYPE=${PKGTYPE:-tgz}
  20. ARCH=noarch
  21. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
  22. echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
  23. exit 0
  24. fi
  25. TMP=${TMP:-/tmp/SBo}
  26. PKG=$TMP/package-$PRGNAM
  27. OUTPUT=${OUTPUT:-/tmp}
  28. set -e
  29. # No Compiler flags needed, nothing is actually built
  30. rm -rf $PKG
  31. mkdir -p $TMP $PKG $OUTPUT
  32. cd $TMP
  33. rm -rf $PRGNAM
  34. tar xvf $CWD/$PRGNAM.tar.bz2
  35. cd $PRGNAM
  36. chown -R root:root .
  37. find -L . \
  38. \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
  39. -exec chmod 755 {} \+ -o \
  40. \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
  41. -exec chmod 644 {} \+
  42. # 20220217 bkw: get rid of the check for installed gbgoffice or
  43. # kbgoffice. The data dirs are the same for both (DATA_DIR in the
  44. # make command), so it doesn't matter which one (or if neither one)
  45. # is installed, as far as creating this package is concerned.
  46. sed -i '/^install:/s, .*$,,' Makefile
  47. make DATA_DIR=$PKG/usr/share/bgoffice install
  48. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  49. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  50. find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
  51. | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
  52. mkdir -p $PKG/install
  53. cat $CWD/slack-desc > $PKG/install/slack-desc
  54. cd $PKG
  55. /sbin/makepkg -l y -c n -p $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE