Blame mod_auth_openidc.spec

4a40cff
%{!?_httpd_mmn: %{expand: %%global _httpd_mmn %%(cat %{_includedir}/httpd/.mmn || echo 0-0)}}
116723e
%{!?_httpd_moddir: %{expand: %%global _httpd_moddir %%{_libdir}/httpd/modules}}
116723e
%{!?_httpd_confdir: %{expand: %%global _httpd_confdir %{_sysconfdir}/httpd/conf.d}}
4a40cff
8f2cd88
# Optionally build with hiredis if --with hiredis is passed
8f2cd88
%{!?_with_hiredis: %{!?_without_hiredis: %global _without_hiredis --without-hiredis}}
8f2cd88
# It is an error if both or neither required options exist.
8f2cd88
%{?_with_hiredis: %{?_without_hiredis: %{error: both _with_hiredis and _without_hiredis}}}
8f2cd88
%{!?_with_hiredis: %{!?_without_hiredis: %{error: neither _with_hiredis nor _without_hiredis}}}
8f2cd88
4a40cff
# /etc/httpd/conf.d with httpd < 2.4 and defined as /etc/httpd/conf.modules.d with httpd >= 2.4
4a40cff
%{!?_httpd_modconfdir: %{expand: %%global _httpd_modconfdir %%{_sysconfdir}/httpd/conf.d}}
4a40cff
116723e
%global httpd_pkg_cache_dir /var/cache/httpd/mod_auth_openidc
116723e
e8ecf18
Name:		mod_auth_openidc
ccf3035
Version:	1.8.8
8f2cd88
Release:	3%{?dist}
e8ecf18
Summary:	OpenID Connect auth module for Apache HTTP Server
e8ecf18
e8ecf18
Group:		System Environment/Daemons
e8ecf18
License:	ASL 2.0
e8ecf18
URL:		https://github.com/pingidentity/mod_auth_openidc
e8ecf18
Source0:	https://github.com/pingidentity/mod_auth_openidc/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
e8ecf18
e8ecf18
BuildRequires:	httpd-devel
e8ecf18
BuildRequires:	openssl-devel
e8ecf18
BuildRequires:	curl-devel
e8ecf18
BuildRequires:	jansson-devel
e8ecf18
BuildRequires:	hiredis-devel
e8ecf18
BuildRequires:	pcre-devel
e8ecf18
BuildRequires:	autoconf
e8ecf18
BuildRequires:	automake
8f2cd88
%{?_with_hiresdis:BuildRequires: hiresdis-devel}
e8ecf18
Requires:	httpd-mmn = %{_httpd_mmn}
e8ecf18
e8ecf18
%description
e8ecf18
This module enables an Apache 2.x web server to operate as
e8ecf18
an OpenID Connect Relying Party and/or OAuth 2.0 Resource Server.
e8ecf18
e8ecf18
%prep
e8ecf18
%setup -q
e8ecf18
e8ecf18
%build
e8ecf18
# workaround rpm-buildroot-usage
e8ecf18
export APXS2_OPTS='-S LIBEXECDIR=${MODULES_DIR}'
e8ecf18
export MODULES_DIR=%{_httpd_moddir}
e8ecf18
autoreconf
8f2cd88
%configure \
8f2cd88
  %{?_with_hiredis} \
8f2cd88
  %{?_without_hiredis}
8f2cd88
e8ecf18
make %{?_smp_mflags}
e8ecf18
e8ecf18
%install
e8ecf18
mkdir -p $RPM_BUILD_ROOT%{_httpd_moddir}
e8ecf18
make install MODULES_DIR=$RPM_BUILD_ROOT%{_httpd_moddir}
e8ecf18
e8ecf18
install -m 755 -d $RPM_BUILD_ROOT%{_httpd_modconfdir}
e8ecf18
echo 'LoadModule auth_openidc_module modules/mod_auth_openidc.so' > \
e8ecf18
	$RPM_BUILD_ROOT%{_httpd_modconfdir}/10-auth_openidc.conf
e8ecf18
116723e
install -m 755 -d $RPM_BUILD_ROOT%{_httpd_confdir}
116723e
install -m 644 auth_openidc.conf $RPM_BUILD_ROOT%{_httpd_confdir}
116723e
# Adjust httpd cache location in install config file
116723e
sed -i 's!/var/cache/apache2/!/var/cache/httpd/!' $RPM_BUILD_ROOT%{_httpd_confdir}/auth_openidc.conf
116723e
install -m 700 -d $RPM_BUILD_ROOT%{httpd_pkg_cache_dir}
116723e
install -m 700 -d $RPM_BUILD_ROOT%{httpd_pkg_cache_dir}/metadata
116723e
install -m 700 -d $RPM_BUILD_ROOT%{httpd_pkg_cache_dir}/cache
116723e
116723e
e8ecf18
%files
4a40cff
%if 0%{?rhel} && 0%{?rhel} < 7
4a40cff
%doc LICENSE.txt
4a40cff
%else
e8ecf18
%license LICENSE.txt
4a40cff
%endif
e8ecf18
%doc ChangeLog
116723e
%doc AUTHORS
116723e
%doc DISCLAIMER
116723e
%doc README.md
e8ecf18
%{_httpd_moddir}/mod_auth_openidc.so
e8ecf18
%config(noreplace) %{_httpd_modconfdir}/10-auth_openidc.conf
116723e
%config(noreplace) %{_httpd_confdir}/auth_openidc.conf
116723e
%dir %attr(0700, apache, apache) %{httpd_pkg_cache_dir}
116723e
%dir %attr(0700, apache, apache) %{httpd_pkg_cache_dir}/metadata
116723e
%dir %attr(0700, apache, apache) %{httpd_pkg_cache_dir}/cache
e8ecf18
e8ecf18
%changelog
b59c6f3
* Mon Mar 21 2016 John Dennis <jdennis@redhat.com> - 1.8.8-2
b59c6f3
- Add missing unpackaged files/directories
b59c6f3
b59c6f3
  Add to doc: README.md, DISCLAIMER, AUTHORS
b59c6f3
  Add to httpd/conf.d: auth_openidc.conf
b59c6f3
  Add to /var/cache: /var/cache/httpd/mod_auth_openidc/cache
b59c6f3
                     /var/cache/httpd/mod_auth_openidc/metadata
b59c6f3
ccf3035
* Thu Mar 10 2016 Jan Pazdziora <jpazdziora@redhat.com> 1.8.8-1
ccf3035
- Update to 1.8.8 (#1316528)
ccf3035
0db7a61
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.7-2
0db7a61
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
0db7a61
ab63949
* Sat Jan 09 2016 Fedora Release Monitoring <release-monitoring@fedoraproject.org> - 1.8.7-1
ab63949
- Update to 1.8.7 (#1297080)
ab63949
e8ecf18
* Sat Nov 07 2015 Jan Pazdziora <jpazdziora@redhat.com> 1.8.6-1
e8ecf18
- Initial packaging for Fedora 23.