From e942c8d036312d9652181e99138f54a730116d4b Mon Sep 17 00:00:00 2001 From: Todd Zullinger Date: Tue, 25 Feb 2020 22:46:21 -0500 Subject: [PATCH] use Asciidoctor to build documentation when possible MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Asciidoctor project is more actively maintained than asciidoc. Use it for building the documentation on Fedora. Asciidoctor is not currently available for EL-6 or EL-8, though it is in EPEL for EL-7. Exclude all EL builds for now, until we can reliably use it on EL-7 and EL-8 (including CentOS-Stream, ideally). This is made possible by the excellent work of both the Git and Asciidoctor communities. Thanks in particular to brian m. carlson, Martin Ă…gren, Jeff King, and Dan Allen. --- git.spec | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/git.spec b/git.spec index f340701..02655e1 100644 --- a/git.spec +++ b/git.spec @@ -8,9 +8,11 @@ # Settings for Fedora %if 0%{?fedora} +%bcond_without asciidoctor # linkchecker is not available on EL %bcond_without linkcheck %else +%bcond_with asciidoctor %bcond_with linkcheck %endif @@ -83,7 +85,7 @@ Name: git Version: 2.25.1 -Release: 3%{?rcrev}%{?dist} +Release: 4%{?rcrev}%{?dist} Summary: Fast Version Control System License: GPLv2 URL: https://git-scm.com/ @@ -118,7 +120,13 @@ Patch0: git-cvsimport-Ignore-cvsps-2.2b1-Branches-output.patch %if %{with docs} # pod2man is needed to build Git.3pm BuildRequires: %{_bindir}/pod2man +%if %{with asciidoctor} +BuildRequires: docbook5-style-xsl +BuildRequires: rubygem-asciidoctor +%else BuildRequires: asciidoc >= 8.4.1 +%endif +# endif with asciidoctor BuildRequires: xmlto %if %{with linkcheck} BuildRequires: linkchecker @@ -526,6 +534,10 @@ PYTHON_PATH = %{__python2} NO_PYTHON = 1 %endif # endif with python2 +%if %{with asciidoctor} +USE_ASCIIDOCTOR = 1 +%endif +# endif with asciidoctor htmldir = %{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} prefix = %{_prefix} perllibdir = %{perl_vendorlib} @@ -1033,6 +1045,9 @@ rmdir --ignore-fail-on-non-empty "$testdir" %{?with_docs:%{_pkgdocdir}/git-svn.html} %changelog +* Wed Feb 26 2020 Todd Zullinger - 2.25.1-4 +- use Asciidoctor to build documentation when possible + * Sat Feb 22 2020 Todd Zullinger - 2.25.1-3 - work around issue on s390x with gcc10 (#1799408)