APKBUILD 1.66 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
Natanael Copa's avatar
Natanael Copa committed
4
pkgver=3.3.7
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"
Natanael Copa's avatar
Natanael Copa committed
15
source="ftp://ftp.gnutls.org/gcrypt/gnutls/v${pkgver%.*}/$pkgname-$pkgver.tar.xz
Natanael Copa's avatar
Natanael Copa committed
16 17
	"

Natanael Copa's avatar
Natanael Copa committed
18
_builddir="$srcdir/$pkgname-$pkgver"
Natanael Copa's avatar
Natanael Copa committed
19 20 21 22 23 24 25 26 27

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
28 29

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

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

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

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
65 66 67
md5sums="a7a73cfa883cd106d70b15300552a5b5  gnutls-3.3.7.tar.xz"
sha256sums="52d86c1bf2ff142c5499037db812d06d42e29bcfefe1fdd2035aaab38677c79f  gnutls-3.3.7.tar.xz"
sha512sums="7173f30c7160118a5204bd108eeaba47d507df6b3dcb78f1086b5640519f820b6268d2edfe0f5f0165cab110cde3d6996e2f9563cb39209b574dedacfd9e3715  gnutls-3.3.7.tar.xz"