lfs-buildscripts/CH8Build/CH08.49b-openssl.sh
2024-10-08 18:50:04 -07:00

46 lines
859 B
Bash

#!/bin/bash
source versions.sh
GLSOURCES="/sources"
pushd ${GLSOURCES} > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
[ -d openssl-${openssl_version} ] && rm -rf openssl-${openssl_version}
tar -zxf ${openssl_tarball}
cd openssl-${openssl_version}
./config --prefix=/opt/openssl \
--openssldir=/opt/openssl/ssl \
--libdir=lib \
shared \
zlib-dynamic
make
if [ $? -ne 0 ]; then
myfail "Failed building openssl"
fi
if [ ! -f ${GLSOURCES}/SKIPTESTS ]; then
echo "running openssl make test"
HARNESS_JOBS=$(nproc) make test > ${GLSOURCES}/openssl.check.log 2>&1
fi
sed -i '/INSTALL_LIBS/s/libcrypto.a libssl.a//' Makefile
make MANSUFFIX=ssl install
if [ $? -ne 0 ]; then
myfail "Failed installing openssl"
fi
popd
# cleanup
pushd $GLSOURCES
rm -rf openssl-${openssl_version}
popd