summaryrefslogtreecommitdiff
path: root/academic/wxmacmolplt/wxmacmolplt.SlackBuild
diff options
context:
space:
mode:
authorDaniil Bratashov <dn2010@gmail.com>2010-05-12 23:27:42 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-12 23:27:42 +0200
commitaf76142369c11ec77a5f7163f2e4bec47eb5b973 (patch)
tree58fabb26104a68fbc18f8a7e90ae7007a0d884f7 /academic/wxmacmolplt/wxmacmolplt.SlackBuild
parent5c40fc4e4f84ea1a71cc3a935e8674721de06248 (diff)
downloadslackbuilds-af76142369c11ec77a5f7163f2e4bec47eb5b973.tar.gz
academic/wxmacmolplt: Added to 12.2 repository
Diffstat (limited to 'academic/wxmacmolplt/wxmacmolplt.SlackBuild')
-rw-r--r--academic/wxmacmolplt/wxmacmolplt.SlackBuild93
1 files changed, 93 insertions, 0 deletions
diff --git a/academic/wxmacmolplt/wxmacmolplt.SlackBuild b/academic/wxmacmolplt/wxmacmolplt.SlackBuild
new file mode 100644
index 0000000000..d1791a0ccb
--- /dev/null
+++ b/academic/wxmacmolplt/wxmacmolplt.SlackBuild
@@ -0,0 +1,93 @@
+#!/bin/sh
+
+# Slackware build script for wxmacmolplt
+
+# Written by Daniil Bratashov <dn2010@gmail.com>
+
+PRGNAM=wxmacmolplt
+VERSION=${VERSION:-7.3}
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+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"
+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
+
+# Fix for PCGAMESS new raman activities format
+patch -p1 -E < $CWD/wxmacmolplt-7.2.1-raman.patch
+
+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 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --without-ming \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --build=$ARCH-slackware-linux
+#libming support is broken in current version
+
+make
+make install DESTDIR=$PKG
+
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+)
+
+mkdir -p $PKG/usr/share/icons/hicolor/128x128/apps
+cp resources/wxmacmolplt.png $PKG/usr/share/icons/hicolor/128x128/apps
+mkdir -p $PKG/usr/share/applications
+cp resources/wxmacmolplt.desktop $PKG/usr/share/applications
+
+( 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 LICENSE NEWS README \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+mv $PKG/usr/share/$PRGNAM/MacMolPlt_Manual.html $PKG/usr/doc/$PRGNAM-$VERSION
+mv $PKG/usr/share/$PRGNAM/Manual_pages $PKG/usr/doc/$PRGNAM-$VERSION
+
+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.tgz