2012-01-04 14:22:45 +00:00
|
|
|
# -*- rpm-spec -*-
|
|
|
|
|
2022-08-08 17:25:55 +00:00
|
|
|
%define with_mingw 0
|
|
|
|
%if 0%{?fedora}
|
|
|
|
%define with_mingw 0%{!?_without_mingw:1}
|
|
|
|
%endif
|
|
|
|
|
2012-01-04 14:22:45 +00:00
|
|
|
Summary: A library for managing OS information for virtualization
|
|
|
|
Name: libosinfo
|
2023-10-27 16:32:39 +00:00
|
|
|
Version: 1.11.0
|
2023-10-27 16:32:03 +00:00
|
|
|
Release: %autorelease
|
2023-04-26 12:58:17 +00:00
|
|
|
License: LGPL-2.1-or-later
|
2022-08-08 17:25:55 +00:00
|
|
|
Source: https://releases.pagure.org/%{name}/%{name}-%{version}.tar.xz
|
2017-08-15 10:55:21 +00:00
|
|
|
URL: https://libosinfo.org/
|
2019-11-29 13:22:20 +00:00
|
|
|
BuildRequires: meson
|
|
|
|
BuildRequires: gcc
|
|
|
|
BuildRequires: gtk-doc
|
2019-03-01 16:20:07 +00:00
|
|
|
BuildRequires: gettext-devel
|
2012-01-04 14:22:45 +00:00
|
|
|
BuildRequires: glib2-devel
|
|
|
|
BuildRequires: libxml2-devel >= 2.6.0
|
2012-10-12 16:46:26 +00:00
|
|
|
BuildRequires: libxslt-devel >= 1.0.0
|
2023-02-09 21:10:18 +00:00
|
|
|
%if 0%{?fedora} >= 37 || 0%{?rhel} >= 10
|
2022-07-19 12:20:10 +00:00
|
|
|
BuildRequires: libsoup3-devel
|
2022-07-21 10:26:54 +00:00
|
|
|
%else
|
|
|
|
BuildRequires: libsoup-devel
|
|
|
|
%endif
|
2012-01-04 14:22:45 +00:00
|
|
|
BuildRequires: vala
|
2013-03-06 09:17:18 +00:00
|
|
|
BuildRequires: /usr/bin/pod2man
|
2016-07-01 09:47:34 +00:00
|
|
|
BuildRequires: hwdata
|
2012-04-12 15:17:39 +00:00
|
|
|
BuildRequires: gobject-introspection-devel
|
2019-07-26 19:29:42 +00:00
|
|
|
BuildRequires: osinfo-db
|
2019-04-10 12:19:21 +00:00
|
|
|
BuildRequires: git
|
2013-03-20 23:22:31 +00:00
|
|
|
Requires: hwdata
|
2019-07-26 19:29:42 +00:00
|
|
|
Requires: osinfo-db
|
2016-10-07 16:05:09 +00:00
|
|
|
Requires: osinfo-db-tools
|
2012-01-04 14:22:45 +00:00
|
|
|
|
2022-08-08 17:25:55 +00:00
|
|
|
%if %{with_mingw}
|
|
|
|
BuildRequires: mingw32-filesystem
|
|
|
|
BuildRequires: mingw32-gcc
|
|
|
|
BuildRequires: mingw32-binutils
|
|
|
|
BuildRequires: mingw32-glib2
|
|
|
|
BuildRequires: mingw32-libxml2
|
|
|
|
BuildRequires: mingw32-libxslt
|
|
|
|
BuildRequires: mingw32-libsoup
|
|
|
|
|
|
|
|
BuildRequires: mingw64-filesystem
|
|
|
|
BuildRequires: mingw64-gcc
|
|
|
|
BuildRequires: mingw64-binutils
|
|
|
|
BuildRequires: mingw64-glib2
|
|
|
|
BuildRequires: mingw64-libxml2
|
|
|
|
BuildRequires: mingw64-libxslt
|
|
|
|
BuildRequires: mingw64-libsoup
|
|
|
|
%endif
|
|
|
|
|
2012-01-04 14:22:45 +00:00
|
|
|
%description
|
|
|
|
libosinfo is a library that allows virtualization provisioning tools to
|
|
|
|
determine the optimal device settings for a hypervisor/operating system
|
|
|
|
combination.
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Libraries, includes, etc. to compile with the libosinfo library
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
Requires: pkgconfig
|
|
|
|
Requires: glib2-devel
|
2019-02-04 12:06:45 +00:00
|
|
|
# -vala subpackage removed in F30
|
|
|
|
Obsoletes: libosinfo-vala < 1.3.0-3
|
|
|
|
Provides: libosinfo-vala = %{version}-%{release}
|
2012-01-04 14:22:45 +00:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
libosinfo is a library that allows virtualization provisioning tools to
|
|
|
|
determine the optimal device settings for a hypervisor/operating system
|
|
|
|
combination.
|
|
|
|
|
|
|
|
Libraries, includes, etc. to compile with the libosinfo library
|
|
|
|
|
2022-08-08 17:25:55 +00:00
|
|
|
%if %{with_mingw}
|
|
|
|
%package -n mingw32-libosinfo
|
|
|
|
Summary: %{summary}
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
Requires: pkgconfig
|
|
|
|
Requires: mingw32-osinfo-db
|
|
|
|
Requires: mingw32-osinfo-db-tools
|
|
|
|
|
|
|
|
%description -n mingw32-libosinfo
|
|
|
|
libosinfo is a library that allows virtualization provisioning tools to
|
|
|
|
determine the optimal device settings for a hypervisor/operating system
|
|
|
|
combination.
|
|
|
|
|
|
|
|
%package -n mingw64-libosinfo
|
|
|
|
Summary: %{summary}
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
Requires: pkgconfig
|
|
|
|
Requires: mingw64-osinfo-db
|
|
|
|
Requires: mingw64-osinfo-db-tools
|
|
|
|
|
|
|
|
%description -n mingw64-libosinfo
|
|
|
|
libosinfo is a library that allows virtualization provisioning tools to
|
|
|
|
determine the optimal device settings for a hypervisor/operating system
|
|
|
|
combination.
|
|
|
|
|
|
|
|
%{?mingw_debug_package}
|
|
|
|
%endif
|
|
|
|
|
2012-01-04 14:22:45 +00:00
|
|
|
%prep
|
2019-04-10 12:19:21 +00:00
|
|
|
%autosetup -S git
|
2012-01-04 14:22:45 +00:00
|
|
|
|
|
|
|
%build
|
2019-11-29 13:22:20 +00:00
|
|
|
%meson \
|
|
|
|
-Denable-gtk-doc=true \
|
|
|
|
-Denable-tests=true \
|
|
|
|
-Denable-introspection=enabled \
|
|
|
|
-Denable-vala=enabled
|
2020-08-02 20:48:36 +00:00
|
|
|
%meson_build
|
2012-01-04 14:22:45 +00:00
|
|
|
|
2022-08-08 17:25:55 +00:00
|
|
|
%if %{with_mingw}
|
|
|
|
%mingw_meson \
|
|
|
|
-Denable-gtk-doc=false \
|
|
|
|
-Denable-tests=false \
|
|
|
|
-Denable-introspection=disabled \
|
|
|
|
-Denable-vala=disabled
|
|
|
|
%mingw_ninja
|
|
|
|
%endif
|
|
|
|
|
2012-01-04 14:22:45 +00:00
|
|
|
%install
|
2019-11-29 13:22:20 +00:00
|
|
|
%meson_install
|
2013-02-25 18:18:53 +00:00
|
|
|
|
2013-01-15 02:45:13 +00:00
|
|
|
%find_lang %{name}
|
2012-01-04 14:22:45 +00:00
|
|
|
|
2022-08-08 17:25:55 +00:00
|
|
|
%if %{with_mingw}
|
|
|
|
%mingw_ninja_install
|
|
|
|
|
|
|
|
# Remove static libraries but DON'T remove *.dll.a files.
|
|
|
|
rm -f $RPM_BUILD_ROOT%{mingw32_libdir}/libosinfo-1.0.a
|
|
|
|
rm -f $RPM_BUILD_ROOT%{mingw64_libdir}/libosinfo-1.0.a
|
|
|
|
|
|
|
|
# Libtool files don't need to be bundled
|
|
|
|
find $RPM_BUILD_ROOT -name "*.la" -delete
|
|
|
|
|
|
|
|
# Manpages don't need to be bundled
|
|
|
|
rm -rf $RPM_BUILD_ROOT%{mingw32_datadir}/man
|
|
|
|
rm -rf $RPM_BUILD_ROOT%{mingw64_datadir}/man
|
|
|
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT%{mingw32_datadir}/gtk-doc
|
|
|
|
rm -rf $RPM_BUILD_ROOT%{mingw64_datadir}/gtk-doc
|
|
|
|
|
|
|
|
%mingw_debug_install_post
|
|
|
|
|
|
|
|
%mingw_find_lang libosinfo
|
|
|
|
%endif
|
|
|
|
|
2012-01-04 14:22:45 +00:00
|
|
|
%check
|
2019-11-29 13:22:20 +00:00
|
|
|
%meson_test
|
2012-01-04 14:22:45 +00:00
|
|
|
|
2018-02-06 10:46:05 +00:00
|
|
|
%ldconfig_scriptlets
|
2012-01-04 14:22:45 +00:00
|
|
|
|
2013-01-15 18:24:30 +00:00
|
|
|
%files -f %{name}.lang
|
2012-01-04 14:22:45 +00:00
|
|
|
%doc AUTHORS ChangeLog COPYING.LIB NEWS README
|
|
|
|
%{_bindir}/osinfo-detect
|
2012-04-12 15:17:39 +00:00
|
|
|
%{_bindir}/osinfo-query
|
2012-10-12 16:46:26 +00:00
|
|
|
%{_bindir}/osinfo-install-script
|
2012-04-12 15:17:39 +00:00
|
|
|
%{_mandir}/man1/osinfo-detect.1*
|
|
|
|
%{_mandir}/man1/osinfo-query.1*
|
2012-10-12 16:46:26 +00:00
|
|
|
%{_mandir}/man1/osinfo-install-script.1*
|
2012-01-04 14:22:45 +00:00
|
|
|
%{_libdir}/%{name}-1.0.so.*
|
|
|
|
%{_libdir}/girepository-1.0/Libosinfo-1.0.typelib
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%{_libdir}/%{name}-1.0.so
|
|
|
|
%dir %{_includedir}/%{name}-1.0/
|
|
|
|
%dir %{_includedir}/%{name}-1.0/osinfo/
|
|
|
|
%{_includedir}/%{name}-1.0/osinfo/*.h
|
|
|
|
%{_libdir}/pkgconfig/%{name}-1.0.pc
|
|
|
|
%{_datadir}/gir-1.0/Libosinfo-1.0.gir
|
|
|
|
%{_datadir}/gtk-doc/html/Libosinfo
|
2019-11-29 13:22:20 +00:00
|
|
|
|
2019-02-04 12:06:45 +00:00
|
|
|
%dir %{_datadir}/vala
|
|
|
|
%dir %{_datadir}/vala/vapi
|
2019-11-29 13:22:20 +00:00
|
|
|
%{_datadir}/vala/vapi/libosinfo-1.0.deps
|
2012-01-04 14:22:45 +00:00
|
|
|
%{_datadir}/vala/vapi/libosinfo-1.0.vapi
|
|
|
|
|
2022-08-08 17:25:55 +00:00
|
|
|
%if %{with_mingw}
|
|
|
|
%files -n mingw32-libosinfo -f mingw32-libosinfo.lang
|
|
|
|
%doc AUTHORS ChangeLog COPYING.LIB NEWS README
|
|
|
|
%{mingw32_bindir}/osinfo-detect.exe
|
|
|
|
%{mingw32_bindir}/osinfo-install-script.exe
|
|
|
|
%{mingw32_bindir}/osinfo-query.exe
|
|
|
|
%{mingw32_bindir}/libosinfo-1.0-0.dll
|
|
|
|
%{mingw32_libdir}/libosinfo-1.0.dll.a
|
|
|
|
%{mingw32_libdir}/pkgconfig/libosinfo-1.0.pc
|
|
|
|
%dir %{mingw32_includedir}/libosinfo-1.0/
|
|
|
|
%dir %{mingw32_includedir}/libosinfo-1.0/osinfo
|
|
|
|
%{mingw32_includedir}/libosinfo-1.0/osinfo/*.h
|
|
|
|
%dir %{mingw32_datadir}/libosinfo
|
|
|
|
%{mingw32_datadir}/libosinfo/usb.ids
|
|
|
|
%{mingw32_datadir}/libosinfo/pci.ids
|
|
|
|
|
|
|
|
%files -n mingw64-libosinfo -f mingw64-libosinfo.lang
|
|
|
|
%doc AUTHORS ChangeLog COPYING.LIB NEWS README
|
|
|
|
%{mingw64_bindir}/osinfo-detect.exe
|
|
|
|
%{mingw64_bindir}/osinfo-install-script.exe
|
|
|
|
%{mingw64_bindir}/osinfo-query.exe
|
|
|
|
%{mingw64_bindir}/libosinfo-1.0-0.dll
|
|
|
|
%{mingw64_libdir}/libosinfo-1.0.dll.a
|
|
|
|
%{mingw64_libdir}/pkgconfig/libosinfo-1.0.pc
|
|
|
|
%dir %{mingw64_includedir}/libosinfo-1.0/
|
|
|
|
%dir %{mingw64_includedir}/libosinfo-1.0/osinfo
|
|
|
|
%{mingw64_includedir}/libosinfo-1.0/osinfo/*.h
|
|
|
|
%dir %{mingw64_datadir}/libosinfo
|
|
|
|
%{mingw64_datadir}/libosinfo/usb.ids
|
|
|
|
%{mingw64_datadir}/libosinfo/pci.ids
|
|
|
|
%endif
|
|
|
|
|
2012-01-04 14:22:45 +00:00
|
|
|
%changelog
|