aboutsummaryrefslogtreecommitdiffstats
path: root/main/gnutls/APKBUILD
blob: e7e8bf6d94d62f308a0487fe4134582281627c27 (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
# Contributor: Michael Mason <ms13sp@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gnutls
pkgver=3.2.2
pkgrel=1
pkgdesc="A TLS protocol implementation"
url="http://www.gnutls.org/"
arch="all"
license="GPL"
depends=
depends_dev="nettle-dev zlib-dev libtasn1-dev p11-kit-dev"
makedepends="$depends_dev texinfo"
install=
subpackages="$pkgname-doc $pkgname-dev $pkgname-utils $pkgname-c++:xx"
source="ftp://ftp.gnutls.org/gcrypt/gnutls/v${pkgver%.*}/$pkgname-$pkgver.tar.xz
	libgmp.patch
	"

_builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

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

package() {
	cd "$_builddir"
	make -j1 DESTDIR="$pkgdir" install
	rm -f "$pkgdir"/usr/lib/*.la
}

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/
}

md5sums="9dd691ad1ccdb7386029809afef6b5ea  gnutls-3.2.2.tar.xz
3ce8fb390345afbd490cd9ac487dabbd  libgmp.patch"
sha256sums="8f5ab28d2f9a943a9dfc50307c5daaf56b714386bbe85c9e2477e3573ce613f4  gnutls-3.2.2.tar.xz
39b49c5166819cd4c57ec7d1b42e0470c5d1bde3bebb4b9fbb465d1ef2eb7d2d  libgmp.patch"
sha512sums="ac0affaed6ed6145796b6048001b1ec964d9d86aa5805268a9a2c44e803a19a5c453c1c47a130908e2a8062ed315496f6b233b9d0fd20689a182e8b502a3a4c5  gnutls-3.2.2.tar.xz
1c02594d6bf288561ffd1f0828089a8eaa5129eac1fb2631340370ea94099762bcb883aec188bb31bffe22c0ddeee7abad5e3926b1f64dc22c916760ead16a74  libgmp.patch"