Accepting request 757203 from home:StefanBruens:branches:GNOME:Factory

- Make package noarch, no binary files included.
- Move manual to separate subpackage, and build it using _multibuild.
  Removes python3-libxml2 build dependency (via yelp-tools/itstool)
  from main package.
- Correct license for documentation, it is GFDL-1.1-or-later.
- Stop packaging obsolete docs, replaced by the manual.

OBS-URL: https://build.opensuse.org/request/show/757203
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gtk-doc?expand=0&rev=72
This commit is contained in:
Dominique Leuenberger 2019-12-16 12:52:55 +00:00 committed by Git OBS Bridge
parent ed6a3c904a
commit dd87e6411c
3 changed files with 71 additions and 14 deletions

3
_multibuild Normal file
View File

@ -0,0 +1,3 @@
<multibuild>
<package>doc</package>
</multibuild>

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Sun Dec 15 19:44:20 UTC 2019 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
- Make package noarch, no binary files included.
- Move manual to separate subpackage, and build it using _multibuild.
Removes python3-libxml2 build dependency (via yelp-tools/itstool)
from main package.
- Correct license for documentation, it is GFDL-1.1-or-later.
- Stop packaging obsolete docs, replaced by the manual.
-------------------------------------------------------------------
Fri Nov 8 17:40:31 UTC 2019 - Stefan Brüns <stefan.bruens@rwth-aachen.de>

View File

@ -1,7 +1,7 @@
#
# spec file for package gtk-doc
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2019 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -16,36 +16,61 @@
#
Name: gtk-doc
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "doc"
%bcond_without doc
%define psuffix -manual
%else
%bcond_with doc
%endif
Name: gtk-doc%{?psuffix}
Version: 1.32
Release: 0
%if "%{flavor}" == ""
Summary: GTK+ Documentation Generator
License: GPL-2.0-or-later
Group: Productivity/Publishing/SGML
%else
Summary: Manual for Gtkdoc
License: GFDL-1.1-or-later
Group: Documentation/HTML
%endif
URL: http://www.gtk.org/gtk-doc/
# When updating this package, please don't forget to update the gtk-doc.m4 Source in glib2.
Source0: https://download.gnome.org/sources/gtk-doc/1.32/%{name}-%{version}.tar.xz
Source0: https://download.gnome.org/sources/gtk-doc/1.32/gtk-doc-%{version}.tar.xz
BuildRequires: docbook-xsl-stylesheets
BuildRequires: libtool
BuildRequires: libxml2-tools
BuildRequires: pkgconfig
BuildRequires: python3-base
BuildRequires: python3-pygments
BuildRequires: sgml-skel
BuildRequires: xsltproc
%if %{with doc}
BuildRequires: fdupes
BuildRequires: yelp-tools
# gtk-doc-manual was split from the main package
Provides: gtk-doc:%{_datadir}/help/C/gtk-doc-manual/index.docbook
Conflicts: gtk-doc < %{version}-%{release}
Conflicts: gtk-doc-lang < %{version}-%{release}
Recommends: gtk-doc-manual-lang
%else
BuildRequires: python3-pygments
BuildRequires: xsltproc
Requires: docbook-xsl-stylesheets
Requires: docbook_4
Requires: glib2-devel
Requires: libxml2-tools
Requires: python3-pygments
Requires: xsltproc
Recommends: %{name}-lang
Recommends: gtk-doc-manual
# Old for <= 10.2 & CODE10
Provides: gtkdoc = %{version}
Obsoletes: gtkdoc
%endif
BuildArch: noarch
%if "%{flavor}" == ""
%description
Gtkdoc is a set of Python scripts that generates API reference
documentation in e.g DocBook, HTML or PDF format. It can extract
@ -53,6 +78,11 @@ documentation from source code comments in a manner similar to
Java-doc. It is used to generate the documentation for GLib,
Gtk+, and GNOME.
%else
%description
User manual for Gtkdoc
%endif
%package mkpdf
Summary: Gtkdoc PDF Generator
Supplements: packageand(gtk-doc:dblatex)
@ -62,25 +92,33 @@ Requires: dblatex
%description mkpdf
PDF generator for Gtkdoc.
%lang_package
%lang_package -n gtk-doc-manual
%prep
%autosetup -p1
%autosetup -p1 -n gtk-doc-%{version}
%build
autoreconf
%configure PYTHON=%{_bindir}/python3 \
DBLATEX=%{_bindir}/dblatex
make %{?_smp_mflags}
%install
%if "%{flavor}" == ""
%make_install
mkdir -p %{buildroot}%{_datadir}/gtk-doc/html
mv -v doc/README doc/doc.README
%find_lang %{name}-manual %{?no_lang_C}
%endif
%if %{with doc}
%make_install -C help
%fdupes %{buildroot}%{_datadir}/help/[a-z]*
%find_lang gtk-doc-manual %{?no_lang_C}
%endif
%if "%{flavor}" == ""
%files
%license COPYING COPYING-DOCS
%doc AUTHORS NEWS README TODO doc/*
%license COPYING
%doc AUTHORS NEWS README TODO
%{_bindir}/gtkdoc-*
%{_bindir}/gtkdocize
%exclude %{_bindir}/gtkdoc-mkpdf
@ -89,7 +127,6 @@ mv -v doc/README doc/doc.README
%{_datadir}/gtk-doc/
%exclude %{_datadir}/gtk-doc/python/gtkdoc/mkpdf*
%{_datadir}/pkgconfig/gtk-doc.pc
%doc %{_datadir}/help/C/gtk-doc-manual/
%dir %{_datadir}/cmake
%dir %{_datadir}/cmake/GtkDoc
%{_datadir}/cmake/GtkDoc/GtkDocConfig.cmake
@ -99,7 +136,14 @@ mv -v doc/README doc/doc.README
%files mkpdf
%{_bindir}/gtkdoc-mkpdf
%{_datadir}/gtk-doc/python/gtkdoc/mkpdf*
%endif
%files lang -f %{name}-manual.lang
%if %{with doc}
%files -n gtk-doc-manual
%license COPYING-DOCS
%doc %{_datadir}/help/C/gtk-doc-manual
%files -n gtk-doc-manual-lang -f gtk-doc-manual.lang
%endif
%changelog