APKBUILD 2.03 KB
Newer Older
1
# Contriburo: Łukasz Jendrysik <scadu@yandex.com>
root's avatar
root committed
2
# Contributor: Michael Mason <ms13sp@gmail.com>
Natanael Copa's avatar
Natanael Copa committed
3
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
root's avatar
root committed
4
pkgname=gnutls
Leo's avatar
Leo committed
5 6
pkgver=3.6.14
pkgrel=0
7
pkgdesc="A TLS protocol implementation"
J0WI's avatar
J0WI committed
8
url="https://www.gnutls.org/"
9
arch="all"
Leo's avatar
Leo committed
10
license="GPL-3.0-or-later"
Simon F's avatar
Simon F committed
11
checkdepends="diffutils datefudge"
12
makedepends="nettle-dev zlib-dev libtasn1-dev p11-kit-dev libunistring-dev texinfo"
Natanael Copa's avatar
Natanael Copa committed
13
subpackages="$pkgname-dbg $pkgname-doc $pkgname-dev $pkgname-utils $pkgname-c++:xx"
14 15 16 17
_v=${pkgver%.*}
case $pkgver in
*.*.*.*) _v=${_v%.*};;
esac
Simon F's avatar
Simon F committed
18 19
source="https://www.gnupg.org/ftp/gcrypt/gnutls/v$_v/gnutls-$pkgver.tar.xz
	tests-crq.patch
20 21 22
	tests-certtool.patch
	"

Leo's avatar
Leo committed
23
# Upstream Tracker: https://gnutls.org/security-new.html
Leonardo Arena's avatar
Leonardo Arena committed
24
# secfixes:
Leo's avatar
Leo committed
25 26
#   3.6.14-r0:
#     - GNUTLS-SA-2020-06-03
Leo's avatar
Leo committed
27 28
#   3.6.13-r0:
#     - CVE-2020-11501 GNUTLS-SA-2020-03-31
J0WI's avatar
J0WI committed
29 30 31
#   3.6.7-r0:
#     - CVE-2019-3836
#     - CVE-2019-3829
Leonardo Arena's avatar
Leonardo Arena committed
32 33 34
#   3.5.13-r0:
#     - CVE-2017-7507

root's avatar
root committed
35
build() {
36 37 38 39
	LIBS="-lgmp" ./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
root's avatar
root committed
40 41 42
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
Natanael Copa's avatar
Natanael Copa committed
43
		--disable-openssl-compatibility \
44 45
		--disable-rpath \
		--disable-static \
Natanael Copa's avatar
Natanael Copa committed
46
		--disable-guile \
47 48
		--disable-valgrind-tests
	make
Natanael Copa's avatar
Natanael Copa committed
49
}
root's avatar
root committed
50

Jakub Jirutka's avatar
Jakub Jirutka committed
51
check() {
Leo's avatar
Leo committed
52
	make -j1 check
Jakub Jirutka's avatar
Jakub Jirutka committed
53 54
}

Natanael Copa's avatar
Natanael Copa committed
55
package() {
56 57
	make -j1 DESTDIR="$pkgdir" \
		-C "$builddir" install
root's avatar
root committed
58 59
}

60 61 62 63 64
utils() {
	pkgdesc="Command line tools for TLS protocol"
	mkdir -p "$subpkgdir"/usr/
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}
Natanael Copa's avatar
Natanael Copa committed
65 66 67 68 69 70 71

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

Leo's avatar
Leo committed
72
sha512sums="b2d427b5542a4679117c011dffa8efb0e0bffa3ce9cebc319f8998d03f80f4168d08f9fda35df18dbeaaada59e479d325a6c1c77d5ca7f8ce221b44e42bfe604  gnutls-3.6.14.tar.xz
Simon F's avatar
Simon F committed
73
3e7d872963cc25e49f1ecf98de7d6f3b6b22d2c1c9e982bc4b22ce658c11d8567903728e5aa33ce7b6d3e25fe0b7a75b8aca3e8f53838155af5abe23887d33fa  tests-crq.patch
Leo's avatar
Leo committed
74
30739b5ca06bb72e93d021065fbc90a1808c5fc139ff917308738456ae8601f5c372d223d77e51cdd34a6aa4d28dcb8140101c3f753ede1e39ee12e229c24cbe  tests-certtool.patch"