Accepting request 974373 from home:coolo:branches:Publishing

- Add a subpackage that brings in the requirements for building pdf (too much
  for default, recommends won't help in building OBS packages)
- Adding multibuild flavor to verify the latex dependencies are complete
- Motivated by nut failing to build pdf in SP4

OBS-URL: https://build.opensuse.org/request/show/974373
OBS-URL: https://build.opensuse.org/package/show/Publishing/asciidoc?expand=0&rev=51
This commit is contained in:
Martin Pluskal 2022-05-03 11:39:09 +00:00 committed by Git OBS Bridge
parent 384a4562b4
commit 71eb414db5
3 changed files with 56 additions and 4 deletions

3
_multibuild Normal file
View File

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

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Mon May 2 09:31:19 UTC 2022 - Stephan Kulow <coolo@suse.com>
- Add a subpackage that brings in the requirements for building pdf (too much
for default, recommends won't help in building OBS packages)
- Adding multibuild flavor to verify the latex dependencies are complete
- Motivated by nut failing to build pdf in SP4
-------------------------------------------------------------------
Sat Apr 30 11:07:26 UTC 2022 - Ferdinand Thiessen <rpm@fthiessen.de>

View File

@ -1,5 +1,5 @@
#
# spec file for package asciidoc
# spec file
#
# Copyright (c) 2022 SUSE LLC
#
@ -16,7 +16,12 @@
#
Name: asciidoc
%define flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" != ""
%define name_suffix -%{flavor}
%endif
Name: asciidoc%{?name_suffix}
Version: 10.1.4
Release: 0
Summary: Text-Based Document Generation
@ -33,10 +38,13 @@ BuildRequires: python3-setuptools
BuildRequires: python3-xml
Requires: docbook-xsl-stylesheets
Requires: python3-xml
Recommends: dblatex
Recommends: %{name}-latex-backend
# a2x needs /usr/bin/xsltproc
Recommends: libxslt
BuildArch: noarch
%if "%{flavor}" == "latextest"
BuildRequires: asciidoc-latex-backend
%endif
%description
AsciiDoc is a text document format for writing short documents,
@ -49,11 +57,39 @@ Summary: Examples and Documents for asciidoc
%description examples
This package contains examples and documents of asciidoc.
%package latex-backend
Summary: Provide latex backend dependencies
Requires: %{name} = %{version}
Requires: dblatex
# some of them are actually required by dblatex, but it's easier to keep them all in here
Requires: texlive-metafont-bin
Requires: tex(8r.enc)
Requires: tex(fancybox.sty)
Requires: tex(mathrsfs.sty)
Requires: tex(pcrr8c.tfm)
Requires: tex(phvr8t.tfm)
Requires: tex(ptmr8t.tfm)
Requires: tex(ptmri7t.tfm)
Requires: tex(rsfs10.tfm)
Requires: tex(upquote.sty)
Requires: tex(zptmcm7v.tfm)
Requires: tex(zptmcm7y.tfm)
%description latex-backend
AsciiDoc can generate pdf from asciidoc format through dblatex. For that it needs quite some
latex dependencies that we don't want to have by default. So this package is optional.
%prep
%setup -q
%setup -q -n asciidoc-%{version}
# do not use env
find ./ -name \*.py -exec sed -i -e 's:/usr/bin/env\ :%{_bindir}/:g' {} \;
%if "%{flavor}" == "latextest"
%build
a2x --verbose --xsltproc-opts --nonet --attribute=badges --attribute=external_title -a toc -a numbered --attribute=pdf_format --format=pdf -a docinfo1 doc/a2x.1.txt
%else
%build
%python3_build
@ -83,4 +119,9 @@ python3 tests/testasciidoc.py run
%files examples
%doc doc
%files latex-backend
%license COPYRIGHT
%endif
%changelog