Skip to content
Snippets Groups Projects
Commit cd2f8a51 authored by Andreas Schärtl's avatar Andreas Schärtl
Browse files

add build_virtuoso.sh

While I do not intend to use this again it's nice to have all in one
place (i.e. this repo).
parent f63c4bc5
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env bash
# Script that builds Virtuoso. It first downloads and installs an old
# verison of OpenSSL for use w/ Virtuoso.
#
# https://gist.github.com/sven-h/b53aa87b78030fd97444d61580c67e1f#file-build_virtuoso-sh
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
# check that everything is installed:
for package in build-essential dpkg-dev autoconf automake libtool flex bison gperf gawk m4 make odbcinst libxml2-dev libreadline-dev; do # libssl-dev
if dpkg-query -s $package 1>/dev/null 2>&1; then
echo $package installed
else
echo $package NOT installed - exiting
exit 1
fi
done
#HOT FIX (build own openssl) - based on https://github.com/openlink/virtuoso-opensource/blob/develop/7/README.OpenSSL.md
#https://github.com/openlink/virtuoso-opensource/issues/781 - (OpenSSL 1.1 is not yet supported.)
SSL_VIRTUOSO_VERSION=1.0.2p
mkdir ssl_home
wget https://www.openssl.org/source/openssl-$SSL_VIRTUOSO_VERSION.tar.gz
tar -xvzf openssl-$SSL_VIRTUOSO_VERSION.tar.gz
rm openssl-$SSL_VIRTUOSO_VERSION.tar.gz
cd openssl-$SSL_VIRTUOSO_VERSION
./config --prefix=$SCRIPTPATH/ssl_home shared
make
make install
cd ..
rm -r openssl-$SSL_VIRTUOSO_VERSION
#download virtuoso sources:
VIRTUOSO_VERSION=7.2.5
VIRTUOSO_SOURCE=https://github.com/openlink/virtuoso-opensource/releases/download/v$VIRTUOSO_VERSION/virtuoso-opensource-$VIRTUOSO_VERSION.tar.gz
wget "$VIRTUOSO_SOURCE"
tar -xvzf virtuoso-opensource-$VIRTUOSO_VERSION.tar.gz
rm virtuoso-opensource-$VIRTUOSO_VERSION.tar.gz
mkdir virtuoso_install
cd ./virtuoso-opensource-$VIRTUOSO_VERSION/
LD_LIBRARY_PATH=$SCRIPTPATH/ssl_home/lib ./configure --prefix=$SCRIPTPATH/virtuoso_install --with-readline --program-transform-name="s/isql/isql-v/" --enable-openssl="$SCRIPTPATH/ssl_home"
LD_LIBRARY_PATH=$SCRIPTPATH/ssl_home/lib make
LD_LIBRARY_PATH=$SCRIPTPATH/ssl_home/lib make install
read -p "Update ~/.bashrc to include library path and executable path? [y/n]" -r
if [[ $REPLY =~ ^[Yy]$ ]]; then
echo "This script will now add library path and executable path to users .bashrc"
echo -e "# added by virtuoso installer\nexport LD_LIBRARY_PATH=\"$SCRIPTPATH/ssl_home/lib:\$LD_LIBRARY_PATH\"\nexport PATH=\"$SCRIPTPATH/virtuoso_install/bin:\$PATH\"\n" >> ~/.bashrc
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment