File mingw64-gnome-doc-utils.spec of Package mingw64-gnome-doc-utils
#
# spec file for package mingw64-gnome-doc-utils
#
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%_mingw64_package_header_debug
Name: mingw64-gnome-doc-utils
Version: 0.20.10
Release: 0
Summary: A Collection of Documentation Utilities for GNOME
License: GPL-2.0-or-later AND LGPL-2.1-or-later
# FIXME: use correct group or remove it, see "https://en.opensuse.org/openSUSE:Package_group_guidelines"
Group: Development/Libraries
URL: https://www.gnome.org
Source0: https://download.gnome.org/sources/gnome-doc-utils/0.20/gnome-doc-utils-%{version}.tar.xz
Patch0: gnome-doc-utils-0.20.10-python3.patch
BuildRequires: intltool
BuildRequires: libxslt
BuildRequires: mingw64-cross-binutils
BuildRequires: mingw64-cross-gcc
BuildRequires: mingw64-cross-pkg-config
BuildRequires: mingw64-filesystem >= 23
BuildRequires: mingw64-libxml2-devel
BuildRequires: mingw64-libxslt-devel
#!BuildIgnore: post-build-checks
Requires: %{name}-lang = %{version}
BuildArch: noarch
%if 0%{?suse_version} > 1210
BuildRequires: libxml2-tools
%endif
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150400
BuildRequires: python3
BuildRequires: python3-libxml2
%else
BuildRequires: libxml2-python
BuildRequires: python
%endif
%description
The gnome-doc-utils package is a collection of documentation utilities
for the GNOME project. Notably, it contains utilities for building
documentation and all auxiliary files in your source tree. It also
contains the DocBook XSLT stylesheets that were once distributed with
Yelp.
%package devel
Summary: A Collection of Documentation Utilities for GNOME
# FIXME: use correct group or remove it, see "https://en.opensuse.org/openSUSE:Package_group_guidelines"
Group: Development/Libraries
%description devel
The gnome-doc-utils package is a collection of documentation utilities
for the GNOME project. Notably, it contains utilities for building
documentation and all auxiliary files in your source tree. It also
contains the DocBook XSLT stylesheets that were once distributed with
Yelp.
%package -n mingw64-xml2po
Summary: Tool to extract translatable content from XML documents
# FIXME: use correct group or remove it, see "https://en.opensuse.org/openSUSE:Package_group_guidelines"
Group: Development/Libraries
%description -n mingw64-xml2po
xml2po is a simple Python program which extracts translatable
content from free-form XML documents and outputs gettext compatible
POT files.
%package -n mingw64-xml2po-devel
Summary: Tool to extract translatable content from XML documents
# FIXME: use correct group or remove it, see "https://en.opensuse.org/openSUSE:Package_group_guidelines"
Group: Development/Libraries
%description -n mingw64-xml2po-devel
xml2po is a simple Python program which extracts translatable
content from free-form XML documents and outputs gettext compatible
POT files.
%lang_package
%prep
%setup -q -n gnome-doc-utils-%{version}
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150400
%patch -P 0 -p1
%endif
%build
echo "am_cv_python_version=2.6" >> %{_mingw64_cache}
echo "am_cv_python_platform=win32" >> %{_mingw64_cache}
echo "am_cv_python_pyexecdir='%{_mingw64_libdir}/python2.6/site-packages'" >> %{_mingw64_cache}
echo "am_cv_python_pythondir='%{_mingw64_libdir}/python2.6/site-packages'" >> %{_mingw64_cache}
%_mingw64_configure \
--disable-scrollkeeper --enable-build-utils
%{_mingw64_make} %{?_smp_mflags} || %{_mingw64_make}
%install
%{_mingw64_make} DESTDIR=%{buildroot} install
rm -f %{buildroot}%{_mingw64_libdir}/python*/site-packages/xml2po/*.pyc
rm -f %{buildroot}%{_mingw64_libdir}/python*/site-packages/xml2po/*.pyo
rm -f %{buildroot}%{_mingw64_libdir}/python*/site-packages/xml2po/modes/*.pyc
rm -f %{buildroot}%{_mingw64_libdir}/python*/site-packages/xml2po/modes/*.pyo
%find_lang gnome-doc-utils
%files
%{_mingw64_bindir}/gnome-doc-tool
%{_mingw64_datadir}/xml/mallard/1.0/mallard.rnc
%{_mingw64_datadir}/xml/mallard/1.0/mallard.rng
%{_mingw64_datadir}/xml/gnome/xslt/common
%{_mingw64_datadir}/xml/gnome/xslt/docbook/common
%{_mingw64_datadir}/xml/gnome/xslt/docbook/html
%{_mingw64_datadir}/xml/gnome/xslt/docbook/omf
%{_mingw64_datadir}/xml/gnome/xslt/docbook/utils
%{_mingw64_datadir}/xml/gnome/xslt/gettext
%{_mingw64_datadir}/xml/gnome/xslt/mallard
%{_mingw64_datadir}/gnome/help/gnome-doc-make/*/*.xml
%{_mingw64_datadir}/gnome/help/gnome-doc-xslt/*/*.xml
%files devel
%{_mingw64_bindir}/gnome-doc-prepare
%{_mingw64_datadir}/aclocal/gnome-doc-utils.m4
%{_mingw64_datadir}/gnome-doc-utils/gnome-doc-utils.make
%{_mingw64_datadir}/gnome-doc-utils/icons
%{_mingw64_datadir}/gnome-doc-utils/template-document.xml
%{_mingw64_datadir}/gnome-doc-utils/template.make
%{_mingw64_datadir}/gnome-doc-utils/template.omf.in
%{_mingw64_datadir}/gnome-doc-utils/templates/*.xml
%{_mingw64_datadir}/gnome-doc-utils/watermarks/*.png
%{_mingw64_datadir}/pkgconfig/gnome-doc-utils.pc
%files -n mingw64-xml2po
%{_mingw64_bindir}/xml2po
%{_mingw64_libdir}/python*/site-packages/xml2po
%{_mingw64_mandir}/man1/xml2po.1*
%files -n mingw64-xml2po-devel
%{_mingw64_datadir}/pkgconfig/xml2po.pc
%files lang -f gnome-doc-utils.lang
%changelog