# Template file for 'libgexiv2'
pkgname=libgexiv2
version=0.10.8
revision=2
wrksrc="${pkgname/lib/}-${version}"
build_style=gnu-configure
configure_args="$(vopt_if gir '--enable-introspection --enable-vala')"
hostmakedepends="pkg-config glib-devel gtk-doc
 $(vopt_if gir 'gobject-introspection vala-devel')"
makedepends="libglib-devel exiv2-devel"
short_desc="GObject-based wrapper around the Exiv2 library"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="GPL-2"
homepage="https://wiki.gnome.org/Projects/gexiv2"
distfiles="${GNOME_SITE}/gexiv2/${version%.*}/${pkgname/lib/}-${version}.tar.xz"
checksum=81c528fd1e5e03577acd80fb77798223945f043fd1d4e06920c71202eea90801

build_options="gir"
if [ -z "$CROSS_BUILD" ]; then
	build_options_default="gir"
fi

libgexiv2-devel_package() {
	depends="${makedepends} ${sourcepkg}-${version}_${revision}"
	short_desc+=" - development files"
	pkg_install() {
		vmove usr/include
		vmove usr/lib/*.so
		vmove usr/lib/pkgconfig
		vmove usr/share/gtk-doc
		if [ -z "$CROSS_BUILD" ]; then
			vmove usr/share/vala
		fi
		if [ "$build_option_gir" ]; then
			vmove "usr/share/gir-*"
		fi
	}
}
