APKBUILD 1.49 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
A. Klitzing's avatar
A. Klitzing committed
5
pkgver=3.5.13
Natanael Copa's avatar
Natanael Copa committed
6
pkgrel=0
7
pkgdesc="A TLS protocol implementation"
8
url="http://www.gnutls.org/"
9
arch="all"
root's avatar
root committed
10
license="GPL"
11
makedepends="nettle-dev zlib-dev libtasn1-dev p11-kit-dev libunistring-dev texinfo"
Natanael Copa's avatar
Natanael Copa committed
12
subpackages="$pkgname-dbg $pkgname-doc $pkgname-dev $pkgname-utils $pkgname-c++:xx"
13 14 15 16 17
_v=${pkgver%.*}
case $pkgver in
*.*.*.*) _v=${_v%.*};;
esac
source="ftp://ftp.gnutls.org/gcrypt/gnutls/v${_v}/$pkgname-$pkgver.tar.xz
Natanael Copa's avatar
Natanael Copa committed
18 19
	"

20
builddir="$srcdir/$pkgname-$pkgver"
root's avatar
root committed
21

Leonardo Arena's avatar
Leonardo Arena committed
22 23 24 25
# secfixes:
#   3.5.13-r0:
#     - CVE-2017-7507

root's avatar
root committed
26
build() {
27
	cd "$builddir"
28 29 30 31
	LIBS="-lgmp" ./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
root's avatar
root committed
32 33 34
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
Natanael Copa's avatar
Natanael Copa committed
35
		--disable-openssl-compatibility \
36 37
		--disable-rpath \
		--disable-static \
Natanael Copa's avatar
Natanael Copa committed
38 39
		--disable-guile \
		--disable-valgrind-tests \
40
		|| return 1
41
	make || return 1
Natanael Copa's avatar
Natanael Copa committed
42
}
root's avatar
root committed
43

Natanael Copa's avatar
Natanael Copa committed
44
package() {
45 46
	make -j1 DESTDIR="$pkgdir" \
		-C "$builddir" install
root's avatar
root committed
47 48
}

49 50 51 52 53
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
54 55 56 57 58 59 60

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

A. Klitzing's avatar
A. Klitzing committed
61
sha512sums="e98f23a589042f879936c3f8b474535e695fb7dd68a9e81323668c013241f765c2d3af6c6a072ecf867acc1e551ec46e15bb842144d3a06bdd5d2f4fc3d828a7  gnutls-3.5.13.tar.xz"