diff options
-rw-r--r-- | cgit.spec | 27 |
1 files changed, 12 insertions, 15 deletions
@@ -10,13 +10,11 @@ # the *.py files in cgit are not importable python modules %global _python_bytecompile_extra 0 -%global syntax_highlight 1 - -# Temporarily -- in epel-7-ppc64 is not highlight package currently, #1117261 -%if 0%{?rhel} == 7 -%ifarch ppc64 -%global syntax_highlight 0 -%endif +# The highlight package is not available in epel-7-ppc64 +%if 0%{?rhel} == 7 && %{_arch} == ppc64 +%bcond_with highlight +%else +%bcond_without highlight %endif Name: cgit @@ -32,12 +30,13 @@ Source1: https://www.kernel.org/pub/software/scm/git//git-%{gitver}.tar.x Source2: cgitrc Source3: README.SELinux +# All supported releases use highlight version 3. +Patch0: cgit-0.9.1-highlightv3.patch + # Security guys might try to repoquery for this. Provides: bundled(git) = %gitver -%if %{syntax_highlight} -# All supported releases use highlight version 3. -Patch1: cgit-0.9.1-highlightv3.patch +%if %{with highlight} BuildRequires: highlight %endif @@ -64,9 +63,7 @@ Cgit is a fast web interface for git. It uses caching to increase performance. %prep %setup -q -a 1 -%if %{syntax_highlight} -%patch1 -p1 -%endif +%patch0 -p1 # setup the git dir rm -rf git @@ -125,8 +122,7 @@ EOF # Something in the a2x chain doesn't like running in parallel. :/ make -j1 doc-man doc-html -%if %{syntax_highlight} -# el5 highlight doesn't know --print-style +%if %{with highlight} highlight --print-style --style-outfile=stdout >> cgit.css %endif @@ -163,6 +159,7 @@ install -d -m0755 %{buildroot}%{cachedir} %changelog * Fri Jun 15 2018 Todd Zullinger <tmz@pobox.com> - 1.1-11 - disable automatic compilation of *.py files outside of python sitelib +- use %%bcond_(with|without) to toggle highlight * Mon Jun 04 2018 Todd Zullinger <tmz@pobox.com> - make config: drop redundant DESTDIR/INSTALL, add COPYTREE |