upgpkg: ocaml-ctypes 0.20.2-1
[arch-packages.git] / openssl-1.1 / trunk / PKGBUILD
blob1a996fe6772b2b3f61842ab669f8f8e9916a79ab
1 # Maintainer: Pierre Schmitz <pierre@archlinux.de>
3 pkgname=openssl-1.1
4 _pkgname=openssl
5 _ver=1.1.1t
6 # use a pacman compatible version scheme
7 pkgver=${_ver/[a-z]/.${_ver//[0-9.]/}}
8 pkgrel=1
9 pkgdesc='The Open Source toolkit for Secure Sockets Layer and Transport Layer Security'
10 arch=('x86_64')
11 url='https://www.openssl.org'
12 license=('custom:BSD')
13 depends=('glibc')
14 provides=('libcrypto.so' 'libssl.so')
15 makedepends=('perl')
16 source=("https://www.openssl.org/source/${_pkgname}-${_ver}.tar.gz"{,.asc}
17         'ca-dir.patch')
18 sha256sums=('8dee9b24bdb1dcbf0c3d1e9b02fb8f6bf22165e807f45adeb7c9677536859d3b'
19             'SKIP'
20             '75aa8c2c638c8a3ebfd9fa146fc61c7ff878fc997dc6aa10d39e4b2415d669b2')
21 validpgpkeys=('8657ABB260F056B1E5190839D9C4D26D0E604491'
22               '7953AC1FBC3DC8B3B292393ED5E9E43F7DF9EE8C'
23               'A21FAB74B0088AA361152586B8EF1A6BA9DA2D5C')
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/openssl-1.1 \
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/$_pkgname-$_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" install_sw
63         # Move some files around
64         install -m755 -d "$pkgdir/usr/include/openssl-1.1"
65         mv "$pkgdir/usr/include/openssl" "$pkgdir/usr/include/openssl-1.1/"
66         mv "$pkgdir/usr/lib/openssl-1.1/libcrypto.so.1.1" "$pkgdir/usr/lib/"
67         mv "$pkgdir/usr/lib/openssl-1.1/libssl.so.1.1" "$pkgdir/usr/lib/"
68         ln -sf ../libssl.so.1.1 "$pkgdir/usr/lib/openssl-1.1/libssl.so"
69     ln -sf ../libcrypto.so.1.1 "$pkgdir/usr/lib/openssl-1.1/libcrypto.so"
70         mv "$pkgdir/usr/bin/openssl" "$pkgdir/usr/bin/openssl-1.1"
72         # Update includedir in .pc files
73         sed -e 's|/include$|/include/openssl-1.1|' -i "$pkgdir"/usr/lib/openssl-1.1/pkgconfig/*.pc
75         rm -rf "$pkgdir"/{etc,usr/bin/c_rehash}
77         install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"