diff options
Diffstat (limited to 'libraries/openbabel/openbabel.SlackBuild')
-rw-r--r-- | libraries/openbabel/openbabel.SlackBuild | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/libraries/openbabel/openbabel.SlackBuild b/libraries/openbabel/openbabel.SlackBuild index 426fab52d4..82107fc0f2 100644 --- a/libraries/openbabel/openbabel.SlackBuild +++ b/libraries/openbabel/openbabel.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for openbabel -# Copyright 2006-2013 Robby Workman, Northport, Alabama, USA +# Copyright 2006,2013,2021 Robby Workman, Tuscaloosa, Alabama, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -25,14 +25,13 @@ # Thanks to Daniil Bratashov (dn2010@gmail.com) for the cmake conversion PRGNAM=openbabel -VERSION=${VERSION:-2.4.1} -SRCVER=$(echo $VERSION | tr . -) +VERSION=${VERSION:-3.1.1} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac @@ -43,8 +42,8 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -62,9 +61,9 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-$PRGNAM-$SRCVER -tar xvf $CWD/$PRGNAM-$SRCVER.tar.gz -cd $PRGNAM-$PRGNAM-$SRCVER +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION-source.tar.bz2 +cd $PRGNAM-$VERSION chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -85,6 +84,18 @@ cd build make install DESTDIR=$PKG cd .. +# Sigh +if [ "$LIBDIRSUFFIX" == "64" ]; then + sed -i \ + -e "s,/usr/lib/,/usr/lib64/,g" \ + -e "s,IMPORT_PREFIX}/lib/,IMPORT_PREFIX}/lib64/,g" \ + $PKG/usr/lib/cmake/* + mv $PKG/usr/lib/cmake/* $PKG/usr/lib64/cmake + rmdir $PKG/usr/lib/cmake + mv $PKG/usr/lib/* $PKG/usr/lib64/ + rmdir $PKG/usr/lib +fi + 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 @@ -93,7 +104,7 @@ find $PKG/usr/man -type f -exec gzip -9 {} \; mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a \ - AUTHORS COPYING NEWS.md README.md THANKS authors.txt doc/*.html \ + AUTHORS COPYING README.md THANKS authors.txt doc/*.html \ $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild |