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
Natanael Copa's avatar
Natanael Copa committed
5
pkgver=3.4.6
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"
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/
}

Natanael Copa's avatar
Natanael Copa committed
69 70 71
md5sums="4f2c4b4483da65de7edfeb050911fafb  gnutls-3.4.6.tar.xz"
sha256sums="feb559ed7fffa24d5aa40527054fae5cb7f7b66e9f2bebc2383a781dfa4d20ec  gnutls-3.4.6.tar.xz"
sha512sums="c81da5bba3b28ab17ef762d8c6a6607745f1fa7177e0fdaacd374ac0ee64c14cd804e048aeb965383fafaa677ba2ed256c709a117f8a95012f8494c650d29c81  gnutls-3.4.6.tar.xz"