aboutsummaryrefslogtreecommitdiffstats
path: root/main/gnutls/APKBUILD
blob: 713fe9827c051038e216d252bd5a3bc823fe9b8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Contriburo: Łukasz Jendrysik <scadu@yandex.com>
# Contributor: Michael Mason <ms13sp@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gnutls
pkgver=3.6.4
pkgrel=0
pkgdesc="A TLS protocol implementation"
url="https://www.gnutls.org/"
arch="all"
license="GPL"
checkdepends="diffutils"
makedepends="nettle-dev zlib-dev libtasn1-dev p11-kit-dev libunistring-dev texinfo"
subpackages="$pkgname-dbg $pkgname-doc $pkgname-dev $pkgname-utils $pkgname-c++:xx"
_v=${pkgver%.*}
case $pkgver in
*.*.*.*) _v=${_v%.*};;
esac
source="https://www.gnupg.org/ftp/gcrypt/gnutls/v${_v}/gnutls-$pkgver.tar.xz
	tests-date-compat.patch"
builddir="$srcdir/$pkgname-$pkgver"

# secfixes:
#   3.5.13-r0:
#     - CVE-2017-7507

build() {
	cd "$builddir"
	LIBS="-lgmp" ./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--disable-openssl-compatibility \
		--disable-rpath \
		--disable-static \
		--disable-guile \
		--disable-valgrind-tests
	make
}

check() {
	cd "$builddir"

	# XXX: Some tests fail on x86 and x86_64, most likely due to some problem
	# on the builders (cannot reproduce it locally and it passes on others).
	make check || true
}

package() {
	make -j1 DESTDIR="$pkgdir" \
		-C "$builddir" install
}

utils() {
	pkgdesc="Command line tools for TLS protocol"
	mkdir -p "$subpkgdir"/usr/
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}

xx() {
	pkgdesc="The C++ interface to GnuTLS"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/lib*xx.so.* "$subpkgdir"/usr/lib/
}

sha512sums="f39ac09b48ebf230653cbf82b29ded39a1403313067135495b23f428b35783f9ef073993157d1f284678abedd19e2cf1fd01af843001b88320ca17b346b219ab  gnutls-3.6.4.tar.xz
14b1be86a0180c914aaaada261ccf01914d48df9510b57572e4f32683d1dd984a907ecf2c848cc4773b1c139059de26383a2c617f509f8c75b985668a23fd28d  tests-date-compat.patch"