archrelease: copy trunk to extra-x86_64
[arch-packages.git] / openssl / repos / core-x86_64 / PKGBUILD
blob54b81e44ff48dd0ad6750a980ba4cacdc9faac77
1 # Maintainer: Pierre Schmitz <pierre@archlinux.de>
3 pkgname=openssl
4 _ver=1.1.1q
5 # use a pacman compatible version scheme
6 pkgver=${_ver/[a-z]/.${_ver//[0-9.]/}}
7 pkgrel=1
8 pkgdesc='The Open Source toolkit for Secure Sockets Layer and Transport Layer Security'
9 arch=('x86_64')
10 url='https://www.openssl.org'
11 license=('custom:BSD')
12 depends=('glibc')
13 makedepends=('perl')
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}
18         'ca-dir.patch')
19 sha256sums=('d7939ce614029cdff0b6c20f0e2e5703158a489a72b2507b8bd51bf8c8fd10ca'
20             'SKIP'
21             '75aa8c2c638c8a3ebfd9fa146fc61c7ff878fc997dc6aa10d39e4b2415d669b2')
22 validpgpkeys=('8657ABB260F056B1E5190839D9C4D26D0E604491'
23         '7953AC1FBC3DC8B3B292393ED5E9E43F7DF9EE8C')
25 prepare() {
26         cd "$srcdir/$pkgname-$_ver"
28         # set ca dir to /etc/ssl by default
29         patch -p0 -i "$srcdir/ca-dir.patch"
32 build() {
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}"
40         make depend
41         make
44 check() {
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"
51         make test
53         patch -p0 -i "$srcdir/ca-dir.patch"
54         # re-run make to re-generate CA.pl from th patched .in file.
55         make apps/CA.pl
58 package() {
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"