forked from pool/python-Sphinx
Accepting request 683921 from home:mcepl:branches:devel:languages:python
- Revert to multiple lang files using standard macros. OBS-URL: https://build.opensuse.org/request/show/683921 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Sphinx?expand=0&rev=119
This commit is contained in:
parent
085a5e4a37
commit
c497579697
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 11 15:32:54 CET 2019 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Revert to multiple lang files using standard macros.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 11 10:25:50 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
|
@ -99,18 +99,20 @@ supported.
|
||||
Sphinx uses reStructuredText as its markup language. Sphinx draws from
|
||||
the parsing and translating suite, the Docutils.
|
||||
|
||||
%package -n python-Sphinx-lang
|
||||
Summary: Translations for package python-Sphinx
|
||||
%package lang
|
||||
Summary: Translations for package %{name}
|
||||
Group: System/Localization
|
||||
Requires: python-Sphinx = %{version}
|
||||
Requires: %{name} = %{version}
|
||||
Provides: %{name}-lang-all = %{version}
|
||||
Supplements: %{name}
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n python-Sphinx-lang
|
||||
Provides translations for the "python-Sphinx" package.
|
||||
%description lang
|
||||
Provides translations for the "%{name}" package.
|
||||
|
||||
%package latex
|
||||
Summary: Sphinx packages for LaTeX
|
||||
Group: Productivity/Publishing/TeX/Base
|
||||
BuildRequires: %{python_module base}
|
||||
Requires: python-Sphinx = %{version}
|
||||
Requires: texlive-gnu-freefont
|
||||
Requires: texlive-latex
|
||||
@ -262,13 +264,8 @@ mv build/sphinx/{html,man} build.doc/
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
# Prepare lang lists
|
||||
mkdir -p %{buildroot}%{_datadir}/locale/
|
||||
rm -rf %{buildroot}%{python2_sitelib}/sphinx/locale/*
|
||||
ls %{buildroot}%{python3_sitelib}/sphinx/locale
|
||||
find %{buildroot}%{python3_sitelib}/sphinx/locale -type f -a \( -name \*.p\* -o -name \*.js \) -print -delete
|
||||
mv -fvt %{buildroot}%{_datadir}/locale/ %{buildroot}%{python3_sitelib}/sphinx/locale/*
|
||||
rm -rf %{buildroot}%{python3_sitelib}/sphinx/locale
|
||||
%find_lang sphinx
|
||||
%python_expand grep -F "%{$python_sitelib}" sphinx.lang > sphinx_%{$python_bin_suffix}.lang
|
||||
|
||||
%else
|
||||
mkdir -p %{buildroot}%{_docdir}/python-Sphinx/
|
||||
@ -287,6 +284,9 @@ mv build.doc/man/sphinx-quickstart.1 %{buildroot}%{_mandir}/man1/sphinx-quicksta
|
||||
|
||||
%endif
|
||||
|
||||
# Always deduplicate
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%if ! %{with test}
|
||||
%post
|
||||
%{python_install_alternative sphinx-apidoc sphinx-autogen sphinx-build sphinx-quickstart}
|
||||
@ -313,13 +313,20 @@ py.test-%{$python_bin_suffix} --ignore=_build.python3 --ignore=_build.python2 -k
|
||||
%python_alternative %{_bindir}/sphinx-build
|
||||
%python_alternative %{_bindir}/sphinx-quickstart
|
||||
%{python_sitelib}/sphinx/
|
||||
%exclude %{python_sitelib}/sphinx/locale
|
||||
%if %{with latex}
|
||||
%exclude %{python_sitelib}/sphinx/texinputs/
|
||||
%endif
|
||||
%{python_sitelib}/Sphinx-%{version}-py*.egg-info
|
||||
%dir %{python_sitelib}/sphinxcontrib
|
||||
|
||||
%files -n python-Sphinx-lang -f sphinx.lang
|
||||
%files -n %{python2_prefix}-Sphinx-lang -f sphinx_%{python2_bin_suffix}.lang
|
||||
%license LICENSE
|
||||
%{python2_sitelib}/sphinx/locale
|
||||
|
||||
%files -n %{python3_prefix}-Sphinx-lang -f sphinx_%{python3_bin_suffix}.lang
|
||||
%license LICENSE
|
||||
%{python3_sitelib}/sphinx/locale
|
||||
|
||||
# Requirements are not available on SLES
|
||||
%if %{with latex}
|
||||
|
Loading…
x
Reference in New Issue
Block a user