summaryrefslogtreecommitdiff
path: root/academic/geomview/geomview.SlackBuild
diff options
context:
space:
mode:
authorJorge Barros de Abreu <ficmatin10@gmail.com>2013-01-13 20:22:33 +0100
committerdsomero <xgizzmo@slackbuilds.org>2013-01-20 09:03:04 -0500
commit79a9b6ba53684f2ce0bc375c3475a9d104bcf665 (patch)
treecb3ba2f02429ddaa5b7b3ea3d0692863d4da4c1d /academic/geomview/geomview.SlackBuild
parent05baa858d9fcd2f7801f9b08c8c58cfe73f4a824 (diff)
downloadslackbuilds-79a9b6ba53684f2ce0bc375c3475a9d104bcf665.tar.gz
academic/geomview: Added (3D geometrical package).
(lots of changes --ponce) Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'academic/geomview/geomview.SlackBuild')
-rw-r--r--academic/geomview/geomview.SlackBuild100
1 files changed, 100 insertions, 0 deletions
diff --git a/academic/geomview/geomview.SlackBuild b/academic/geomview/geomview.SlackBuild
new file mode 100644
index 0000000000..ca3d5e741b
--- /dev/null
+++ b/academic/geomview/geomview.SlackBuild
@@ -0,0 +1,100 @@
+#!/bin/sh
+
+# Slackware build script for geomview
+
+# Written by (Jorge Barros de Abreu)
+# (http://sites.google.com/site/ficmatinf)
+
+PRGNAM=geomview
+VERSION=${VERSION:-1.9.4}
+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
+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 . \
+ \( -perm 777 -o -perm 775 -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 {} \;
+
+#
+#geomview compilation
+#
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --build=$ARCH-slackware-linux \
+ --host=$ARCH-slackware-linux \
+ --disable-static \
+ --with-opengl=/usr/X11R6
+
+make
+make install DESTDIR=$PKG
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+( cd $PKG/usr/info
+ gzip -c -9 $PRGNAM > $PRGNAM.info.gz
+ gzip -c -9 $PRGNAM-1 > $PRGNAM.info-1.gz
+ gzip -c -9 $PRGNAM-2 > $PRGNAM.info-2.gz
+ rm -fr dir figs $PRGNAM-* $PRGNAM )
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ doc/figs doc/*.txt doc/*.c doc/*.tcl doc/README* doc/*.gvplot doc/oogltour* \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+rm -f $PKG/usr/doc/$PRGNAM-$VERSION/*.pdf # We already have the html ones
+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}