APKBUILD 1.73 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
Natanael Copa's avatar
Natanael Copa committed
5
pkgver=3.4.3
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"
Natanael Copa's avatar
Natanael Copa committed
11
depends=
Natanael Copa's avatar
Natanael Copa committed
12
depends_dev="nettle-dev zlib-dev libtasn1-dev p11-kit-dev"
13
makedepends="$depends_dev texinfo"
root's avatar
root committed
14
install=
Natanael Copa's avatar
Natanael Copa committed
15
subpackages="$pkgname-dbg $pkgname-doc $pkgname-dev $pkgname-utils $pkgname-c++:xx"
Natanael Copa's avatar
Natanael Copa committed
16
source="ftp://ftp.gnutls.org/gcrypt/gnutls/v${pkgver%.*}/$pkgname-$pkgver.tar.xz
Natanael Copa's avatar
Natanael Copa committed
17 18
	"

Natanael Copa's avatar
Natanael Copa committed
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/
}

Natanael Copa's avatar
Natanael Copa committed
66 67 68
md5sums="8a119d7830b81a44faa721a6fde2a295  gnutls-3.4.3.tar.xz"
sha256sums="65dd55e6de709203b698a729a4a2a7aa07367b63c1615a198ef2436fdd28e928  gnutls-3.4.3.tar.xz"
sha512sums="f877500c6d3a731c3560a5f68554532818c87538ba91324957eb2bb85fc2212acfd6dee8f6dd9c5c006d8bd0e311ee17b517e86caca26239b571701e26d623e2  gnutls-3.4.3.tar.xz"