geos.SlackBuild 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #!/bin/sh
  2. # Slackware build script for geos
  3. # Written by Kyle Guinn <elyk03@gmail.com>
  4. # Maintained by Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
  5. PRGNAM=geos
  6. VERSION=${VERSION:-3.5.0}
  7. BUILD=${BUILD:-1}
  8. TAG=${TAG:-_SBo}
  9. if [ -z "$ARCH" ]; then
  10. case "$( uname -m )" in
  11. i?86) ARCH=i486 ;;
  12. arm*) ARCH=arm ;;
  13. *) ARCH=$( uname -m ) ;;
  14. esac
  15. fi
  16. CWD=$(pwd)
  17. TMP=${TMP:-/tmp/SBo}
  18. PKG=$TMP/package-$PRGNAM
  19. OUTPUT=${OUTPUT:-/tmp}
  20. if [ "$ARCH" = "i486" ]; then
  21. SLKCFLAGS="-O2 -march=i486 -mtune=i686"
  22. LIBDIRSUFFIX=""
  23. elif [ "$ARCH" = "i686" ]; then
  24. SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  25. LIBDIRSUFFIX=""
  26. elif [ "$ARCH" = "x86_64" ]; then
  27. SLKCFLAGS="-O2 -fPIC"
  28. LIBDIRSUFFIX="64"
  29. else
  30. SLKCFLAGS="-O2"
  31. LIBDIRSUFFIX=""
  32. fi
  33. set -e
  34. rm -rf $PKG
  35. mkdir -p $TMP $PKG $OUTPUT
  36. cd $TMP
  37. rm -rf $PRGNAM-$VERSION
  38. tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
  39. cd $PRGNAM-$VERSION
  40. chown -R root:root .
  41. find -L . \
  42. \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
  43. -exec chmod 755 {} \; -o \
  44. \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 \
  45. -o -perm 400 \) -exec chmod 644 {} \;
  46. CFLAGS="$SLKCFLAGS" \
  47. CXXFLAGS="$SLKCFLAGS" \
  48. ./configure \
  49. --prefix=/usr \
  50. --libdir=/usr/lib$LIBDIRSUFFIX \
  51. --sysconfdir=/etc \
  52. --localstatedir=/var \
  53. --infodir=/usr/info \
  54. --mandir=/usr/man \
  55. --docdir=/usr/doc/$PRGNAM-$VERSION \
  56. --enable-shared \
  57. --disable-static \
  58. --enable-python \
  59. --disable-ruby \
  60. --build=$ARCH-slackware-linux
  61. make
  62. make install-strip DESTDIR=$PKG
  63. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  64. cp -a \
  65. AUTHORS COPYING ChangeLog INSTALL NEWS README TODO \
  66. $PKG/usr/doc/$PRGNAM-$VERSION
  67. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  68. mkdir -p $PKG/install
  69. cat $CWD/slack-desc > $PKG/install/slack-desc
  70. cd $PKG
  71. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}