From 3ccd5b353caaf42f947ff9114b3b660fb0021bda Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 20 Feb 2014 18:28:28 +0100 Subject: [PATCH] libosinfo: added gir build option; remove long_desc. --- srcpkgs/libosinfo/template | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/srcpkgs/libosinfo/template b/srcpkgs/libosinfo/template index aea63506b1d..0d37b184ca7 100644 --- a/srcpkgs/libosinfo/template +++ b/srcpkgs/libosinfo/template @@ -1,21 +1,33 @@ # Template file for 'libosinfo' pkgname=libosinfo version=0.2.7 -revision=1 +revision=2 build_style=gnu-configure configure_args="--disable-static --disable-tests" -hostmakedepends="pkg-config intltool gobject-introspection" -makedepends="libglib-devel libsoup-gnome-devel libxml2-devel - libxslt-devel vala-devel" +hostmakedepends="pkg-config intltool" +makedepends="libglib-devel libsoup-gnome-devel libxml2-devel libxslt-devel vala-devel" short_desc="GObject based library API for managing info about operating systems" maintainer="davehome " homepage="https://fedorahosted.org/libosinfo/" license="GPL-2, LGPL-2.1" distfiles="https://fedorahosted.org/releases/l/i/${pkgname}/${pkgname}-${version}.tar.gz" checksum=fce8f43d02da7c8f05db1b3cf40850711d56978f880558fde5cde7c8d0b24a46 -long_desc=" - GObject based library API for managing information about operating systems, - hypervisors and the (virtual) hardware devices they can support." + +# 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 libosinfo-devel_package() { depends="libglib-devel ${sourcepkg}-${version}_${revision}" @@ -23,7 +35,9 @@ libosinfo-devel_package() { pkg_install() { vmove usr/include vmove usr/lib/pkgconfig - vmove usr/share/gir-1.0 - vmove usr/share/vala + if [ "$build_option_gir" ]; then + vmove usr/share/gir-1.0 + vmove usr/share/vala + fi } }