# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
setvar pkgname = 'gcr'
setvar pkgver = '3.20.0'
setvar pkgrel = '0'
setvar pkgdesc = ""A library for bits of crypto UI and parsing""
setvar url = ""http://live.gnome.org/CryptoGlue/""
setvar arch = ""all""
setvar license = ""LGPLv2+""
setvar depends = """"
setvar depends_dev = ""glib-dev gtk+3.0-dev libgcrypt-dev p11-kit-dev""
setvar makedepends = ""$depends_dev gobject-introspection-dev libxslt vala""
setvar install = """"
setvar subpackages = ""$pkgname-dev $pkgname-doc $pkgname-lang""
setvar source = ""http://download.gnome.org/sources/gcr/${pkgver%.*}/gcr-$pkgver.tar.xz""

setvar _builddir = ""$srcdir"/gcr-$pkgver"
proc prepare {
	local i
	cd $_builddir
	for i in $source {
		case (i) {
		*.patch { msg $i; patch -p1 -i "$srcdir"/$i || return 1}
		}
	}
}

proc build {
	cd $_builddir
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--enable-introspection \
		--enable-vala \
		|| return 1
	make || return 1
}

proc package {
	cd $_builddir
	make DESTDIR="$pkgdir" install || return 1
}

setvar md5sums = ""4314bf89eac293dd0a9d806593ff1b35  gcr-3.20.0.tar.xz""
setvar sha256sums = ""90572c626d8a708225560c42b4421f7941315247fa1679d4ef569bde7f4bb379  gcr-3.20.0.tar.xz""
setvar sha512sums = ""0acd0fb085a38507b1cc895ac773f91c6f4e14d2ea7e27b8e74c85ef78426597b6ea08ebee696452b0651939ec4a0d8a4a2523c41b3a8a0bd1b0d7b338b1d9c7  gcr-3.20.0.tar.xz""