summaryrefslogtreecommitdiffstats
path: root/cgit.spec
diff options
context:
space:
mode:
authorTodd Zullinger <tmz@pobox.com>2018-06-15 23:34:57 -0400
committerTodd Zullinger <tmz@pobox.com>2018-06-16 22:36:06 -0400
commit1a94c576117185b2003f2b8d58d7f61f98d57084 (patch)
tree273ce4df925f682ba3af0e52be3e040fcaa8ef45 /cgit.spec
parent9eedf28d2469ff79b713988f2d242a8a1a5a1282 (diff)
downloadcgit_EL6-1a94c576117185b2003f2b8d58d7f61f98d57084.tar.gz
use %bcond_(with|without) to handle httpd-filesystem
Centralize the various conditionals needed to support systems which lack an httpd-filesystem package. Add support for RHEL > 7.
Diffstat (limited to 'cgit.spec')
-rw-r--r--cgit.spec17
1 files changed, 12 insertions, 5 deletions
diff --git a/cgit.spec b/cgit.spec
index cb4068e..8efdcfe 100644
--- a/cgit.spec
+++ b/cgit.spec
@@ -17,6 +17,13 @@
%bcond_without highlight
%endif
+# Older epel lacks httpd-filesystem
+%if 0%{?fedora} || 0%{?rhel} > 7
+%bcond_without httpd_filesystem
+%else
+%bcond_with httpd_filesystem
+%endif
+
Name: cgit
Version: 1.1
Release: 11%{?dist}
@@ -52,8 +59,8 @@ BuildRequires: openssl-devel
BuildRequires: lua-devel
BuildRequires: make
-%if 0%{?fedora}
-# just to be able to install httpd configuration correctly, FC21+
+%if %{with httpd_filesystem}
+# httpd-filesystem provides the basic apache directory layout
Requires: httpd-filesystem
%endif
Requires: webserver
@@ -130,9 +137,8 @@ install -d -m0755 %{buildroot}%{cachedir}
%defattr(-,root,root,-)
%doc COPYING README* *.html
%config(noreplace) %{_sysconfdir}/cgitrc
-%if 0%{?rhel} && 0%{?rhel} <= 7
-# Keep those two httpd-owned directories listed here until httpd-filesystem
-# becomes part of EPEL. See rhbz#1138599 for more details.
+%if ! %{with httpd_filesystem}
+# own httpd config dirs on systems without httpd-filesystem
%dir %{_sysconfdir}/httpd
%dir %{_sysconfdir}/httpd/conf.d
%endif
@@ -154,6 +160,7 @@ install -d -m0755 %{buildroot}%{cachedir}
- drop crufty curl-devel conditional
- fix parallel make issues in docs
- simplify README.SELinux install
+- use %%bcond_(with|without) to handle httpd-filesystem
* Mon Jun 04 2018 Todd Zullinger <tmz@pobox.com>
- make config: drop redundant DESTDIR/INSTALL, add COPYTREE