1 # Maintainer: Pierre Schmitz <pierre@archlinux.de>
6 pkgdesc='The Open Source toolkit for Secure Sockets Layer and Transport Layer Security'
8 url='https://www.openssl.org'
12 optdepends=('ca-certificates' 'perl')
13 replaces=('openssl-perl' 'openssl-doc')
14 provides=('libcrypto.so' 'libssl.so')
15 backup=('etc/ssl/openssl.cnf')
16 source=("https://www.openssl.org/source/${pkgname}-${pkgver}.tar.gz"{,.asc}
18 sha256sums=('6c13d2bf38fdf31eac3ce2a347073673f5d63263398f1f69d0df4a41253e4b3e'
20 '0a32d9ca68e8d985ce0bfef6a4c20b46675e06178cc2d0bf6d91bd6865d648b7')
21 validpgpkeys=('8657ABB260F056B1E5190839D9C4D26D0E604491'
22 '7953AC1FBC3DC8B3B292393ED5E9E43F7DF9EE8C'
23 'A21FAB74B0088AA361152586B8EF1A6BA9DA2D5C')
26 cd "$srcdir/$pkgname-$pkgver"
28 # set ca dir to /etc/ssl by default
29 patch -Np1 -i "$srcdir/ca-dir.patch"
33 cd "$srcdir/$pkgname-$pkgver"
35 # mark stack as non-executable: http://bugs.archlinux.org/task/12434
36 ./Configure --prefix=/usr --openssldir=/etc/ssl --libdir=lib \
37 shared enable-ktls enable-ec_nistp_64_gcc_128 linux-x86_64 \
38 "-Wa,--noexecstack ${CPPFLAGS} ${CFLAGS} ${LDFLAGS}"
45 cd "$srcdir/$pkgbase-$pkgver"
47 # the test fails due to missing write permissions in /etc/ssl
48 # revert this patch for make test
49 patch -Rp1 -i "$srcdir/ca-dir.patch"
51 make HARNESS_JOBS=$(nproc) test
53 patch -Np1 -i "$srcdir/ca-dir.patch"
54 # re-run make to re-generate CA.pl from the patched .in file.
59 cd "$srcdir/$pkgname-$pkgver"
61 make DESTDIR="$pkgdir" MANDIR=/usr/share/man MANSUFFIX=ssl install_sw install_ssldirs install_man_docs
63 install -D -m644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt"