%if 0%{?rhel} && 0%{?rhel} <= 7 %global meson_python_flags -Dwith_py2=true %global build_python2 1 %else %global meson_python_flags -Dwith_py2=false %global build_python2 0 %endif %global upstream_name libmodulemd %if (0%{?rhel} && 0%{?rhel} <= 7) %global v2_suffix 2 %endif # Rawhide builds currently fail when building with LTO %define _lto_cflags %{nil} Name: %{upstream_name}%{?v2_suffix} Version: 2.13.0 Release: 1%{?dist} Summary: Module metadata manipulation library License: MIT URL: https://github.com/fedora-modularity/libmodulemd Source0: libmodulemd-2.13.0.tar.xz BuildRequires: meson >= 0.47 BuildRequires: pkgconfig BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: pkgconfig(gobject-2.0) BuildRequires: pkgconfig(gobject-introspection-1.0) BuildRequires: pkgconfig(yaml-0.1) BuildRequires: pkgconfig(gtk-doc) BuildRequires: glib2-doc BuildRequires: rpm-devel BuildRequires: file-devel %if %{build_python2} BuildRequires: python2-devel BuildRequires: python-gobject-base %endif BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-gobject-base BuildRequires: help2man # 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 Requires: python-six %description -n python2-%{name} Python 2 bindings for %{name} %endif %package -n python%{python3_pkgversion}-%{name} Summary: Python 3 bindings for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} Requires: python%{python3_pkgversion}-gobject-base %if (0%{?rhel} && 0%{?rhel} <= 7) # The py3_dist macro on EPEL 7 doesn't work right at the moment Requires: python3.6dist(six) %else Requires: %{py3_dist six} %endif %description -n python%{python3_pkgversion}-%{name} Python %{python3_pkgversion} bindings for %{name} %package devel Summary: Development files for libmodulemd Requires: %{name}%{?_isa} = %{version}-%{release} %if (0%{?rhel} && 0%{?rhel} <= 7) Conflicts: libmodulemd1-devel Conflicts: libmodulemd-devel %endif %description devel Development files for libmodulemd. %prep %autosetup -p1 -n modulemd-%{version} -n libmodulemd-2.13.0 %build %meson %{meson_python_flags} %meson_build %check export LC_CTYPE=C.utf8 # Don't run tests on ARM for now. There are problems with # performance on the builders and often these time out. %ifnarch %{arm} aarch64 # The tests sometimes time out in CI, so give them a little extra time %{__meson} test -C %{_vpath_builddir} %{?_smp_mesonflags} --print-errorlogs -t 5 %endif %install %meson_install %if ( 0%{?rhel} && 0%{?rhel} <= 7) # Don't conflict with modulemd-validator from 1.x included in the official # RHEL 7 repos mv %{buildroot}%{_bindir}/modulemd-validator \ %{buildroot}%{_bindir}/modulemd-validator%{?v2_suffix} mv %{buildroot}%{_mandir}/man1/modulemd-validator.1 \ %{buildroot}%{_mandir}/man1/modulemd-validator%{?v2_suffix}.1 %endif %ldconfig_scriptlets %files %license COPYING %doc NEWS README.md %{_bindir}/modulemd-validator%{?v2_suffix} %{_mandir}/man1/modulemd-validator%{?v2_suffix}.1* %{_libdir}/%{upstream_name}.so.2* %dir %{_libdir}/girepository-1.0 %{_libdir}/girepository-1.0/Modulemd-2.0.typelib %files devel %{_libdir}/%{upstream_name}.so %{_libdir}/pkgconfig/modulemd-2.0.pc %{_includedir}/modulemd-2.0/ %dir %{_datadir}/gir-1.0 %{_datadir}/gir-1.0/Modulemd-2.0.gir %dir %{_datadir}/gtk-doc %dir %{_datadir}/gtk-doc/html %{_datadir}/gtk-doc/html/modulemd-2.0/ %if %{build_python2} %files -n python2-%{name} %{python2_sitearch}/gi/overrides/ %endif %files -n python%{python3_pkgversion}-%{name} %{python3_sitearch}/gi/overrides/ %changelog * Fri Jul 09 2021 rpm-gitoverlay - 2.13.0-1 - [1a032da] doc: Add NEWS file with the release notes (Petr Písař) - [0761d0b] CI: Replace Mageia 7 with Mageia 8 (Petr Písař) - [7c0158b] Reject invalid signed integers (rpm buildorder) (Petr Písař) - [4f5b813] Fix parsing unsigned integers: reject negative numbers (Petr Písař) - [441680b] Code auto-formatting (Libmodulemd CI) - [b372358] modulemd_validator: Unify validation code paths (Petr Písař) - [d43990c] modulemd-validator: Validate modulemd-v1 and modulemd-packager-v2 explicitly (Petr Písař) - [50384c6] modulemd-validatora: Remove a dead code (Petr Písař) - [a6e05db] modulem-validator: Remove synthetic "index" value from a --type option (Petr Písař) - [95b131f] modulemd-validator: Add typed validation for modulemd-translations-v1 (Petr Písař) - [daefe7a] modulemd-validator: Add typed validation for modulemd-v1 (Petr Písař) - [21c4654] build: move validator tests for modulemdv2 (Petr Písař) - [bae2e88] modulemd-validator: Add typed validation for modulemd-packager-v2 (Petr Písař) - [e7c2544] modulemd-validator: Use our own enum instead of GType (Petr Písař) - [72a30d6] build: move validator tests for packagerv3 (Petr Písař) - [7a7b35e] modulemd-validator: Add typed validation for modulemd-obsoletes-v1 (Petr Písař) - [3af8617] modulemd-validator: generalize GType stringification (Petr Písař) - [5bc9443] modulemd-validator: Reported line numbers in typed error validation (Petr Písař) - [005879b] modulemd-validator: Check for a trailing garbage in typed validation (Petr Písař) - [351c265] Fix validating unsigned integers (Petr Písař) - [4a5687f] modulemd-validator: Support explicit validation of modulemd-defaults-v1 documents (Petr Písař) - [1c4447a] modulemd-validator: Validate documents using --type option (Petr Písař) - [0dfcb5c] modulemd-validator: Return 0 exit code on --version option (Petr Písař) - [06458cf] Add modulemd-validator tests (Petr Písař) - [8577d67] Python support requires GIR support (Petr Písař) - [96a1ff3] Test: Exhibit demodularized packages (Petr Písař) - [fe60860] Implement demodularized packages (Petr Písař) - [b95f38c] Declare API for demodularized packages (Petr Písař) - [b2c7176] Increase version to 2.13.0 (Petr Písař) - [9e48081] Specification: Add /data/demodularized/rpms list to modulemd and modulemd-packager (Petr Písař) - [5512b46] Allow disabling Python 3 (Petr Písař) - [5d2fc8f] Fix archlinux builds (Stephen Gallagher) - [1a75a9b] modulemd_module_stream_upgrade{,_ext}: Check self type before using it (Petr Písař) - [8964821] Code auto-formatting (Libmodulemd CI) - [818b3cc] modulemd_subdocument_info_debug_dump_failures: Prevent from possible NULL-pointer dereferences (Petr Písař) - [fc2b47e] packit: Enable building on EPEL 8 (Petr Písař) - [3c68a08] tests: Check a return value of modulemd_read_packager_string() after an exception (Petr Písař) - [2a450a8] tests: Correct Arch Linux image address (Petr Písař) - [8d162bb] Code auto-formatting (Libmodulemd CI) - [cc41561] validator: Handle a failed g_setenv() (Petr Písař) - [f408277] Bump version to 2.12.2 (Petr Písař)