APKBUILD 1.68 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 5
pkgver=3.3.10
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-dbg $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="c0a72b2c0553fe1c4992e30835808012  gnutls-3.3.10.tar.xz"
sha256sums="e27553981d48d9211a7e5e94f6e78c575205202a181c2345a1c8466ebf1d2219  gnutls-3.3.10.tar.xz"
sha512sums="3f73af238c48322d1df59b8c27c2bcc5e03f25e632792279a1e25a3712d71108f83b6e135bf1766917e84ec9499f4419c266c2a43a8e2ccd8dd9efd6f15d85ec  gnutls-3.3.10.tar.xz"