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

57 lines
1.2 KiB
Bash
Raw Normal View History

2020-09-05 19:10:22 +00:00
#!/bin/bash
2022-07-12 15:54:12 +00:00
SCRIPT_REPO="https://github.com/openssl/openssl.git"
SCRIPT_COMMIT="OpenSSL_1_1_1q"
SCRIPT_TAGFILTER="OpenSSL_1_1_1*"
2020-09-05 19:10:22 +00:00
ffbuild_enabled() {
2020-09-05 19:50:11 +00:00
return 0
2020-09-05 19:10:22 +00:00
}
ffbuild_dockerbuild() {
2022-07-12 15:54:12 +00:00
git-mini-clone "$SCRIPT_REPO" "$SCRIPT_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"
)
2020-09-27 20:10:05 +00:00
if [[ $TARGET == win64 ]]; then
2020-09-05 19:10:22 +00:00
myconf+=(
--cross-compile-prefix="$FFBUILD_CROSS_PREFIX"
mingw64
)
2020-09-27 20:10:05 +00:00
elif [[ $TARGET == win32 ]]; then
myconf+=(
--cross-compile-prefix="$FFBUILD_CROSS_PREFIX"
mingw
)
elif [[ $TARGET == linux64 ]]; then
myconf+=(
--cross-compile-prefix="$FFBUILD_CROSS_PREFIX"
linux-x86_64
)
2022-05-09 22:15:31 +00:00
elif [[ $TARGET == linuxarm64 ]]; then
myconf+=(
--cross-compile-prefix="$FFBUILD_CROSS_PREFIX"
linux-aarch64
)
2020-09-05 19:10:22 +00:00
else
echo "Unknown target"
return -1
fi
2021-04-04 21:20:31 +00:00
./Configure "${myconf[@]}"
2020-09-05 19:10:22 +00:00
2021-04-04 21:20:31 +00:00
sed -i -e "/^CFLAGS=/s|=.*|=${CFLAGS}|" -e "/^LDFLAGS=/s|=[[:space:]]*$|=${LDFLAGS}|" Makefile
2020-09-05 19:10:22 +00:00
2021-04-04 21:20:31 +00:00
make -j$(nproc)
make install_sw
2020-09-05 19:10:22 +00:00
}