FFmpeg-Builds/scripts.d/25-openssl.sh

49 lines
958 B
Bash
Raw Normal View History

2020-09-05 19:10:22 +00:00
#!/bin/bash
OPENSSL_REPO="https://github.com/openssl/openssl.git"
OPENSSL_COMMIT="OpenSSL_1_1_1g"
ffbuild_enabled() {
2020-09-05 19:50:11 +00:00
return 0
2020-09-05 19:10:22 +00:00
}
ffbuild_dockerstage() {
to_df "ADD $SELF /stage.sh"
to_df "RUN run_stage"
}
ffbuild_dockerbuild() {
2020-09-05 20:34:23 +00:00
git-mini-clone "$OPENSSL_REPO" "$OPENSSL_COMMIT" openssl
2020-09-05 19:10:22 +00:00
cd openssl
local myconf=(
threads
zlib
no-shared
enable-camellia
enable-ec
enable-srp
--prefix="$FFBUILD_PREFIX"
)
if [[ $TARGET == win* ]]; then
myconf+=(
--cross-compile-prefix="$FFBUILD_CROSS_PREFIX"
mingw64
)
else
echo "Unknown target"
return -1
fi
./Configure "${myconf[@]}" || return -1
sed -i -e "/^CFLAGS=/s|=.*|=${CFLAGS} -O2|" -e "/^LDFLAGS=/s|=[[:space:]]*$|=${LDFLAGS}|" Makefile || return -1
make -j$(nproc) || return -1
make install_sw || return -1
cd ..
rm -rf openssl
}