# Template build file for 'libgtop'.
pkgname=libgtop
version=2.28.5
revision=2
build_style=gnu-configure
configure_args="-with-libgtop-smp"
hostmakedepends="pkg-config intltool"
makedepends="libglib-devel libXau-devel"
short_desc="Library to retrieve system information, used in GNOME"
maintainer="Juan RP <xtraeme@gmail.com>"
homepage="http://www.gnome.org/"
license="LGPL-2.1"
distfiles="${GNOME_SITE}/$pkgname/2.28/$pkgname-$version.tar.xz"
checksum=c812c174e44a8971a1f33265437cfd10f1e99869c7f5c05f8ee95846a70a3342

# Package build options
build_options="gir"

# 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

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