1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-11-22 17:39:53 +03:00
SoftEtherVPN/.ci/build-openssl.sh
Davide Beatrici 7f499d0e5f Travis CI: add MacOS target and create scripts files (#523)
* makefiles: add /usr/local/opt/openssl/include and /usr/local/opt/openssl/lib as include paths on MacOS

* Travis CI: add MacOS target and create scripts files
2018-05-02 23:12:01 +02:00

24 lines
714 B
Bash
Executable File

#!/bin/bash
set -eux
download_openssl () {
if [[ ! -f "download-cache/openssl-${OPENSSL_VERSION}.tar.gz" ]]; then
wget -P download-cache/ \
"https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz"
fi
}
build_openssl () {
if [[ "$(cat ${OPENSSL_INSTALL_DIR}/.openssl-version)" != "${OPENSSL_VERSION}" ]]; then
tar zxf "download-cache/openssl-${OPENSSL_VERSION}.tar.gz"
cd "openssl-${OPENSSL_VERSION}/"
./config shared --prefix="${OPENSSL_INSTALL_DIR}" --openssldir="${OPENSSL_INSTALL_DIR}" -DPURIFY
make all install_sw
echo "${OPENSSL_VERSION}" > "${OPENSSL_INSTALL_DIR}/.openssl-version"
fi
}
download_openssl
build_openssl