summaryrefslogtreecommitdiffstats
path: root/cgit.spec
diff options
context:
space:
mode:
Diffstat (limited to 'cgit.spec')
-rw-r--r--cgit.spec28
1 files changed, 23 insertions, 5 deletions
diff --git a/cgit.spec b/cgit.spec
index a1c5482..e6bf832 100644
--- a/cgit.spec
+++ b/cgit.spec
@@ -6,6 +6,20 @@
%global scriptdir %{_localstatedir}/www/cgi-bin
%global cgitdata %{_datadir}/%{name}
+%global syntax_highlight 1
+
+%if 0%{?rhel} && 0%{?rhel} <= 5
+# On el5, manual actions are needed to make syntax highlighting work
+%global syntax_highlight 0
+%endif
+
+# Temporarily -- in epel-7-ppc64 is not highlight package currently, #1117261
+%if 0%{?rhel} == 7
+%ifarch ppc64
+%global syntax_highlight 0
+%endif
+%endif
+
%global make_cgit \
export CFLAGS="%{optflags}" \
export LDFLAGS="%{?__global_ldflags}" \
@@ -22,7 +36,7 @@ make V=1 %{?_smp_mflags} \\\
Name: cgit
Version: 0.10.2
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: A fast web interface for git
Group: Development/Tools
@@ -32,8 +46,9 @@ Source0: http://git.zx2c4.com/cgit/snapshot/%{name}-%{version}.tar.xz
Source1: http://www.kernel.org/pub/software/scm/git//git-%{gitver}.tar.xz
Source2: cgitrc
Source3: README.SELinux
-# On all but RHEL5 highlight is version 3.
-%if 0%{?fedora} || 0%{?rhel} >= 6
+
+%if %{syntax_highlight}
+# On all but RHEL5 highlight is version 3.
Patch1: cgit-0.9.1-highlightv3.patch
BuildRequires: highlight
%endif
@@ -58,7 +73,7 @@ Cgit is a fast web interface for git. It uses caching to increase performance.
%prep
%setup -q -a 1
-%if 0%{?fedora} || 0%{?rhel} >= 6
+%if %{syntax_highlight}
%patch1 -p1
%endif
@@ -103,7 +118,7 @@ EOF
# Something in the a2x chain doesn't like running in parallel. :/
%{make_cgit} -j1 doc-man doc-html
-%if 0%{?fedora} || 0%{?rhel} >= 6
+%if %{syntax_highlight}
# el5 highlight doesn't know --print-style
highlight --print-style --style-outfile=stdout >> cgit.css
%endif
@@ -135,6 +150,9 @@ rm -rf %{buildroot}
%changelog
+* Tue Jul 08 2014 Pavel Raiskup <praiskup@redhat.com> - 0.10.2-3
+- currently epel-7-ppc64 does not have highlight package (#1117261)
+
* Tue Jul 08 2014 Pavel Raiskup <praiskup@redhat.com> - 0.10.2-2
- install README.SELinux documentation again (#1036123)
- generate cgit.conf for httpd >= 2.4 when needed