# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libsecret
pkgver=0.18.5
pkgrel=0
pkgdesc="Library for storing and retrieving passwords and other secrets"
url="https://live.gnome.org/Libsecret"
arch="all"
license="LGPL-2.0-or-later"
depends=""
depends_dev="glib-dev"
makedepends="$depends_dev intltool libxslt-dev docbook-xsl libgcrypt-dev
	gobject-introspection-dev"
install=""
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
source="http://download.gnome.org/sources/libsecret/${pkgver%.*}/libsecret-$pkgver.tar.xz"

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

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

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

md5sums="2d688825921313da8731313b0a7f394c  libsecret-0.18.5.tar.xz"
sha256sums="9ce7bd8dd5831f2786c935d82638ac428fa085057cc6780aba0e39375887ccb3  libsecret-0.18.5.tar.xz"
sha512sums="4ee297b556d3b555b6ca9f5eb5cc87425b782491d0550a75873aac0f7019b123f437f0731c85bb058fc65b50a589d54d0697657a50bef4ac2952e9e40a916b5c  libsecret-0.18.5.tar.xz"
