From 1a94c576117185b2003f2b8d58d7f61f98d57084 Mon Sep 17 00:00:00 2001 From: Todd Zullinger Date: Fri, 15 Jun 2018 23:34:57 -0400 Subject: 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. --- cgit.spec | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'cgit.spec') 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 - make config: drop redundant DESTDIR/INSTALL, add COPYTREE -- cgit