From f20e16cc5287bbda04725dded30ea3eb1c19c77e Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Tue, 4 Sep 2012 08:36:55 +0200 Subject: Support for manual OB install --- debian.list | 2 -- install | 1 + openbabel-install | 45 +++++++++++++++++++++++++++++++++++++++++++++ ubuntu.list | 2 -- 4 files changed, 46 insertions(+), 4 deletions(-) create mode 100755 openbabel-install diff --git a/debian.list b/debian.list index e26c1b0..b10234d 100644 --- a/debian.list +++ b/debian.list @@ -9,8 +9,6 @@ libavahi-client-dev install libcairo2-dev install libglib2.0-dev install libgsl0-dev install -libopenbabel4 install -libopenbabel-dev install libopenssl-ruby install libpcre3-dev install libraptor1-dev install diff --git a/install b/install index 00355a7..c8f335f 100755 --- a/install +++ b/install @@ -41,6 +41,7 @@ echo [ -f $OT_DEFAULT_CONF ] || (cmd="echo '\$aa = { :uri => nil }' > $OT_DEFAULT_CONF" && run_cmd "$cmd" "default.rb => $HOME/.opentox/config") . ./base-install # Debian specific; disable this for others. +./openbabel-install # Download, compile and build openbabel. Install to OT_PREFIX ./raptor2-install # Download, compile and build raptor2. Install to OT_PREFIX. ./rasqal-install # Download, compile and build rasqal. Install to OT_PREFIX. ./4store-install # Download, compile and build 4store. Install to OT_PREFIX. diff --git a/openbabel-install b/openbabel-install new file mode 100755 index 0000000..8656a4e --- /dev/null +++ b/openbabel-install @@ -0,0 +1,45 @@ +#!/bin/sh + +# Installs 4store on Debian and compatible systems. +# Author: Andreas Maunz + +DIR=`pwd` + +# Boot +. ./utils.sh || (echo "Utils could not be loaded, check opentox-ui.sh." 1>&2 && exit 1) +SELF=$(basename $0 -install) +check_log $SELF +[ "`id -u`" = "0" ] && echo "This script must not be run as root" 1>&2 && exit 1 +check_utils "wget cmake tar" + +# Build +cd $OT_PREFIX/tmp/ +mkdir $SELF 2>/dev/null +cd $SELF +cmd="$WGET http://downloads.sourceforge.net/project/openbabel/openbabel/$OB_NUM_VER/openbabel-$OB_NUM_VER.tar.gz" && run_cmd "$cmd" "Download" +cmd="$TAR zxf $OB_VER.tar.gz $OB_VER" && run_cmd "$cmd" "Unpack" +mkdir build 2>/dev/null +cd build +cmd="$CMAKE ../$OB_VER -DCMAKE_INSTALL_PREFIX=$OB_DEST" && run_cmd "$cmd" "Cmake" +cmd="make -j2" && run_cmd "$cmd" "Make" +cmd="make install" && run_cmd "$cmd" "Make Install" + +# Config +if [ ! -f "$OB_CONF" ]; then + echo "if echo \"\$PATH\" | grep -v \"$OB_DEST\">/dev/null 2>&1; then export PATH=\"$OB_DEST/bin:\$PATH\"; fi" >> "$OB_CONF" + echo "if echo \"\$LD_LIBRARY_PATH\" | grep -v \"$OB_DEST\">/dev/null 2>&1; then export LD_LIBRARY_PATH=\"$OB_DEST/lib:\$LD_LIBRARY_PATH\"; fi" >> "$OB_CONF" + echo "if ! [ -d \"$OB_DEST\" ]; then echo \"\$0: '$OB_DEST' is not a directory!\"; fi" >> "$OB_CONF" + echo "if [ -z \"\$BABEL_LIBDIR\" ]; then export BABEL_LIBDIR=\"$OB_DEST/lib/openbabel/$OB_NUM_VER\"; fi" >> "$OB_CONF" + echo "if ! [ -d \"\$BABEL_LIBDIR\" ]; then echo \"\$0: '\$BABEL_LIBDIR' is not a directory!\"; fi" >> "$OB_CONF" + echo "if [ -z \"\$BABEL_DATADIR\" ]; then export BABEL_DATADIR=\"$OB_DEST/share/openbabel/$OB_NUM_VER\"; fi" >> "$OB_CONF" + echo "if ! [ -d \"\$BABEL_DATADIR\" ]; then echo \"\$0: '\$BABEL_DATADIR' is not a directory!\"; fi" >> "$OB_CONF" + echo "Openbabel configuration has been stored in '$OB_CONF'." + if ! grep "$OB_CONF" $OT_UI_CONF >/dev/null 2>&1 ; then + echo ". \"$OB_CONF\"" >> $OT_UI_CONF + fi +fi + +notify + +# return to wd +cd $DIR diff --git a/ubuntu.list b/ubuntu.list index 73be6d9..923759d 100644 --- a/ubuntu.list +++ b/ubuntu.list @@ -8,8 +8,6 @@ libavahi-glib-dev install libavahi-client-dev install libglib2.0-dev install libgsl0-dev install -libopenbabel4 install -libopenbabel-dev install libopenssl-ruby install libpcre3-dev install libraptor1-dev install -- cgit v1.2.3