APKBUILD 1.96 KB
Newer Older
root's avatar
root committed
1
# Contributor: Michael Mason <ms13sp@gmail.com>
Natanael Copa's avatar
Natanael Copa committed
2
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
root's avatar
root committed
3
pkgname=gnutls
4
pkgver=3.2.12.1
Natanael Copa's avatar
Natanael Copa committed
5
pkgrel=0
6
pkgdesc="A TLS protocol implementation"
7
url="http://www.gnutls.org/"
8
arch="all"
root's avatar
root committed
9
license="GPL"
Natanael Copa's avatar
Natanael Copa committed
10
depends=
Natanael Copa's avatar
Natanael Copa committed
11
depends_dev="nettle-dev zlib-dev libtasn1-dev p11-kit-dev"
12
makedepends="$depends_dev texinfo"
root's avatar
root committed
13
install=
Natanael Copa's avatar
Natanael Copa committed
14
subpackages="$pkgname-doc $pkgname-dev $pkgname-utils $pkgname-c++:xx"
15
source="ftp://ftp.gnutls.org/gcrypt/gnutls/v${pkgver%.*.*}/$pkgname-$pkgver.tar.xz
Natanael Copa's avatar
Natanael Copa committed
16 17 18
	libgmp.patch
	"

19
_builddir="$srcdir/$pkgname-${pkgver%.*}"
Natanael Copa's avatar
Natanael Copa committed
20 21 22 23 24 25 26 27 28

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

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

Natanael Copa's avatar
Natanael Copa committed
48
package() {
Natanael Copa's avatar
Natanael Copa committed
49
	cd "$_builddir"
Natanael Copa's avatar
Natanael Copa committed
50
	make -j1 DESTDIR="$pkgdir" install
51
	rm -f "$pkgdir"/usr/lib/*.la
root's avatar
root committed
52 53
}

54 55 56 57 58
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
59 60 61 62 63 64 65

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

66
md5sums="a795db68253d1336f1e3c2ee48c1fee4  gnutls-3.2.12.1.tar.xz
Natanael Copa's avatar
Natanael Copa committed
67
3ce8fb390345afbd490cd9ac487dabbd  libgmp.patch"
68
sha256sums="29069907546f6b9e134aafcaa52a030f517835c83de9ffc38b51ab33c31adf12  gnutls-3.2.12.1.tar.xz
Natanael Copa's avatar
Natanael Copa committed
69
39b49c5166819cd4c57ec7d1b42e0470c5d1bde3bebb4b9fbb465d1ef2eb7d2d  libgmp.patch"
70
sha512sums="f9fd9fff46a0fb46e46a0d44288c8c4984f1d3688415a71aeb1518007b11d51bd7280d7e6f0d9d0b4d514a702b42d351a0a6a185feb7931f5696eafa87251871  gnutls-3.2.12.1.tar.xz
Natanael Copa's avatar
Natanael Copa committed
71
1c02594d6bf288561ffd1f0828089a8eaa5129eac1fb2631340370ea94099762bcb883aec188bb31bffe22c0ddeee7abad5e3926b1f64dc22c916760ead16a74  libgmp.patch"