#!/bin/sh
#
# Copyright © 2017 Coda Hale (coda.hale@gmail.com)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# The purpose of this file is to install libsodium in
# the Travis CI environment. Outside this environment,
# you would probably not want to install it like this.

set -e

VERSION="1.0.16"
# check if libsodium is already installed
if [ ! -d "$HOME/libsodium/lib" ]; then
  wget "https://github.com/jedisct1/libsodium/releases/download/$VERSION/libsodium-$VERSION.tar.gz"
  tar xvfz "libsodium-$VERSION.tar.gz"
  cd "libsodium-$VERSION"
  ./configure --prefix="$HOME/libsodium" --enable-minimal
  make
  make install
else
  echo 'Using cached directory.'
fi
echo 'export LD_LIBRARY_PATH=$HOME/libsodium/lib:$LD_LIBRARY_PATH' >> $BASH_ENV
#!/bin/sh
#
# Copyright © 2017 Coda Hale (coda.hale@gmail.com)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# The purpose of this file is to install libsodium in
# the Travis CI environment. Outside this environment,
# you would probably not want to install it like this.

set -e

VERSION="1.0.16"
# check if libsodium is already installed
if [ ! -d "$HOME/libsodium/lib" ]; then
  wget "https://github.com/jedisct1/libsodium/releases/download/$VERSION/libsodium-$VERSION.tar.gz"
  tar xvfz "libsodium-$VERSION.tar.gz"
  cd "libsodium-$VERSION"
  ./configure --prefix="$HOME/libsodium" --enable-minimal
  make
  make install
  rm -rf ./libsodium-*
else
  echo 'Using cached directory.'
fi
echo 'export LD_LIBRARY_PATH=$HOME/libsodium/lib:$LD_LIBRARY_PATH' >> $BASH_ENV
Remove temp build stuff for CI.
Remove temp build stuff for CI.
