install-ubuntu.sh 1.23 KB
Newer Older
Thierry Martinez's avatar
Thierry Martinez committed
1
#!/bin/sh
2
set -e
Thierry Martinez's avatar
Thierry Martinez committed
3
sudo apt-get install libgsl0-dev gnuplot libppl-dev # swi-prolog libsbml5-dev graphviz-dev
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49

if ! swipl -g '
  call_cleanup(
    (
      current_prolog_flag(version, Version),
      Version >= 70203,
      halt(0)
    ),
    halt(1)
  )'
then
  # Compiling swi-prolog from source, expecting that a newer version of
  # swi-prolog should be packaged in the next releases of Ubuntu
  sudo apt-get install libreadline-dev libgmp-dev
  if [[ ! -d swipl-7.2.3 ]]; then
    if [[ ! -f swipl-7.2.3.tar.gz ]]; then
      wget http://www.swi-prolog.org/download/stable/src/swipl-7.2.3.tar.gz
    fi
    tar -xf swipl-7.2.3.tar.gz
  fi
  pushd .
  cd swipl-7.2.3
  ./configure
  make
  sudo make install
  popd
fi

if ! pkg-config --atleast-version 5.11.4 libsbml
then
  # Compiling libSBML from source, expecting that libSBML should
  # be packaged in the next releases of Ubuntu
  sudo apt-get install libxml2-dev
  if [[ ! -d libsbml-5.12.0 ]]; then
    if [[ ! -f libSBML-5.12.0-core-src.tar.gz ]]; then
      wget http://downloads.sourceforge.net/project/sbml/libsbml/5.12.0/stable/libSBML-5.12.0-core-src.tar.gz
    fi
    tar -xf libSBML-5.12.0-core-src.tar.gz
  fi
  pushd .
  cd libsbml-5.12.0
  ./configure
  make
  sudo make install
  popd
fi