# Depends on perl

# Exit on error:
set -e

wget https://www.openssl.org/source/old/1.0.1/openssl-1.0.1i.tar.gz
tar xf openssl-1.0.1i.tar.gz
cd openssl-1.0.1i

# --prefix=/usr is required!
./config --prefix=/usr \
    --openssldir=/etc/ssl \
    shared

make -j1

# Install without the documentation:
make install_sw

cd ..
rm -rf openssl-1.0.1i
rm openssl-1.0.1i.tar.gz

exit 0
