# Description: Secure Sockets Layer and Transport Layer Security tools
# URL: https://www.openssl.org/
# Maintainer: CRUX compat-32 Team, compat-32-ports at crux dot nu
# Depends on: zlib-32

name=openssl-32
version=3.6.3
release=1
source=(https://github.com/openssl/openssl/releases/download/openssl-$version/openssl-$version.tar.gz)

build() {
    cd openssl-$version

    ./Configure --prefix=/usr \
        --libdir=/usr/lib32 \
        --openssldir=/etc/ssl \
        shared \
        threads \
        zlib \
        shared no-ssl3-method linux-elf \
        disable-tests \

    sed -i "s|-O3|$CFLAGS|" Makefile

    make depend
    make
    make -j1 DESTDIR=$PKG install_sw

    find $PKG -name "*fips*" -delete
    rm -r $PKG/usr/{include,bin}
}
