# Template file for 'rest'
pkgname=rest
version=0.7.91
revision=1
build_style=gnu-configure
configure_args="--disable-static --with-ca-certificates=/etc/ssl/certs/ca-certificates.crt"
hostmakedepends="libtool pkg-config glib-devel"
makedepends="libglib-devel libsoup-gnome-devel>=2.46 libxml2-devel ca-certificates"
depends="ca-certificates"
short_desc="RESTful library"
maintainer="Juan RP <xtraeme@gmail.com>"
license="GPL-2"
homepage="http://www.gnome.org"
distfiles="${GNOME_SITE}/$pkgname/${version%.*}/$pkgname-$version.tar.xz"
checksum=838814d935143f2dc99eb79f1ac69c615e7b547339f6cd226dd0ed4d7c16b67a

# Package build options
build_options="gir"
desc_option_gir="Enable support for building gobject introspection data"

# Disable gir for cross builds.
if [ -z "$CROSS_BUILD" ]; then
	build_options_default="gir"
fi

if [ "$build_option_gir" ]; then
	configure_args+=" --enable-introspection"
	makedepends+=" gobject-introspection"
else
	configure_args+=" --disable-introspection"
fi

pre_configure() {
	libtoolize -f
}

rest-devel_package() {
	depends="libglib-devel libsoup-devel>=2.44 libxml2-devel rest>=${version}_${revision}"
	short_desc+=" - development files"
	pkg_install() {
		vmove usr/include 
		vmove usr/lib/pkgconfig
		vmove usr/share
		vmove "usr/lib/*.so"
	}
}