evopedia_qt.SlackBuild 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #!/bin/bash
  2. #
  3. # Slackware build script for evopedia
  4. #
  5. # Written by Dan-Simon Myrland <dansimon@radiotube.org>
  6. cd $(dirname $0) ; CWD=$(pwd)
  7. PRGNAM=evopedia_qt
  8. VERSION=${VERSION:-0.4.4}
  9. BUILD=${BUILD:-1}
  10. TAG=${TAG:-_SBo}
  11. PKGTYPE=${PKGTYPE:-tgz}
  12. if [ -z "$ARCH" ]; then
  13. case "$( uname -m )" in
  14. i?86) ARCH=i586 ;;
  15. arm*) ARCH=arm ;;
  16. *) ARCH=$( uname -m ) ;;
  17. esac
  18. fi
  19. # If the variable PRINT_PACKAGE_NAME is set, then this script will report what
  20. # the name of the created package would be, and then exit. This information
  21. # could be useful to other scripts.
  22. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
  23. echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
  24. exit 0
  25. fi
  26. TMP=${TMP:-/tmp/SBo}
  27. PKG=$TMP/package-$PRGNAM
  28. OUTPUT=${OUTPUT:-/tmp}
  29. set -e
  30. rm -rf $PKG
  31. mkdir -p $TMP $PKG $OUTPUT
  32. cd $TMP
  33. rm -rf $PRGNAM-$VERSION
  34. unzip $CWD/v${VERSION}.zip || unzip $CWD/$PRGNAM-$VERSION.zip
  35. cd $PRGNAM-$VERSION
  36. chown -R root:root .
  37. find -L . \
  38. \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
  39. -o -perm 511 \) -exec chmod 755 {} \; -o \
  40. \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
  41. -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
  42. . /etc/profile.d/qt4.sh
  43. # uncomment NO_GUI option for a gui less installation
  44. qmake PREFIX=$PKG/usr #DEFINES+=NO_GUI
  45. make
  46. make install
  47. find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
  48. | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
  49. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  50. cp -a README.md debian/changelog debian/copyright $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.$PKGTYPE