summaryrefslogtreecommitdiff
path: root/user/gnutls/APKBUILD
blob: 78d9b6fdd882502cc2244959a53e70a1db747a10 (plain) (blame)
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Contriburo: Łukasz Jendrysik <scadu@yandex.com>
# Contributor: Michael Mason <ms13sp@gmail.com>
# Maintainer: 
pkgname=gnutls
pkgver=3.6.8
pkgrel=0
pkgdesc="A TLS protocol implementation"
url="http://www.gnutls.org/"
arch="all"
options="!check"  # https://gitlab.com/gnutls/gnutls/issues/560
license="LGPL-2.1+"
makedepends="libtasn1-dev libunistring-dev nettle-dev p11-kit-dev texinfo
	unbound-dev cmd:which zlib-dev"
checkdepends="diffutils"
subpackages="$pkgname-dbg $pkgname-doc $pkgname-dev $pkgname-lang
	$pkgname-c++:xx $pkgname-dane $pkgname-utils"
_v=${pkgver%.*}
_v2=$pkgver
case $pkgver in
*.*.*.*)
	_v=${_v%.*}
	_v2=${pkgver%.*}
	;;
esac
source="https://www.gnupg.org/ftp/gcrypt/gnutls/v${_v}/$pkgname-$pkgver.tar.xz
	gnulib-tests-dont-require-gpg-passphrase.patch"
builddir="$srcdir/$pkgname-$_v2"

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

build() {
	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 \
		--without-included-libtasn1 \
		--enable-cxx \
		--enable-manpages \
		--enable-tests \
		--disable-full-test-suite \
		--with-p11-kit
	make
}

check() {
	make check
}

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

dane() {
	pkgdesc="$pkgdesc (DNS DANE support library)"
	mkdir -p "$subpkgdir"/usr/{bin,lib}
	mv "$pkgdir"/usr/bin/danetool "$subpkgdir"/usr/bin/
	mv "$pkgdir"/usr/lib/libgnutls-dane* "$subpkgdir"/usr/lib/
}

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="71f0899de0ffb2a39b25928042114e2bbfde7fbf2029d9f91f60bf60794916d13f544fc97337e4e3282e7faa17e79a8012b0e08f98805bee543c0ba4e5d5a905  gnutls-3.6.8.tar.xz
abc24ee59cc67805fe953535b0bae33080fc8b0bf788304377f6d10ec8c162c4cf203a69c98a4ba3483b4c60ed7a204433cc7db9b8190eddb0d68f6fb6dad52d  gnulib-tests-dont-require-gpg-passphrase.patch"