diff options
Diffstat (limited to 'libraries/openbabel/openbabel.SlackBuild')
-rw-r--r-- | libraries/openbabel/openbabel.SlackBuild | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/libraries/openbabel/openbabel.SlackBuild b/libraries/openbabel/openbabel.SlackBuild index a6a7f05468..638623cdb0 100644 --- a/libraries/openbabel/openbabel.SlackBuild +++ b/libraries/openbabel/openbabel.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for openbabel -# Copyright 2006,2007,2008,2009,2010 Robby Workman Northport, Alabama, USA +# Copyright 2006-2011 Robby Workman, Northport, Alabama, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,17 +22,17 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# Thanks to Daniil Bratashov (dn2010@gmail.com) for the cmake conversion + PRGNAM=openbabel -VERSION=2.2.3 +VERSION=2.3.0 BUILD=${BUILD:-1} TAG=${TAG:-_SBo} -# Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i486 ;; arm*) ARCH=arm ;; - # Unless $ARCH is already set, use uname -m for all other archs: *) ARCH=$( uname -m ) ;; esac fi @@ -67,21 +67,23 @@ cd $PRGNAM-$VERSION chown -R root:root . chmod -R a-s,u+w,go-w+r . -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ -./configure \ - --prefix=/usr \ - --libdir=/usr/lib${LIBDIRSUFFIX} \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --mandir=/usr/man \ - --docdir=/usr/doc/$PRGNAM-$VERSION \ - --disable-static \ - --build=$ARCH-slackware-linux +mkdir -p build +cd build + cmake \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DLIB_SUFFIX=${LIBDIRSUFFIX} \ + -DMAN_INSTALL_DIR=/usr/man \ + -DCMAKE_BUILD_TYPE=Release .. + make VERBOSE=1 + make install DESTDIR=$PKG +cd .. -make -make install-strip 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 +mv $PKG/usr/share/man $PKG/usr find $PKG/usr/man -type f -exec gzip -9 {} \; mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION |