Path: blob/main/Sage_base/sage/openssl/build_openssl.sh
244 views
VERSION=3.4.01SRC_DIR=openssl-${VERSION}2SRC_ARCHIVE=openssl-${VERSION}.tar.gz3URL=https://github.com/openssl/openssl/releases/download/${SRC_DIR}/${SRC_ARCHIVE}4HASH=5c2f33c3f3601676f225109231142cdc30d441275INSTALL_PREFIX=`pwd`/local67set -e8cd openssl910if ! [ -e ${SRC_ARCHIVE} ]; then11echo "Downloading source archive ${SRC_ARCHIVE}..."12curl -L -O ${URL}13ACTUAL_HASH=`/usr/bin/shasum ${SRC_ARCHIVE} | cut -f 1 -d' '`14if [[ ${ACTUAL_HASH} != ${HASH} ]]; then15echo Invalid hash value for ${SRC_ARCHIVE}16exit 117fi18fi1920if ! [ -d ${SRC_DIR} ]; then21tar xfz ${SRC_ARCHIVE}22pushd ${SRC_DIR}23if [ -e ../patches ]; then24for patchfile in `ls ../patches`; do25patch -p1 < ../patches/$patchfile26done27fi28popd29fi3031cd ${SRC_DIR}3233if [ -e Makefile ]; then34make distclean35fi3637./config --prefix=${INSTALL_PREFIX} no-asm38make -j839make install_runtime40make install_programs41make install_ssldirs42make install_dev434445