# Template file for 'gfbgraph'
pkgname=gfbgraph
version=0.2.5
revision=1
build_style=gnu-configure
build_helper="gir"
configure_args="--disable-static $(vopt_enable gtk_doc gtk-doc)"
hostmakedepends="pkg-config $(vopt_if gtk_doc gtk-doc)"
makedepends="rest-devel json-glib-devel gnome-online-accounts-devel"
short_desc="GLib/GObject wrapper for the SkyDrive and Hotmail REST APIs"
maintainer="Orphaned <orphan@voidlinux.org>"
license="LGPL-2.1-or-later"
homepage="https://wiki.gnome.org/Projects/GFBGraph"
distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.xz"
checksum=9cb381b3f78ba1136df97af3f06e3b11dcc2ab339ac08f74eda0f8057d6603e3
make_check=no # needs facebook credentials

build_options="gir gtk_doc"
build_options_default="gir"

if [ -z "$CROSS_BUILD" ]; then
	build_options_default+=" gtk_doc"
fi

post_install() {
	rm -rf ${DESTDIR}/usr/doc
}

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