Update to libmodulemd 2.2.2

* Add support for python2 on RHEL and Fedora < 31
* Make python subpackages archful for GObject overrides

Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
This commit is contained in:
Stephen Gallagher 2019-03-27 14:45:27 -04:00
parent ae46f72052
commit a1c7344d3a
No known key found for this signature in database
GPG Key ID: 7A25556236BAA3A3
3 changed files with 66 additions and 10 deletions

1
.gitignore vendored
View File

@ -29,3 +29,4 @@
/modulemd-2.1.0.tar.xz
/modulemd-2.2.0.tar.xz
/modulemd-2.2.1.tar.xz
/modulemd-2.2.2.tar.xz

View File

@ -1,5 +1,14 @@
%global libmodulemd_version 2.2.1
%global libmodulemd_v1_version 1.8.4
%global libmodulemd_version 2.2.2
%global libmodulemd_v1_version 1.8.5
# Python 2 is dead on F31+
%if 0%{fedora} < 31
%global meson_override_flags -Dwith_py3_overrides=true -Dwith_py2_overrides=true
%global build_python2 1
%else
%global meson_override_flags -Dwith_py3_overrides=true -Dwith_py2_overrides=false
%global build_python2 0
%endif
Name: libmodulemd
Version: %{libmodulemd_version}
@ -18,27 +27,42 @@ BuildRequires: pkgconfig(gobject-2.0)
BuildRequires: pkgconfig(gobject-introspection-1.0)
BuildRequires: pkgconfig(yaml-0.1)
BuildRequires: pkgconfig(gtk-doc)
BuildRequires: python2-devel
BuildRequires: python-gobject-base
BuildRequires: python3-devel
BuildRequires: python3-gobject-base
%ifarch %{valgrind_arches}
BuildRequires: valgrind
%endif
Obsoletes: python2-modulemd < 1.3.4
Obsoletes: python3-modulemd < 1.3.4
# Make sure we upgrade libmodulemd1 to match
Conflicts: libmodulemd1 < %{libmodulemd_v1_version}-%{release}
# Patches
%description
C Library for manipulating module metadata files.
See https://github.com/fedora-modularity/libmodulemd/blob/master/README.md for
more details.
%if %{build_python2}
%package -n python2-%{name}
Summary: Python 2 bindings for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: python-gobject-base
Obsoletes: python2-modulemd < 1.3.4
%description -n python2-%{name}
Python 3 bindings for %{name}
%endif
%package -n python3-%{name}
Summary: Python 3 bindings for %{name}
BuildArch: noarch
Requires: libmodulemd = %{version}-%{release}
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: python3-gobject-base
Obsoletes: python3-modulemd < 1.3.4
@ -80,10 +104,25 @@ RemovePathPostfixes: .compat
Development files for libmodulemd 1.x
%if %{build_python2}
%package -n python2-libmodulemd1
Summary: Python 2 bindings for %{name}1
Version: %{libmodulemd_v1_version}
Requires: libmodulemd1 = %{libmodulemd_v1_version}-%{release}
Requires: python-gobject-base
Obsoletes: python2-libmodulemd < 2
Provides: python2-libmodulemd = %{libmodulemd_v1_version}-%{release}
%description -n python2-libmodulemd1
Python 2 bindings for libmodulemd1
%endif
%package -n python3-libmodulemd1
Summary: Python 3 bindings for %{name}1
Version: %{libmodulemd_v1_version}
BuildArch: noarch
Requires: libmodulemd1 = %{libmodulemd_v1_version}-%{release}
Requires: python3-gobject-base
@ -99,7 +138,7 @@ Python 3 bindings for libmodulemd1
%build
%meson -Ddeveloper_build=false -Dbuild_api_v1=true -Dbuild_api_v2=true
%meson -Ddeveloper_build=false -Dbuild_api_v1=true -Dbuild_api_v2=true %{meson_override_flags}
%meson_build
@ -137,7 +176,6 @@ ln -s libmodulemd.so.%{libmodulemd_v1_version} \
%{_libdir}/%{name}.so.2*
%dir %{_libdir}/girepository-1.0
%{_libdir}/girepository-1.0/Modulemd-2.0.typelib
%{python3_sitearch}/gi/overrides/
%files devel
@ -151,7 +189,19 @@ ln -s libmodulemd.so.%{libmodulemd_v1_version} \
%{_datadir}/gtk-doc/html/modulemd-2.0/
%if %{build_python2}
%files -n python2-%{name}
%{python2_sitearch}/gi/overrides/
%endif
%files -n python3-%{name}
%{python3_sitearch}/gi/overrides/
%if %{build_python2}
%files -n python2-libmodulemd1
%endif
%files -n python3-libmodulemd1
@ -177,6 +227,11 @@ ln -s libmodulemd.so.%{libmodulemd_v1_version} \
%{_datadir}/gtk-doc/html/modulemd-1.0/
%changelog
* Wed Mar 27 2019 Stephen Gallagher <sgallagh@redhat.com> - 2.2.2-1
- Update to libmodulemd 2.2.2
- Add support for python2 on RHEL and Fedora < 31
- Make python subpackages archful for GObject overrides
* Tue Mar 26 2019 Stephen Gallagher <sgallagh@redhat.com> - 2.2.1-1
- Update to libmodulemd 2.2.1
- Fixes builds on i686

View File

@ -1 +1 @@
SHA512 (modulemd-2.2.1.tar.xz) = cd25a2c89325324215623958e3b5143013561cddcf022f0a8467296fe842d60468bf0d6187ae49a8fb1b027ed7284929760aa34b6a1a576af6b7602f3c0de670
SHA512 (modulemd-2.2.2.tar.xz) = c3f28327a00196d52fa9df0b7b31367e5136b52281826d28167b618d9e051c135b174a1dc3218c1f19fc464884545d16bc86bfc57a3840a73338c002db9e38f1