1 # Maintainer: Pierre Schmitz <pierre@archlinux.de>
5 # use a pacman compatible version scheme
6 pkgver=${_ver/[a-z]/.${_ver//[0-9.]/}}
8 pkgdesc='The Open Source toolkit for Secure Sockets Layer and Transport Layer Security'
10 url='https://www.openssl.org'
11 license=('custom:BSD')
14 optdepends=('ca-certificates' 'perl')
15 replaces=('openssl-perl' 'openssl-doc')
16 backup=('etc/ssl/openssl.cnf')
17 source=("https://www.openssl.org/source/${pkgname}-${_ver}.tar.gz"{,.asc}
19 sha256sums=('d7939ce614029cdff0b6c20f0e2e5703158a489a72b2507b8bd51bf8c8fd10ca'
21 '75aa8c2c638c8a3ebfd9fa146fc61c7ff878fc997dc6aa10d39e4b2415d669b2')
22 validpgpkeys=('8657ABB260F056B1E5190839D9C4D26D0E604491'
23 '7953AC1FBC3DC8B3B292393ED5E9E43F7DF9EE8C')
26 cd "$srcdir/$pkgname-$_ver"
28 # set ca dir to /etc/ssl by default
29 patch -p0 -i "$srcdir/ca-dir.patch"
33 cd "$srcdir/$pkgname-$_ver"
35 # mark stack as non-executable: http://bugs.archlinux.org/task/12434
36 ./Configure --prefix=/usr --openssldir=/etc/ssl --libdir=lib \
37 shared no-ssl3-method enable-ec_nistp_64_gcc_128 linux-x86_64 \
38 "-Wa,--noexecstack ${CPPFLAGS} ${CFLAGS} ${LDFLAGS}"
45 cd "$srcdir/$pkgbase-$_ver"
47 # the test fails due to missing write permissions in /etc/ssl
48 # revert this patch for make test
49 patch -p0 -R -i "$srcdir/ca-dir.patch"
53 patch -p0 -i "$srcdir/ca-dir.patch"
54 # re-run make to re-generate CA.pl from th patched .in file.
59 cd "$srcdir/$pkgname-$_ver"
61 make DESTDIR="$pkgdir" MANDIR=/usr/share/man MANSUFFIX=ssl install_sw install_ssldirs install_man_docs
63 install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"