Make building with redis support optional (defaults to without)
Required package hiredis is currently orphaned in Fedora and it's not available in RHEL. But if you want to build with it just pass --with hiredis when building the RPM.
This commit is contained in:
parent
b59c6f3dca
commit
8f2cd88d33
@ -2,6 +2,12 @@
|
||||
%{!?_httpd_moddir: %{expand: %%global _httpd_moddir %%{_libdir}/httpd/modules}}
|
||||
%{!?_httpd_confdir: %{expand: %%global _httpd_confdir %{_sysconfdir}/httpd/conf.d}}
|
||||
|
||||
# Optionally build with hiredis if --with hiredis is passed
|
||||
%{!?_with_hiredis: %{!?_without_hiredis: %global _without_hiredis --without-hiredis}}
|
||||
# It is an error if both or neither required options exist.
|
||||
%{?_with_hiredis: %{?_without_hiredis: %{error: both _with_hiredis and _without_hiredis}}}
|
||||
%{!?_with_hiredis: %{!?_without_hiredis: %{error: neither _with_hiredis nor _without_hiredis}}}
|
||||
|
||||
# /etc/httpd/conf.d with httpd < 2.4 and defined as /etc/httpd/conf.modules.d with httpd >= 2.4
|
||||
%{!?_httpd_modconfdir: %{expand: %%global _httpd_modconfdir %%{_sysconfdir}/httpd/conf.d}}
|
||||
|
||||
@ -9,7 +15,7 @@
|
||||
|
||||
Name: mod_auth_openidc
|
||||
Version: 1.8.8
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: OpenID Connect auth module for Apache HTTP Server
|
||||
|
||||
Group: System Environment/Daemons
|
||||
@ -25,6 +31,7 @@ BuildRequires: hiredis-devel
|
||||
BuildRequires: pcre-devel
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
%{?_with_hiresdis:BuildRequires: hiresdis-devel}
|
||||
Requires: httpd-mmn = %{_httpd_mmn}
|
||||
|
||||
%description
|
||||
@ -39,7 +46,10 @@ an OpenID Connect Relying Party and/or OAuth 2.0 Resource Server.
|
||||
export APXS2_OPTS='-S LIBEXECDIR=${MODULES_DIR}'
|
||||
export MODULES_DIR=%{_httpd_moddir}
|
||||
autoreconf
|
||||
%configure
|
||||
%configure \
|
||||
%{?_with_hiredis} \
|
||||
%{?_without_hiredis}
|
||||
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
|
Loading…
Reference in New Issue
Block a user