From 51927b15cb0d95ab36c4bbf891eb3b5b98698ea9 Mon Sep 17 00:00:00 2001 From: "Zeeshan Ali (Khattak)" Date: Thu, 12 Apr 2012 18:17:39 +0300 Subject: [PATCH] Sync spec file with upstream --- libosinfo.spec | 48 +++++++++++++++++++++++++++++++++++++----------- 1 file changed, 37 insertions(+), 11 deletions(-) diff --git a/libosinfo.spec b/libosinfo.spec index 5ed230d..48a2218 100644 --- a/libosinfo.spec +++ b/libosinfo.spec @@ -1,5 +1,15 @@ # -*- rpm-spec -*- +# Plugin isn't ready for real world use yet - it needs +# a security audit at very least +%define with_plugin 0 + +%define with_gir 0 + +%if 0%{fedora} >= 15 +%define with_gir 1 +%endif + Summary: A library for managing OS information for virtualization Name: libosinfo Version: 0.1.1 @@ -14,8 +24,10 @@ BuildRequires: check-devel BuildRequires: libxml2-devel >= 2.6.0 BuildRequires: vala BuildRequires: vala-tools -BuildRequires: gobject-introspection-devel BuildRequires: libsoup-devel +%if %{with_gir} +BuildRequires: gobject-introspection-devel +%endif Requires: udev %description @@ -53,7 +65,13 @@ This package provides the Vala bindings for libosinfo library. %setup -q %build -%configure --enable-introspection=yes --enable-vala=yes --enable-udev=yes +%if %{with_gir} +%define gir_arg --enable-introspection=yes +%else +%define gir_arg --enable-introspection=no +%endif + +%configure %{gir_arg} --enable-vala=yes --enable-udev=yes %__make %{?_smp_mflags} V=1 chmod a-x examples/*.js examples/*.py @@ -63,9 +81,6 @@ rm -fr %{buildroot} %__make install DESTDIR=%{buildroot} rm -f %{buildroot}%{_libdir}/*.a rm -f %{buildroot}%{_libdir}/*.la -# We read the ID files natively now -rm -f %{buildroot}%{_bindir}/osinfo-pciids-convert -rm -f %{buildroot}%{_bindir}/osinfo-usbids-convert %check make check @@ -81,16 +96,25 @@ rm -fr %{buildroot} %defattr(-, root, root) %doc AUTHORS ChangeLog COPYING.LIB NEWS README %{_bindir}/osinfo-detect +%{_bindir}/osinfo-db-validate +%{_bindir}/osinfo-query %dir %{_datadir}/libosinfo/ -%dir %{_datadir}/libosinfo/data/ -%{_datadir}/libosinfo/data/usb.ids -%{_datadir}/libosinfo/data/pci.ids -%{_datadir}/libosinfo/data/devices -%{_datadir}/libosinfo/data/oses -%{_datadir}/libosinfo/data/hypervisors +%dir %{_datadir}/libosinfo/db/ +%dir %{_datadir}/libosinfo/schemas/ +%{_datadir}/libosinfo/db/usb.ids +%{_datadir}/libosinfo/db/pci.ids +%{_datadir}/libosinfo/db/devices +%{_datadir}/libosinfo/db/oses +%{_datadir}/libosinfo/db/hypervisors +%{_datadir}/libosinfo/schemas/libosinfo.rng +%{_mandir}/man1/osinfo-db-validate.1* +%{_mandir}/man1/osinfo-detect.1* +%{_mandir}/man1/osinfo-query.1* %{_libdir}/%{name}-1.0.so.* /lib/udev/rules.d/95-osinfo.rules +%if %{with_gir} %{_libdir}/girepository-1.0/Libosinfo-1.0.typelib +%endif %files devel %defattr(-, root, root) @@ -101,7 +125,9 @@ rm -fr %{buildroot} %dir %{_includedir}/%{name}-1.0/osinfo/ %{_includedir}/%{name}-1.0/osinfo/*.h %{_libdir}/pkgconfig/%{name}-1.0.pc +%if %{with_gir} %{_datadir}/gir-1.0/Libosinfo-1.0.gir +%endif %{_datadir}/gtk-doc/html/Libosinfo %files vala