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> 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 # 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 # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # 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 Version: 1.32
Release: 0 Release: 0
%if "%{flavor}" == ""
Summary: GTK+ Documentation Generator Summary: GTK+ Documentation Generator
License: GPL-2.0-or-later License: GPL-2.0-or-later
Group: Productivity/Publishing/SGML 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/ URL: http://www.gtk.org/gtk-doc/
# When updating this package, please don't forget to update the gtk-doc.m4 Source in glib2. # 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: docbook-xsl-stylesheets
BuildRequires: libtool BuildRequires: libtool
BuildRequires: libxml2-tools BuildRequires: libxml2-tools
BuildRequires: pkgconfig BuildRequires: pkgconfig
BuildRequires: python3-base BuildRequires: python3-base
BuildRequires: python3-pygments
BuildRequires: sgml-skel BuildRequires: sgml-skel
BuildRequires: xsltproc %if %{with doc}
BuildRequires: fdupes
BuildRequires: yelp-tools 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-xsl-stylesheets
Requires: docbook_4 Requires: docbook_4
Requires: glib2-devel Requires: glib2-devel
Requires: libxml2-tools Requires: libxml2-tools
Requires: python3-pygments Requires: python3-pygments
Requires: xsltproc Requires: xsltproc
Recommends: %{name}-lang Recommends: gtk-doc-manual
# Old for <= 10.2 & CODE10 # Old for <= 10.2 & CODE10
Provides: gtkdoc = %{version} Provides: gtkdoc = %{version}
Obsoletes: gtkdoc Obsoletes: gtkdoc
%endif
BuildArch: noarch
%if "%{flavor}" == ""
%description %description
Gtkdoc is a set of Python scripts that generates API reference Gtkdoc is a set of Python scripts that generates API reference
documentation in e.g DocBook, HTML or PDF format. It can extract 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, Java-doc. It is used to generate the documentation for GLib,
Gtk+, and GNOME. Gtk+, and GNOME.
%else
%description
User manual for Gtkdoc
%endif
%package mkpdf %package mkpdf
Summary: Gtkdoc PDF Generator Summary: Gtkdoc PDF Generator
Supplements: packageand(gtk-doc:dblatex) Supplements: packageand(gtk-doc:dblatex)
@ -62,25 +92,33 @@ Requires: dblatex
%description mkpdf %description mkpdf
PDF generator for Gtkdoc. PDF generator for Gtkdoc.
%lang_package %lang_package -n gtk-doc-manual
%prep %prep
%autosetup -p1 %autosetup -p1 -n gtk-doc-%{version}
%build %build
autoreconf
%configure PYTHON=%{_bindir}/python3 \ %configure PYTHON=%{_bindir}/python3 \
DBLATEX=%{_bindir}/dblatex DBLATEX=%{_bindir}/dblatex
make %{?_smp_mflags} make %{?_smp_mflags}
%install %install
%if "%{flavor}" == ""
%make_install %make_install
mkdir -p %{buildroot}%{_datadir}/gtk-doc/html mkdir -p %{buildroot}%{_datadir}/gtk-doc/html
mv -v doc/README doc/doc.README %endif
%find_lang %{name}-manual %{?no_lang_C}
%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 %files
%license COPYING COPYING-DOCS %license COPYING
%doc AUTHORS NEWS README TODO doc/* %doc AUTHORS NEWS README TODO
%{_bindir}/gtkdoc-* %{_bindir}/gtkdoc-*
%{_bindir}/gtkdocize %{_bindir}/gtkdocize
%exclude %{_bindir}/gtkdoc-mkpdf %exclude %{_bindir}/gtkdoc-mkpdf
@ -89,7 +127,6 @@ mv -v doc/README doc/doc.README
%{_datadir}/gtk-doc/ %{_datadir}/gtk-doc/
%exclude %{_datadir}/gtk-doc/python/gtkdoc/mkpdf* %exclude %{_datadir}/gtk-doc/python/gtkdoc/mkpdf*
%{_datadir}/pkgconfig/gtk-doc.pc %{_datadir}/pkgconfig/gtk-doc.pc
%doc %{_datadir}/help/C/gtk-doc-manual/
%dir %{_datadir}/cmake %dir %{_datadir}/cmake
%dir %{_datadir}/cmake/GtkDoc %dir %{_datadir}/cmake/GtkDoc
%{_datadir}/cmake/GtkDoc/GtkDocConfig.cmake %{_datadir}/cmake/GtkDoc/GtkDocConfig.cmake
@ -99,7 +136,14 @@ mv -v doc/README doc/doc.README
%files mkpdf %files mkpdf
%{_bindir}/gtkdoc-mkpdf %{_bindir}/gtkdoc-mkpdf
%{_datadir}/gtk-doc/python/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 %changelog