Pull in mingw sub-packages and other misc cleanups

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2022-08-09 08:10:45 -04:00
parent 4420c27312
commit 020e3294b0

View File

@ -1,15 +1,17 @@
# -*- rpm-spec -*- # -*- rpm-spec -*-
%define with_mingw 0
%if 0%{?fedora}
%define with_mingw 0%{!?_without_mingw:1}
%endif
Summary: Tools for managing the osinfo database Summary: Tools for managing the osinfo database
Name: osinfo-db-tools Name: osinfo-db-tools
Version: 1.10.0 Version: 1.10.0
Release: 2%{?dist} Release: 3%{?dist}
License: GPLv2+ License: GPLv2+
Source: https://releases.pagure.io/libosinfo/%{name}-%{version}.tar.xz Source: https://releases.pagure.org/libosinfo/%{name}-%{version}.tar.xz
URL: http://libosinfo.org/ URL: https://libosinfo.org
### Patches ###
BuildRequires: meson BuildRequires: meson
BuildRequires: gcc BuildRequires: gcc
BuildRequires: gettext-devel BuildRequires: gettext-devel
@ -17,18 +19,64 @@ BuildRequires: git
BuildRequires: glib2-devel BuildRequires: glib2-devel
BuildRequires: libxml2-devel >= 2.6.0 BuildRequires: libxml2-devel >= 2.6.0
BuildRequires: libxslt-devel >= 1.0.0 BuildRequires: libxslt-devel >= 1.0.0
BuildRequires: libarchive-devel
BuildRequires: libsoup-devel BuildRequires: libsoup-devel
BuildRequires: libarchive-devel
BuildRequires: json-glib-devel BuildRequires: json-glib-devel
BuildRequires: /usr/bin/pod2man BuildRequires: /usr/bin/pod2man
#Required for testing purposes
BuildRequires: python3 BuildRequires: python3
BuildRequires: python3-pytest BuildRequires: python3-pytest
BuildRequires: python3-requests BuildRequires: python3-requests
%if %{with_mingw}
BuildRequires: mingw32-filesystem
BuildRequires: mingw32-gcc
BuildRequires: mingw32-binutils
BuildRequires: mingw32-glib2
BuildRequires: mingw32-json-glib
BuildRequires: mingw32-libxml2
BuildRequires: mingw32-libxslt
BuildRequires: mingw32-libarchive
BuildRequires: mingw32-libsoup
BuildRequires: mingw64-filesystem
BuildRequires: mingw64-gcc
BuildRequires: mingw64-binutils
BuildRequires: mingw64-glib2
BuildRequires: mingw64-json-glib
BuildRequires: mingw64-libxml2
BuildRequires: mingw64-libxslt
BuildRequires: mingw64-libarchive
BuildRequires: mingw64-libsoup
%endif
%description %description
This package provides tools for managing the osinfo database of This package provides tools for managing the osinfo database of
information about operating systems for use with virtualization information about operating systems for use with virtualization
%if %{with_mingw}
%package -n mingw32-osinfo-db-tools
Summary: %{summary}
BuildArch: noarch
Requires: pkgconfig
%description -n mingw32-osinfo-db-tools
This package provides tools for managing the osinfo database of
information about operating systems for use with virtualization
%package -n mingw64-osinfo-db-tools
Summary: %{summary}
BuildArch: noarch
Requires: pkgconfig
%description -n mingw64-osinfo-db-tools
This package provides tools for managing the osinfo database of
information about operating systems for use with virtualization
%{?mingw_debug_package}
%endif
%prep %prep
%autosetup -S git %autosetup -S git
@ -36,6 +84,11 @@ information about operating systems for use with virtualization
%meson %meson
%meson_build %meson_build
%if %{with_mingw}
%mingw_meson
%mingw_ninja
%endif
%check %check
%meson_test %meson_test
@ -44,6 +97,18 @@ information about operating systems for use with virtualization
%find_lang %{name} %find_lang %{name}
%if %{with_mingw}
%mingw_ninja_install
# Manpages don't need to be bundled
rm -rf $RPM_BUILD_ROOT%{mingw32_datadir}/man
rm -rf $RPM_BUILD_ROOT%{mingw64_datadir}/man
%mingw_debug_install_post
%mingw_find_lang osinfo-db-tools
%endif
%files -f %{name}.lang %files -f %{name}.lang
%doc NEWS README %doc NEWS README
%license COPYING %license COPYING
@ -56,7 +121,28 @@ information about operating systems for use with virtualization
%{_mandir}/man1/osinfo-db-path.1* %{_mandir}/man1/osinfo-db-path.1*
%{_mandir}/man1/osinfo-db-validate.1* %{_mandir}/man1/osinfo-db-validate.1*
%if %{with_mingw}
%files -n mingw32-osinfo-db-tools -f mingw32-osinfo-db-tools.lang
%doc NEWS README
%license COPYING
%{mingw32_bindir}/osinfo-db-export.exe
%{mingw32_bindir}/osinfo-db-import.exe
%{mingw32_bindir}/osinfo-db-path.exe
%{mingw32_bindir}/osinfo-db-validate.exe
%files -n mingw64-osinfo-db-tools -f mingw64-osinfo-db-tools.lang
%doc NEWS README
%license COPYING
%{mingw64_bindir}/osinfo-db-export.exe
%{mingw64_bindir}/osinfo-db-import.exe
%{mingw64_bindir}/osinfo-db-path.exe
%{mingw64_bindir}/osinfo-db-validate.exe
%endif
%changelog %changelog
* Mon Aug 8 2022 Daniel P. Berrangé <berrange@redhat.com> - 1.10.0-3
- Pull in mingw sub-packages
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.10.0-2 * Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.10.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild