jobcore/openssl/PKGBUILD
2022-06-22 23:20:11 +03:00

76 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
_ver=1.1.1p
# use a pacman compatible version scheme
pkgver=${_ver/[a-z]/.${_ver//[0-9.]/}}
## Joborun: All this manouver with _ver instead of pkgver is for naming the pkg 1.1.1.l instead of 1.1.1l
## Does it really affect alphanumeric order as 1l, while 1.l works better? Just in case you were wondering, I decided to leave it in tact.
pkgrel=01
pkgdesc='The Open Source toolkit for Secure Sockets Layer and Transport Layer Security'
arch=('x86_64')
url='https://www.openssl.org'
depends=('glibc')
makedepends=('perl')
optdepends=('ca-certificates' 'perl')
replaces=('openssl-perl' 'openssl-doc')
backup=('etc/ssl/openssl.cnf')
source=("https://www.openssl.org/source/${pkgname}-${_ver}.tar.gz"{,.asc}
'ca-dir.patch')
prepare() {
cd "$srcdir/$pkgname-$_ver"
# set ca dir to /etc/ssl by default
patch -p0 -i "$srcdir/ca-dir.patch"
}
build() {
cd "$srcdir/$pkgname-$_ver"
# mark stack as non-executable: http://bugs.archlinux.org/task/12434
./Configure --prefix=/usr --openssldir=/etc/ssl --libdir=lib \
shared no-ssl3-method enable-ec_nistp_64_gcc_128 linux-x86_64 \
"-Wa,--noexecstack ${CPPFLAGS} ${CFLAGS} ${LDFLAGS}"
make depend
make
}
check() {
cd "$srcdir/$pkgbase-$_ver"
# the test fails due to missing write permissions in /etc/ssl
# revert this patch for make test
patch -p0 -R -i "$srcdir/ca-dir.patch"
make test
patch -p0 -i "$srcdir/ca-dir.patch"
# re-run make to re-generate CA.pl from th patched .in file.
make apps/CA.pl
}
package() {
cd "$srcdir/$pkgname-$_ver"
make DESTDIR="$pkgdir" MANDIR=/usr/share/man MANSUFFIX=ssl install_sw install_ssldirs install_man_docs
install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
#---- license gpg-key sha256sums ----
license=('custom:BSD')
validpgpkeys=('8657ABB260F056B1E5190839D9C4D26D0E604491'
'7953AC1FBC3DC8B3B292393ED5E9E43F7DF9EE8C')
sha256sums=(bf61b62aaa66c7c7639942a94de4c9ae8280c08f17d4eac2e44644d9fc8ace6f # openssl-1.1.1p.tar.gz
76e3933d27083db080ce5dfc162859659a29ea7fe44f4949d0a58b5d8320062d # openssl-1.1.1p.tar.gz.asc
75aa8c2c638c8a3ebfd9fa146fc61c7ff878fc997dc6aa10d39e4b2415d669b2) # ca-dir.patch