diff options
author | Benjamin Trigona-Harany <slackbuilds@jaxartes.net> | 2014-02-02 06:56:27 +0700 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2014-02-02 02:09:51 -0600 |
commit | 3810c074f7c3fce35a8036814397051026f6dfb1 (patch) | |
tree | 252ca88a35c08a4313ce99a78d77f42bde48398d /gis/proj/proj.SlackBuild | |
parent | ad9c858ef06e72f736f510a3426ffd0d877f885c (diff) |
gis/proj: Moved from System category.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'gis/proj/proj.SlackBuild')
-rw-r--r-- | gis/proj/proj.SlackBuild | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/gis/proj/proj.SlackBuild b/gis/proj/proj.SlackBuild new file mode 100644 index 0000000000000..3dc2f780c9dc7 --- /dev/null +++ b/gis/proj/proj.SlackBuild @@ -0,0 +1,92 @@ +#!/bin/sh + +# Slackware build script for proj +# Written by Kyle Guinn <elyk03@gmail.com> +# Maintained by Benjamin Trigona-Harany <slackbuilds@jaxartes.net> + +PRGNAM=proj +VERSION=${VERSION:-4.8.0} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM-$VERSION +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 \ + -o -perm 400 \) -exec chmod 644 {} \; + +# remove header that is no longer part of source +patch -p1 < $CWD/jni.patch + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --infodir=/usr/info \ + --mandir=/usr/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --enable-shared \ + --disable-static \ + --build=$ARCH-slackware-linux + +make +make install-strip DESTDIR=$PKG + +( cd $PKG/usr/man + find . -type f -exec gzip -9 {} \; + for i in $(find . -type l); do \ + ln -s $(readlink $i).gz $i.gz; \ + rm $i; \ + done +) + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + AUTHORS COPYING ChangeLog INSTALL NEWS README \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |