# Maintainer: Chocobo1 # Former maintainer: Eden Rose # Contributor: Pierre Schmitz pkgname=openssl-git pkgver=3.1.0.beta1.r2821.g56a51b5a1e pkgrel=1 pkgdesc="Toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols" arch=('i686' 'x86_64') url="https://www.openssl.org/" license=('Apache') depends=('glibc') makedepends=('git' 'perl') optdepends=('ca-certificates' 'perl') provides=("openssl=$pkgver" 'libcrypto.so' 'libssl.so') conflicts=('openssl') backup=('etc/ssl/openssl.cnf') options=('staticlibs') source=("git+https://github.com/openssl/openssl.git" "ca-dir.patch::https://gitlab.archlinux.org/archlinux/packaging/packages/openssl/-/raw/main/ca-dir.patch") sha256sums=('SKIP' 'SKIP') prepare() { cd "openssl" patch -Np1 -F100 -i "$srcdir/ca-dir.patch" } pkgver() { cd "openssl" _tag=$(git tag -l --sort -v:refname | grep -E '^openssl-[0-9\.]+' | head -n1) _rev=$(git rev-list --count $_tag..HEAD) _hash=$(git rev-parse --short HEAD) printf "%s.r%s.g%s" "$_tag" "$_rev" "$_hash" | sed 's/^openssl-//;s/-/./g' } build() { cd "openssl" if [ "$CARCH" = "x86_64" ]; then _target="linux-x86_64" elif [ "$CARCH" = "i686" ]; then _target="linux-x86" fi ./Configure \ --prefix="/usr" \ --libdir="lib" \ --openssldir="/etc/ssl" \ "$_target" \ "-Wa,--noexecstack $CPPFLAGS $CFLAGS $LDFLAGS" \ shared make depend make } check() { cd "openssl" # the test fails due to missing write permissions in /etc/ssl # revert this patch for make test #patch -Np0 -F100 -R -i "$srcdir/ca-dir.patch" #make test #patch -Np0 -F100 -i "$srcdir/ca-dir.patch" #make apps/CA.pl } package() { cd "openssl" make \ DESTDIR="$pkgdir" \ install_sw \ install_ssldirs \ install_man_docs }