# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=geocode-glib
pkgver=3.24.0
pkgrel=0
pkgdesc="Geocoding helper library"
url="https://www.gnome.org/"
arch="all"
license="LGPL-2.0-or-later"
depends=""
depends_dev=""
makedepends="$depends_dev glib-dev gobject-introspection-dev intltool
	json-glib-dev libsoup-dev"
install=""
subpackages="$pkgname-dev $pkgname-doc"
source="http://download.gnome.org/sources/geocode-glib/${pkgver%.*}/geocode-glib-$pkgver.tar.xz"

builddir="$srcdir"/geocode-glib-$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 \
		--localstatedir=/var \
		|| return 1
	make || return 1
}

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

sha512sums="0e3910e99d164fdf5afd6befbcb7139a56779834fb1f2a318951c03e5196a31c4dafd7f88c37c7014377f15cd4d4b81e7080a440881e2c50aadaadf621abe3b6  geocode-glib-3.24.0.tar.xz"
