summaryrefslogtreecommitdiffstats
path: root/academic/copasi/copasi.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'academic/copasi/copasi.SlackBuild')
-rw-r--r--academic/copasi/copasi.SlackBuild48
1 files changed, 30 insertions, 18 deletions
diff --git a/academic/copasi/copasi.SlackBuild b/academic/copasi/copasi.SlackBuild
index d446a59979..0a6da4fcfd 100644
--- a/academic/copasi/copasi.SlackBuild
+++ b/academic/copasi/copasi.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for copasi
@@ -22,31 +22,43 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=copasi
-VERSION=${VERSION:-4.27.217}
+VERSION=${VERSION:-4.42.284}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+if [ -z "$ARCH" ]; then
+ ARCH="$(uname -m)"
+fi
-case "$(uname -m)" in
- i?86) ARCH=i586 ;;
- arm*) ARCH=arm ;;
- *) ARCH=$(uname -m) ;;
+case "$ARCH" in
+ i?86)
+ BINNAME="Linux-32bit"
+ ;;
+ x86_64)
+ BINNAME="Linux-64bit"
+ ;;
+ *)
+ echo "$ARCH is not supported by the $PRGNAM build script..."
+ exit 1
+ ;;
esac
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i586" ]; then
- BINNAME="Linux-32bit"
-elif [ "$ARCH" = "x86_64" ]; then
- BINNAME="Linux-64bit"
-else
- echo "$ARCH is not supported by the $PRGNAM build script..."
- exit 1
-fi
-
# This is a repackage of a binary distribution
# CFLAGS are not required
@@ -56,7 +68,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf COPASI-$VERSION-$BINNAME $PRGNAM-$VERSION
-tar xvf $CWD/COPASI-$VERSION-$BINNAME.tar.gz
+sh $CWD/COPASI-$VERSION-$BINNAME.sh -e .
mv COPASI-$VERSION-$BINNAME $PRGNAM-$VERSION
cd $PRGNAM-$VERSION
chown -R root:root .
@@ -80,4 +92,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE