Split developer documentation into a libsoup-doc.noarch subpackage

Split developer documentation files into a separate package, to avoid
multilib conflicts on the libsoup-devel subpackage. The change will
also follow a usual packaging way of the developer documentation in Fedora.
This commit is contained in:
Milan Crha 2021-01-18 14:00:47 +01:00
parent 291da5d4fc
commit f652009d9f

View File

@ -1,5 +1,8 @@
%define glib2_version 2.58.0 %define glib2_version 2.58.0
# Coverity scan can override this to 0, to skip checking in gtk-doc generated code
%{!?with_docs: %global with_docs 1}
Name: libsoup Name: libsoup
Version: 2.72.0 Version: 2.72.0
Release: 3%{?dist} Release: 3%{?dist}
@ -12,7 +15,9 @@ Source0: https://download.gnome.org/sources/%{name}/2.72/%{name}-%{version}.tar.
BuildRequires: gettext BuildRequires: gettext
BuildRequires: glib2-devel >= %{glib2_version} BuildRequires: glib2-devel >= %{glib2_version}
BuildRequires: glib-networking BuildRequires: glib-networking
%if %{with_docs}
BuildRequires: gtk-doc BuildRequires: gtk-doc
%endif
BuildRequires: krb5-devel BuildRequires: krb5-devel
BuildRequires: meson BuildRequires: meson
BuildRequires: pkgconfig(gobject-introspection-1.0) BuildRequires: pkgconfig(gobject-introspection-1.0)
@ -46,11 +51,29 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
Libsoup is an HTTP library implementation in C. This package allows Libsoup is an HTTP library implementation in C. This package allows
you to develop applications that use the libsoup library. you to develop applications that use the libsoup library.
%if %{with_docs}
%package doc
Summary: Documentation files for %{name}
BuildArch: noarch
%description doc
This package contains developer documentation for %{name}.
# %%{with_docs}
%endif
%prep %prep
%autosetup -p1 %autosetup -p1
%build %build
%meson -Dgtk_doc=true %if %{with_docs}
%define gtkdoc_flags -Dgtk_doc=true
%else
%define gtkdoc_flags -Dgtk_doc=false
%endif
%meson %gtkdoc_flags
%meson_build %meson_build
%install %install
@ -79,14 +102,20 @@ sed -i -e 's/sysprof-capture-4, //' $RPM_BUILD_ROOT%{_libdir}/pkgconfig/*.pc
%{_libdir}/pkgconfig/*.pc %{_libdir}/pkgconfig/*.pc
%dir %{_datadir}/gir-1.0 %dir %{_datadir}/gir-1.0
%{_datadir}/gir-1.0/Soup*2.4.gir %{_datadir}/gir-1.0/Soup*2.4.gir
%dir %{_datadir}/gtk-doc
%dir %{_datadir}/gtk-doc/html
%{_datadir}/gtk-doc/html/%{name}-2.4
%dir %{_datadir}/vala %dir %{_datadir}/vala
%dir %{_datadir}/vala/vapi %dir %{_datadir}/vala/vapi
%{_datadir}/vala/vapi/libsoup-2.4.deps %{_datadir}/vala/vapi/libsoup-2.4.deps
%{_datadir}/vala/vapi/libsoup-2.4.vapi %{_datadir}/vala/vapi/libsoup-2.4.vapi
%if %{with_docs}
%files doc
%dir %{_datadir}/gtk-doc
%dir %{_datadir}/gtk-doc/html
%{_datadir}/gtk-doc/html/%{name}-2.4
%endif
%changelog %changelog
* Sun Sep 20 2020 Kalev Lember <klember@redhat.com> - 2.72.0-3 * Sun Sep 20 2020 Kalev Lember <klember@redhat.com> - 2.72.0-3
- Try harder to avoid sysprof-devel dependency - Try harder to avoid sysprof-devel dependency