APKBUILD 1.75 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
5
pkgver=3.4.14
6
pkgrel=1
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"
16 17 18 19 20
_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
21 22
	"

Natanael Copa's avatar
Natanael Copa committed
23
_builddir="$srcdir/$pkgname-$pkgver"
Natanael Copa's avatar
Natanael Copa committed
24 25 26 27 28 29 30 31 32

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
33 34

build() {
Natanael Copa's avatar
Natanael Copa committed
35
	cd "$_builddir"
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 47
		--disable-guile \
		--disable-valgrind-tests \
48
		|| return 1
Natanael Copa's avatar
Natanael Copa committed
49 50
	make
}
root's avatar
root committed
51

Natanael Copa's avatar
Natanael Copa committed
52
package() {
Natanael Copa's avatar
Natanael Copa committed
53
	cd "$_builddir"
Natanael Copa's avatar
Natanael Copa committed
54
	make -j1 DESTDIR="$pkgdir" install
root's avatar
root committed
55 56
}

57 58 59 60 61
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
62 63 64 65 66 67 68

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

69 70 71
md5sums="ad3e269a6793424d5d21c9626e1c9ef1  gnutls-3.4.14.tar.xz"
sha256sums="35deddf2779b76ac11057de38bf380b8066c05de21b94263ad5b6dfa75dfbb23  gnutls-3.4.14.tar.xz"
sha512sums="d75f6b4dea2dc742cd7f60ee0ee540d41b69991aaa937ca0138cfdf4a1e0dfaaa3863464303bfa5799e14ee02de252f71c59a7a9e57b96ff8af653e419edfd4e  gnutls-3.4.14.tar.xz"