3e012bc
# -*- rpm-spec -*-
3e012bc
51927b1
# Plugin isn't ready for real world use yet - it needs
51927b1
# a security audit at very least
51927b1
%define with_plugin 0
51927b1
51927b1
%define with_gir 0
51927b1
c76ac2e
%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
51927b1
%define with_gir 1
51927b1
%endif
51927b1
0dda703
%define with_udev 1
bbb1903
%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7
0dda703
%define with_udev 0
0dda703
%endif
0dda703
3e012bc
Summary: A library for managing OS information for virtualization
3e012bc
Name: libosinfo
5d2b88e
Version: 0.2.11
6dcf0a4
Release: 2%{?dist}%{?extra_release}
3e012bc
License: LGPLv2+
3e012bc
Group: Development/Libraries
3e012bc
Source: https://fedorahosted.org/releases/l/i/%{name}/%{name}-%{version}.tar.gz
6dcf0a4
6dcf0a4
# os: Add Fedora 21
6dcf0a4
Patch0001: 0001-oses-Add-Fedora21.patch
3e012bc
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
0dda703
URL: http://libosinfo.org/
cd6d6bb
BuildRequires: intltool
3e012bc
BuildRequires: glib2-devel
3e012bc
BuildRequires: check-devel
3e012bc
BuildRequires: libxml2-devel >= 2.6.0
5f81f66
BuildRequires: libxslt-devel >= 1.0.0
3e012bc
BuildRequires: vala
3e012bc
BuildRequires: vala-tools
b8c5ef4
BuildRequires: libsoup-devel
4a07f8e
BuildRequires: /usr/bin/pod2man
51927b1
%if %{with_gir}
51927b1
BuildRequires: gobject-introspection-devel
51927b1
%endif
7c7d853
Requires: hwdata
4a07f8e
%if %{with_udev}
3e012bc
Requires: udev
4a07f8e
%endif
3e012bc
3e012bc
%description
3e012bc
libosinfo is a library that allows virtualization provisioning tools to
3e012bc
determine the optimal device settings for a hypervisor/operating system
3e012bc
combination.
3e012bc
3e012bc
%package devel
3e012bc
Summary: Libraries, includes, etc. to compile with the libosinfo library
3e012bc
Group: Development/Libraries
3e012bc
Requires: %{name} = %{version}-%{release}
3e012bc
Requires: pkgconfig
3e012bc
Requires: glib2-devel
3e012bc
3e012bc
%description devel
3e012bc
libosinfo is a library that allows virtualization provisioning tools to
3e012bc
determine the optimal device settings for a hypervisor/operating system
3e012bc
combination.
3e012bc
3e012bc
Libraries, includes, etc. to compile with the libosinfo library
3e012bc
3e012bc
%package vala
3e012bc
Summary: Vala bindings
3e012bc
Group: Development/Libraries
3e012bc
Requires: %{name} = %{version}-%{release}
3e012bc
3e012bc
%description vala
3e012bc
libosinfo is a library that allows virtualization provisioning tools to
3e012bc
determine the optimal device settings for a hypervisor/operating system
3e012bc
combination.
3e012bc
3e012bc
This package provides the Vala bindings for libosinfo library.
3e012bc
3e012bc
%prep
3e012bc
%setup -q
3e012bc
6dcf0a4
# os: Add Fedora 21
6dcf0a4
%patch0001 -p1
6dcf0a4
3e012bc
%build
51927b1
%if %{with_gir}
51927b1
%define gir_arg --enable-introspection=yes
51927b1
%else
51927b1
%define gir_arg --enable-introspection=no
51927b1
%endif
51927b1
0dda703
%if %{with_udev}
0dda703
%define udev_arg --enable-udev=yes
0dda703
%else
0dda703
%define udev_arg --enable-udev=no
0dda703
%endif
0dda703
7c7d853
%configure %{gir_arg} %{udev_arg} --enable-vala=yes --with-usb-ids-path=/usr/share/hwdata/usb.ids --with-pci-ids-path=/usr/share/hwdata/pci.ids
3e012bc
%__make %{?_smp_mflags} V=1
3e012bc
3e012bc
chmod a-x examples/*.js examples/*.py
3e012bc
3e012bc
%install
3e012bc
rm -fr %{buildroot}
3e012bc
%__make install DESTDIR=%{buildroot}
3e012bc
rm -f %{buildroot}%{_libdir}/*.a
3e012bc
rm -f %{buildroot}%{_libdir}/*.la
0dda703
a21fed5
%find_lang %{name}
3e012bc
3e012bc
%check
3e012bc
make check
3e012bc
3e012bc
%clean
3e012bc
rm -fr %{buildroot}
3e012bc
3e012bc
%post -p /sbin/ldconfig
3e012bc
3e012bc
%postun -p /sbin/ldconfig
3e012bc
19d8414
%files -f %{name}.lang
3e012bc
%defattr(-, root, root)
3e012bc
%doc AUTHORS ChangeLog COPYING.LIB NEWS README
3e012bc
%{_bindir}/osinfo-detect
51927b1
%{_bindir}/osinfo-db-validate
51927b1
%{_bindir}/osinfo-query
5f81f66
%{_bindir}/osinfo-install-script
3e012bc
%dir %{_datadir}/libosinfo/
51927b1
%dir %{_datadir}/libosinfo/db/
51927b1
%dir %{_datadir}/libosinfo/schemas/
51927b1
%{_datadir}/libosinfo/db/usb.ids
51927b1
%{_datadir}/libosinfo/db/pci.ids
a21fed5
%{_datadir}/libosinfo/db/datamaps
0dda703
%{_datadir}/libosinfo/db/devices
51927b1
%{_datadir}/libosinfo/db/oses
51927b1
%{_datadir}/libosinfo/db/hypervisors
5f81f66
%{_datadir}/libosinfo/db/install-scripts
51927b1
%{_datadir}/libosinfo/schemas/libosinfo.rng
51927b1
%{_mandir}/man1/osinfo-db-validate.1*
51927b1
%{_mandir}/man1/osinfo-detect.1*
51927b1
%{_mandir}/man1/osinfo-query.1*
5f81f66
%{_mandir}/man1/osinfo-install-script.1*
3e012bc
%{_libdir}/%{name}-1.0.so.*
0dda703
%if %{with_udev}
3e012bc
/lib/udev/rules.d/95-osinfo.rules
0dda703
%endif
51927b1
%if %{with_gir}
3e012bc
%{_libdir}/girepository-1.0/Libosinfo-1.0.typelib
51927b1
%endif
3e012bc
3e012bc
%files devel
3e012bc
%defattr(-, root, root)
3e012bc
%doc examples/demo.js
3e012bc
%doc examples/demo.py
3e012bc
%{_libdir}/%{name}-1.0.so
3e012bc
%dir %{_includedir}/%{name}-1.0/
3e012bc
%dir %{_includedir}/%{name}-1.0/osinfo/
3e012bc
%{_includedir}/%{name}-1.0/osinfo/*.h
3e012bc
%{_libdir}/pkgconfig/%{name}-1.0.pc
51927b1
%if %{with_gir}
3e012bc
%{_datadir}/gir-1.0/Libosinfo-1.0.gir
51927b1
%endif
3e012bc
%{_datadir}/gtk-doc/html/Libosinfo
3e012bc
3e012bc
%files vala
3e012bc
%defattr(-, root, root)
3e012bc
%{_datadir}/vala/vapi/libosinfo-1.0.vapi
3e012bc
3e012bc
%changelog
6dcf0a4
* Mon Sep 22 2014 Cole Robinson <crobinso@redhat.com> - 0.2.11-2
6dcf0a4
- os: Add Fedora 21
6dcf0a4
5d2b88e
* Tue Aug 26 2014 Christophe Fergeau <cfergeau@redhat.com> 0.2.11-1
5d2b88e
- New upstream release 0.2.11
5d2b88e
39edce7
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.9-4
39edce7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
39edce7
b289157
* Tue Jul 22 2014 Kalev Lember <kalevlember@gmail.com> - 0.2.9-3
b289157
- Rebuilt for gobject-introspection 1.41.4
b289157
c1781d0
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.9-2
c1781d0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
c1781d0
Debarshi Ray 2219ea4
* Wed Dec 18 2013 Debarshi Ray <rishi@fedoraproject.org> - 0.2.9-1
Debarshi Ray 2219ea4
- New upstream release 0.2.9
Debarshi Ray 2219ea4
2fd5137
* Thu Nov 28 2013 Zeeshan Ali <zeenix@redhat.com> - 0.2.8-1
2fd5137
- New upstream release 0.2.8
2fd5137
42ee40d
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.7-2
42ee40d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
42ee40d
4fed003
* Tue May 14 2013 Zeeshan Ali <zeenix@redhat.com> - 0.2.7-1
4fed003
- New upstream release 0.2.7
4fed003
89667dc
* Thu Mar 21 2013 Zeeshan Ali <zeenix@redhat.com> - 0.2.6-1
89667dc
- New upstream release 0.2.6
89667dc
4a07f8e
* Wed Mar 06 2013 Christophe Fergeau <cfergeau@redhat.com> - 0.2.5-2
4a07f8e
- BuildRequires /usr/bin/pod2man as this will automatically pick the right
4a07f8e
  package rather than conditionally requiring a package that is only
4a07f8e
  available in f19+
4a07f8e
- Do not Requires: udev when building libosinfo without its udev rule
4a07f8e
  (which is done on f19+)
4a07f8e
3306434
* Tue Mar 05 2013 Christophe Fergeau <cfergeau@redhat.com> 0.2.5-1
3306434
- New upstream release 0.2.5
3306434
- Disable udev rule as it's no longer required with newer
3306434
  systemd/util-linux
3306434
cb45e8d
* Tue Feb 12 2013 Cole Robinson <crobinso@redhat.com> - 0.2.3-2
cb45e8d
- Fix osinfo-detect crash with non-bootable media (bz #901910)
cb45e8d
19fa200
* Mon Jan 14 2013 Zeeshan Ali <zeenix@redhat.com> - 0.2.3-1
19fa200
- New upstream release 0.2.3
19fa200
256855a
* Thu Dec 20 2012 Christophe Fergeau <cfergeau@redhat.com> - 0.2.2-1
256855a
- New upstream release 0.2.2
256855a
5f81f66
* Fri Oct 12 2012 Zeeshan Ali <zeenix@redhat.com> - 0.2.1-1
5f81f66
- Fix and simplify udev rule.
5f81f66
- Fedora:
5f81f66
  - Fix minimum RAM requirements for F16 and F17.
5f81f66
- Add data on:
5f81f66
  - Fedora 18
5f81f66
  - GNOME 3.6
5f81f66
  - Ubuntu 12.10
5f81f66
- Fixes to doc build.
5f81f66
- Install script:
5f81f66
  - Add get_config_param method.
5f81f66
  - Differenciate between expected/output script names.
5f81f66
  - Add more utility functions.
5f81f66
- Add 'installer-reboots' parameter to medias.
5f81f66
- osinfo-detect does not die of DB loading errors anymore.
5f81f66
- More type-specific entity value getters/setters.
5f81f66
- Fixe and update RNG file.
5f81f66
- Add 'subsystem' property/attribute to devices.
5f81f66
75fe2c9
* Mon Sep 03 2012 Christophe Fergeau <cfergeau@redhat.com> - 0.2.0-1
75fe2c9
- Update to 0.2.0 release.
75fe2c9
63294d4
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.2-2
63294d4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
63294d4
27bad42
* Tue Jun 12 2012 Zeeshan Ali <zeenix@redhat.com> - 0.1.2-1
27bad42
- Update to 0.1.2 release.
27bad42
c01fe89
* Thu Apr 12 2012 Zeeshan Ali <zeenix@redhat.com> - 0.1.1-1
c01fe89
- Update to 0.1.1 release.
c01fe89
7e2781f
* Wed Mar 14 2012 Daniel P. Berrange <berrange@redhat.com> - 0.1.0-2
7e2781f
- Remove obsolete perl based scripts (rhbz #803086)
7e2781f
f2101dc
* Wed Feb 08 2012 Christophe Fergeau <cfergeau@redhat.com> - 0.1.0-1
f2101dc
- Update to 0.1.0 release
f2101dc
0e5ab9c
* Tue Jan  17 2012 Zeeshan Ali <zeenix@redhat.com> - 0.0.5-1
0e5ab9c
- Update to 0.0.5 release
0e5ab9c
3e012bc
* Tue Jan  3 2012 Daniel P. Berrange <berrange@redhat.com> - 0.0.4-2
3e012bc
- Remove pointless gir conditionals
3e012bc
3e012bc
* Wed Dec 21 2011 Daniel P. Berrange <berrange@redhat.com> - 0.0.4-1
3e012bc
- Update to 0.0.4 release
3e012bc
3e012bc
* Thu Nov 24 2011 Daniel P. Berrange <berrange@redhat.com> - 0.0.2-1
3e012bc
- Initial package
3e012bc