diff options
author | Robby Workman <rworkman@slackbuilds.org> | 2010-05-19 13:43:35 -0500 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-05-21 01:20:09 -0500 |
commit | d35e099bc209bfae2fabcf309b007c9c7b62589f (patch) | |
tree | 66f25c8527f63ff1f263944ef595a60408d20337 | |
parent | 9e903c03c97856f6262a547c5f404a0f7dda222c (diff) | |
download | slackbuilds-d35e099bc209bfae2fabcf309b007c9c7b62589f.tar.gz |
academic/chemtool: Miscellaneous cleanups.
-rw-r--r-- | academic/chemtool/chemtool.SlackBuild | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/academic/chemtool/chemtool.SlackBuild b/academic/chemtool/chemtool.SlackBuild index 041f6c979c..f0f8eeb22a 100644 --- a/academic/chemtool/chemtool.SlackBuild +++ b/academic/chemtool/chemtool.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for chemtool -# Copyright 2006-2009 Robby Workman (http://rlworkman.net) +# Copyright 2006,2008,2009,2010 Robby Workman, Northport, Alabama, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -24,10 +24,19 @@ PRGNAM=chemtool VERSION=1.6.9 -ARCH=${ARCH:-i486} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) export ARCH=i486 ;; + arm*) export ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) export ARCH=$( uname -m ) ;; + esac +fi + CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM @@ -42,6 +51,9 @@ elif [ "$ARCH" = "i686" ]; then elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" fi rm -rf $PKG @@ -68,6 +80,8 @@ make install DESTDIR=$PKG find $PKG | xargs 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 {} \; + mkdir -p $PKG/usr/share/{applications,pixmaps} cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop cat $CWD/chemtool.png > $PKG/usr/share/pixmaps/chemtool.png @@ -77,12 +91,6 @@ cp -a examples/ ChangeLog INSTALL NEWS README TODO using_chemtool.html \ $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild -( cd $PKG/usr/man - find . -type f -exec chmod 0644 {} \; - 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/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh |