109 lines
2.7 KiB
Bash
109 lines
2.7 KiB
Bash
# Template file for 'openssl'
|
|
pkgname=openssl
|
|
version=3.3.2
|
|
revision=1
|
|
bootstrap=yes
|
|
build_style=configure
|
|
configure_script="./Configure"
|
|
configure_args="--prefix=/usr --openssldir=/etc/ssl --libdir=lib
|
|
shared enable-ktls $(vopt_if asm ' ' 'no-asm')
|
|
-Wa,--noexecstack"
|
|
make_cmd=make
|
|
make_build_args='MAKEDEPPROG="$(CC)'
|
|
make_check_target=test
|
|
make_install_args="MANSUFFIX=ssl"
|
|
short_desc="Toolkit for Secure Sockets Layer and Transport Layer Security"
|
|
maintainer="John <me@johnnynator.dev>"
|
|
license="Apache-2.0"
|
|
homepage="https://openssl-library.org"
|
|
distfiles="https://github.com/openssl/openssl/releases/download/openssl-${version}/openssl-${version}.tar.gz"
|
|
checksum=2e8a40b01979afe8be0bbfb3de5dc1c6709fedb46d6c89c10da114ab5fc3d281
|
|
conf_files="/etc/ssl/openssl.cnf"
|
|
replaces="libressl>=0"
|
|
|
|
CFLAGS="-D_FILE_OFFSET_BITS=64 -DLARGEFILE_SOURCE=1"
|
|
|
|
build_options=asm
|
|
|
|
if [ "$CHROOT_READY" ]; then
|
|
hostmakedepends="perl"
|
|
build_options_default="asm"
|
|
else
|
|
# openssl-c_rehash depends on perl, ignore on bootstrap
|
|
subpackages="libcrypto3 libssl3 openssl-devel"
|
|
fi
|
|
|
|
case $XBPS_TARGET_MACHINE in
|
|
x86_64*) configure_args+=" enable-ec_nistp_64_gcc_128 linux-x86_64";;
|
|
i686*) configure_args+=" linux-elf";;
|
|
aarch64*) configure_args+=" linux-aarch64";;
|
|
ppc64le*) configure_args+=" linux-ppc64le";;
|
|
ppc64*) configure_args+=" linux-ppc64";;
|
|
ppcle*) configure_args+=" linux-ppcle";;
|
|
ppc*) configure_args+=" linux-ppc";;
|
|
arm*) configure_args+=" linux-armv4";;
|
|
mips*) configure_args+=" linux-mips32 -mips32";;
|
|
riscv64*) configure_args+=" linux64-riscv64";;
|
|
*) broken="$XBPS_TARGET_MACHINE";;
|
|
esac
|
|
|
|
pre_configure() {
|
|
configure_args+=" ${CPPFLAGS} ${CFLAGS} ${LDFLAGS}"
|
|
}
|
|
|
|
pre_build() {
|
|
make ${makejobs} depend
|
|
}
|
|
|
|
post_install() {
|
|
if [ ! "$CHROOT_READY" ]; then
|
|
rm -f "${DESTDIR}/usr/bin/c_rehash" "${DESTDIR}/usr/share/man/man1/c_rehash.1ssl"
|
|
fi
|
|
}
|
|
|
|
libcrypto3_package() {
|
|
short_desc+=" - crypto library"
|
|
pkg_install() {
|
|
vmove "usr/lib/libcrypto.so.*"
|
|
vmove usr/lib/engines-3
|
|
}
|
|
}
|
|
|
|
libssl3_package() {
|
|
short_desc+=" - SSL/TLS library"
|
|
pkg_install() {
|
|
vmove "usr/lib/libssl.so.*"
|
|
}
|
|
}
|
|
|
|
openssl-c_rehash_package() {
|
|
short_desc+=" - c_rehash utility"
|
|
depends="openssl perl"
|
|
pkg_install() {
|
|
vmove usr/bin/c_rehash
|
|
vmove usr/share/man/man1/c_rehash.1ssl
|
|
}
|
|
}
|
|
|
|
openssl-devel_package() {
|
|
depends="${sourcepkg}>=${version}_${revision} libssl3>=${version}_${revision} libcrypto3>=${version}_${revision}"
|
|
replaces="libressl-devel>=0"
|
|
short_desc+=" - development files"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove usr/lib/pkgconfig
|
|
vmove usr/lib/cmake
|
|
vmove "usr/lib/*.a"
|
|
vmove "usr/lib/*.so"
|
|
}
|
|
}
|
|
|
|
openssl-doc_package() {
|
|
short_desc+=" - documentation"
|
|
pkg_install() {
|
|
vmove usr/share/man/man3
|
|
vmove usr/share/man/man7
|
|
vmove usr/share/doc
|
|
}
|
|
}
|