template (1980B)
1 # Template file for 'openssl' 2 pkgname=openssl 3 version=3.5.8 4 revision=4 5 short_desc="Cryptography and TLS library and tools" 6 maintainer="finwo <finwo@pm.me>" 7 license="Apache-2.0" 8 homepage="https://www.openssl.org" 9 distfiles="https://www.openssl.org/source/openssl-3.5.8.tar.gz" 10 checksum=a8f84a39918ec6415ce765d9b429d313ba97b8143169c172e734b9514464f5b2 11 # glibc first: the post-install runs /sbin/ldconfig, which needs libc 12 # present. busybox first: control scripts run under /bin/sh, which must 13 # exist before the script executes (ordering, not just runtime truth - 14 # apk runs each package's scripts right after unpacking it). 15 depends="glibc busybox" 16 hostmakedepends="perl" 17 18 # Notes: 19 # - 3.5 is the LTS line (supported to 2030); the 3.6 feature line is 20 # deliberately not taken. Pin cross-checked against the published .sha256. 21 # - perl is build-only (same category as python3 for glibc), never shipped. 22 # - no-docs skips the multi-thousand-page man build; ship code only. 23 # - Shared-only per packages/README.md: the .a files (tens of MB) are 24 # removed after install. 25 # - install_sw (software without docs) into DESTDIR and SYSROOT; the 26 # sysroot .pc copies get the prefix rewrite so apk-tools' muon/meson 27 # configure links under the sysroot. 28 29 do_configure() { 30 cd "${WRKSRC}" 31 case "${ARCH:-x86_64}" in 32 x86_64) _ossl_target=linux-x86_64 ;; 33 aarch64|arm64) _ossl_target=linux-aarch64 ;; 34 *) die "openssl: unsupported ARCH ${ARCH}" ;; 35 esac 36 perl ./Configure --prefix=/usr --libdir=lib no-docs "${_ossl_target}" 37 } 38 39 do_build() { 40 cd "${WRKSRC}" 41 make -j"$(nproc)" 42 } 43 44 do_install() { 45 cd "${WRKSRC}" 46 make install_sw DESTDIR="${DESTDIR}" 47 make install_sw DESTDIR="${SYSROOT}" 48 rm -f "${DESTDIR}/usr/lib/libcrypto.a" "${DESTDIR}/usr/lib/libssl.a" 49 rm -f "${SYSROOT}/usr/lib/libcrypto.a" "${SYSROOT}/usr/lib/libssl.a" 50 for pc in libcrypto.pc libssl.pc openssl.pc; do 51 [ -f "${SYSROOT}/usr/lib/pkgconfig/${pc}" ] || die "openssl: no sysroot ${pc}" 52 done 53 }