Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
3-manifolds
GitHub Repository: 3-manifolds/Sage_macOS
Path: blob/main/Sage_base/sage/openssl/build_openssl.sh
244 views
1
VERSION=3.4.0
2
SRC_DIR=openssl-${VERSION}
3
SRC_ARCHIVE=openssl-${VERSION}.tar.gz
4
URL=https://github.com/openssl/openssl/releases/download/${SRC_DIR}/${SRC_ARCHIVE}
5
HASH=5c2f33c3f3601676f225109231142cdc30d44127
6
INSTALL_PREFIX=`pwd`/local
7
8
set -e
9
cd openssl
10
11
if ! [ -e ${SRC_ARCHIVE} ]; then
12
echo "Downloading source archive ${SRC_ARCHIVE}..."
13
curl -L -O ${URL}
14
ACTUAL_HASH=`/usr/bin/shasum ${SRC_ARCHIVE} | cut -f 1 -d' '`
15
if [[ ${ACTUAL_HASH} != ${HASH} ]]; then
16
echo Invalid hash value for ${SRC_ARCHIVE}
17
exit 1
18
fi
19
fi
20
21
if ! [ -d ${SRC_DIR} ]; then
22
tar xfz ${SRC_ARCHIVE}
23
pushd ${SRC_DIR}
24
if [ -e ../patches ]; then
25
for patchfile in `ls ../patches`; do
26
patch -p1 < ../patches/$patchfile
27
done
28
fi
29
popd
30
fi
31
32
cd ${SRC_DIR}
33
34
if [ -e Makefile ]; then
35
make distclean
36
fi
37
38
./config --prefix=${INSTALL_PREFIX} no-asm
39
make -j8
40
make install_runtime
41
make install_programs
42
make install_ssldirs
43
make install_dev
44
45