jobcore/openssl/PKGBUILD
2023-08-01 20:06:22 +03:00

81 lines
2.4 KiB
Bash

#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
# Website : https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=openssl
pkgver=3.1.2
pkgrel=01
pkgdesc='The Open Source toolkit for Secure Sockets Layer and Transport Layer Security'
url='https://www.openssl.org'
depends=('glibc')
makedepends=('perl')
optdepends=('ca-certificates' 'perl')
replaces=('openssl-perl' 'openssl-doc')
provides=('libcrypto.so' 'libssl.so')
backup=('etc/ssl/openssl.cnf')
source=("https://www.openssl.org/source/${pkgname}-${pkgver}.tar.gz"{,.asc}
'ca-dir.patch')
prepare() {
cd "$srcdir/$pkgname-$pkgver"
# set ca dir to /etc/ssl by default
patch -Np1 -i "$srcdir/ca-dir.patch"
}
build() {
cd "$srcdir/$pkgname-$pkgver"
# mark stack as non-executable: http://bugs.archlinux.org/task/12434
./Configure --prefix=/usr --openssldir=/etc/ssl --libdir=lib \
shared enable-ktls enable-ec_nistp_64_gcc_128 linux-x86_64 \
"-Wa,--noexecstack ${CPPFLAGS} ${CFLAGS} ${LDFLAGS}"
make depend
make
}
check() {
cd "$srcdir/$pkgbase-$pkgver"
# the test fails due to missing write permissions in /etc/ssl
# revert this patch for make test
patch -Rp1 -i "$srcdir/ca-dir.patch"
make HARNESS_JOBS=$(nproc) test
patch -Np1 -i "$srcdir/ca-dir.patch"
# re-run make to re-generate CA.pl from the patched .in file.
make apps/CA.pl
}
package() {
cd "$srcdir/$pkgname-$pkgver"
make DESTDIR="$pkgdir" MANDIR=/usr/share/man MANSUFFIX=ssl install_sw install_ssldirs install_man_docs
install -D -m644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt"
}
#---- arch license gpg-key & sha256sums ----
arch=(x86_64)
## license=('custom:BSD') ### license change
license=('Apache')
validpgpkeys=(8657ABB260F056B1E5190839D9C4D26D0E604491
7953AC1FBC3DC8B3B292393ED5E9E43F7DF9EE8C
A21FAB74B0088AA361152586B8EF1A6BA9DA2D5C
EFC0A467D613CB83C7ED6D30D894E2CE8B3D79F5)
sha256sums=(a0ce69b8b97ea6a35b96875235aa453b966ba3cba8af2de23657d8b6767d6539 # openssl-3.1.2.tar.gz
0c14b85a86966752f1cdc2a3306497010d5fb9d405070b64cbb201d7ad1eb61a # openssl-3.1.2.tar.gz.asc
0a32d9ca68e8d985ce0bfef6a4c20b46675e06178cc2d0bf6d91bd6865d648b7) # ca-dir.patch
## 62312202d5b81c93186239406c83a2d1510fc2168a48ba9804c57d8cbb9692f3 openssl-3.1.2-01-x86_64.pkg.tar.lz