#!/bin/bash # ============================================================================ # DarkForge Linux — Phase 3, Chapter 8.49: OpenSSL # ============================================================================ # Purpose: Build OpenSSL, cryptography library and tools for secure # communications (SSL/TLS). Required by wget, curl, and many packages. # Inputs: /sources/openssl-3.5.0.tar.gz # Outputs: OpenSSL library and tools in /usr/ # Assumes: Running inside chroot # Ref: LFS 13.0 §8.49 # ============================================================================ set -euo pipefail source /sources/toolchain-scripts/100-chroot-env.sh PACKAGE="openssl" VERSION="3.5.0" echo "=== Building ${PACKAGE}-${VERSION} (Phase 3) ===" pkg_extract "${PACKAGE}-${VERSION}.tar.gz" cd "${PACKAGE}-${VERSION}" # Configure OpenSSL with shared libraries and position-independent code ./config \ --prefix=/usr \ --openssldir=/etc/ssl \ --libdir=lib \ shared \ zlib-dynamic make make install # Create symlinks for compatibility cd /usr/lib64 ln -sfv libcrypto.so.3 libcrypto.so 2>/dev/null || true ln -sfv libssl.so.3 libssl.so 2>/dev/null || true cd /usr/lib ln -sfv libcrypto.so.3 libcrypto.so 2>/dev/null || true ln -sfv libssl.so.3 libssl.so 2>/dev/null || true pkg_cleanup "${PACKAGE}-${VERSION}" echo "=== ${PACKAGE}-${VERSION} complete ==="