Move linkcheck macro to existing fedora/rhel > 7 block
The spec file is a bit easier to read with as few conditional blocks as required. Use %bcond_(with|without) to allow easier toggling of the link checking.
This commit is contained in:
parent
34c2440884
commit
da74a8e523
18
git.spec
18
git.spec
@ -20,10 +20,13 @@
|
|||||||
# Settings for Fedora and EL > 7
|
# Settings for Fedora and EL > 7
|
||||||
%if 0%{?fedora} || 0%{?rhel} > 7
|
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||||
%bcond_without python3
|
%bcond_without python3
|
||||||
|
# linkchcker is not available on EL <= 7
|
||||||
|
%bcond_without linkcheck
|
||||||
%global use_perl_generators 1
|
%global use_perl_generators 1
|
||||||
%global use_perl_interpreter 1
|
%global use_perl_interpreter 1
|
||||||
%else
|
%else
|
||||||
%bcond_with python3
|
%bcond_with python3
|
||||||
|
%bcond_with linkcheck
|
||||||
%global use_perl_generators 0
|
%global use_perl_generators 0
|
||||||
%global use_perl_interpreter 0
|
%global use_perl_interpreter 0
|
||||||
%endif
|
%endif
|
||||||
@ -75,13 +78,6 @@
|
|||||||
%global __global_ldflags -Wl,-z,relro -Wl,-z,now
|
%global __global_ldflags -Wl,-z,relro -Wl,-z,now
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Test links in HTML documentation on Fedora (linkchecker is not in EL <= 7)
|
|
||||||
%if 0%{?fedora} || 0%{?rhel} > 7
|
|
||||||
%global test_links 1
|
|
||||||
%else
|
|
||||||
%global test_links 0
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# Define for release candidates
|
# Define for release candidates
|
||||||
#global rcrev .rc0
|
#global rcrev .rc0
|
||||||
|
|
||||||
@ -128,7 +124,7 @@ Patch3: 0001-daemon.c-fix-condition-for-redirecting-stderr.patch
|
|||||||
%if %{with docs}
|
%if %{with docs}
|
||||||
BuildRequires: asciidoc >= 8.4.1
|
BuildRequires: asciidoc >= 8.4.1
|
||||||
BuildRequires: xmlto
|
BuildRequires: xmlto
|
||||||
%if %{test_links}
|
%if %{with linkcheck}
|
||||||
BuildRequires: linkchecker
|
BuildRequires: linkchecker
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
@ -692,7 +688,8 @@ find %{buildroot}%{_pkgdocdir}/{howto,technical} -type f \
|
|||||||
##### #DOC
|
##### #DOC
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%if %{with docs} && %{test_links}
|
%if %{with docs} && %{with linkcheck}
|
||||||
|
# Test links in HTML documentation
|
||||||
find %{buildroot}%{_pkgdocdir} -name "*.html" -print0 | xargs -r0 linkchecker
|
find %{buildroot}%{_pkgdocdir} -name "*.html" -print0 | xargs -r0 linkchecker
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -902,6 +899,9 @@ make test || ./print-failed-test-output
|
|||||||
%{?with_docs:%{_pkgdocdir}/git-svn.html}
|
%{?with_docs:%{_pkgdocdir}/git-svn.html}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Apr 16 2018 Todd Zullinger <tmz@pobox.com>
|
||||||
|
- Move linkcheck macro to existing fedora/rhel > 7 block
|
||||||
|
|
||||||
* Fri Apr 13 2018 Pavel Cahyna <pcahyna@redhat.com>
|
* Fri Apr 13 2018 Pavel Cahyna <pcahyna@redhat.com>
|
||||||
- Use BuildRequires: perl-interpreter per the packaging guidelines
|
- Use BuildRequires: perl-interpreter per the packaging guidelines
|
||||||
- Update conditions for future RHEL
|
- Update conditions for future RHEL
|
||||||
|
Loading…
Reference in New Issue
Block a user