Files
rpms/centos/SPECS/mod_auth_openidc.spec

155 lines
4.8 KiB
RPMSpec
Raw Normal View History

2020-09-05 14:27:35 +02:00
%{!?_httpd_mmn: %{expand: %%global _httpd_mmn %%(cat %{_includedir}/httpd/.mmn || echo 0-0)}}
%{!?_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}}
%global httpd_pkg_cache_dir /var/cache/httpd/mod_auth_openidc
Name: mod_auth_openidc
2023-05-28 08:29:39 +02:00
Version: 2.4.14.1
2022-04-08 09:37:59 +02:00
Release: 1%{?dist}
2020-09-05 14:27:35 +02:00
Summary: OpenID Connect auth module for Apache HTTP Server
License: ASL 2.0
URL: https://github.com/zmartzone/mod_auth_openidc
Source0: https://github.com/zmartzone/mod_auth_openidc/releases/download/v%{version}/mod_auth_openidc-%{version}.tar.gz
BuildRequires: gcc
BuildRequires: httpd-devel
BuildRequires: openssl-devel
BuildRequires: curl-devel
BuildRequires: jansson-devel
BuildRequires: pcre-devel
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: cjose-devel
2023-05-19 12:32:37 +02:00
#BuildRequires: jq-devel
2020-09-05 14:27:35 +02:00
BuildRequires: jq
%{?_with_hiredis:BuildRequires: hiredis-devel}
Requires: httpd-mmn = %{_httpd_mmn}
%description
This module enables an Apache 2.x web server to operate as
an OpenID Connect Relying Party and/or OAuth 2.0 Resource Server.
%prep
%setup -q
2021-12-27 13:05:52 +01:00
# switch installation methods, the one we need is commented
sed -i -e '72d;73{s/^.//;s/@/$(DESTDIR)@/}' Makefile.am
2020-09-05 14:27:35 +02:00
%build
2021-12-27 13:05:52 +01:00
./autogen.sh
2020-09-05 14:27:35 +02:00
%configure \
2021-12-27 13:05:52 +01:00
--with-apxs=%{_bindir}/apxs \
2022-03-29 13:05:47 +02:00
--with-jq=%{_libdir} \
2020-09-05 14:27:35 +02:00
%{?_with_hiredis} \
%{?_without_hiredis}
make %{?_smp_mflags}
%check
make test
%install
mkdir -p $RPM_BUILD_ROOT%{_httpd_moddir}
2022-02-18 11:10:42 +01:00
./install-sh .libs/%{name}.so $RPM_BUILD_ROOT%{_httpd_moddir}/%{name}.so
2020-09-05 14:27:35 +02:00
install -m 755 -d $RPM_BUILD_ROOT%{_httpd_modconfdir}
echo 'LoadModule auth_openidc_module modules/mod_auth_openidc.so' > \
$RPM_BUILD_ROOT%{_httpd_modconfdir}/10-auth_openidc.conf
install -m 755 -d $RPM_BUILD_ROOT%{_httpd_confdir}
install -m 644 auth_openidc.conf $RPM_BUILD_ROOT%{_httpd_confdir}
# Adjust httpd cache location in install config file
sed -i 's!/var/cache/apache2/!/var/cache/httpd/!' $RPM_BUILD_ROOT%{_httpd_confdir}/auth_openidc.conf
install -m 700 -d $RPM_BUILD_ROOT%{httpd_pkg_cache_dir}
install -m 700 -d $RPM_BUILD_ROOT%{httpd_pkg_cache_dir}/metadata
install -m 700 -d $RPM_BUILD_ROOT%{httpd_pkg_cache_dir}/cache
%files
%if 0%{?rhel} && 0%{?rhel} < 7
%doc LICENSE.txt
%else
%license LICENSE.txt
%endif
%doc ChangeLog
%doc AUTHORS
%doc README.md
%{_httpd_moddir}/mod_auth_openidc.so
%config(noreplace) %{_httpd_modconfdir}/10-auth_openidc.conf
%config(noreplace) %{_httpd_confdir}/auth_openidc.conf
%dir %attr(0700, apache, apache) %{httpd_pkg_cache_dir}
%dir %attr(0700, apache, apache) %{httpd_pkg_cache_dir}/metadata
%dir %attr(0700, apache, apache) %{httpd_pkg_cache_dir}/cache
%changelog
2023-05-28 08:29:39 +02:00
* Sun May 28 2023 Daniel Steiner <daniel.steiner@dsteiner.ch>
- Update to 2.4.14.1.
2023-05-19 12:32:37 +02:00
* Fri May 19 2023 Daniel Steiner <daniel.steiner@dsteiner.ch>
- Update to 2.4.14.
2023-03-21 14:58:19 +01:00
* Tue Mar 21 2023 Daniel Steiner <daniel.steiner@dsteiner.ch>
- Update to 2.4.13.1.
2022-12-12 07:01:19 +01:00
* Mon Dec 12 2022 Daniel Steiner <daniel.steiner@dsteiner.ch>
- Update to 2.4.12.1.
2022-10-19 18:14:52 +02:00
* Wed Oct 19 2022 Daniel Steiner <daniel.steiner@dsteiner.ch>
- Update to 2.4.12.
2022-09-11 10:05:52 +02:00
* Fri Aug 26 2022 Daniel Steiner <daniel.steiner@dsteiner.ch>
- Update to 2.4.11.3.
2022-04-08 09:37:59 +02:00
* Wed Mar 30 2022 Daniel Steiner <daniel.steiner@dsteiner.ch>
- Update to 2.4.11.1.
2022-03-29 13:05:47 +02:00
* Tue Mar 29 2022 Daniel Steiner <daniel.steiner@dsteiner.ch>
- libjq enabled.
2022-02-18 11:10:42 +01:00
* Fri Feb 18 2022 Daniel Steiner <daniel.steiner@dsteiner.ch>
- Update to 2.4.11
2021-12-27 13:05:52 +01:00
* Mon Dec 6 2021 Daniel Steiner <daniel.steiner@dsteiner.ch>
- Update to 2.4.10
* Tue Aug 31 2021 Daniel Steiner <daniel.steiner@dsteiner.ch>
- Update to 2.4.9.3.
2021-07-29 15:30:54 +02:00
* Thu Jul 29 2021 Daniel Steiner <daniel.steiner@dsteiner.ch>
- Update to 2.4.9.
2021-05-23 07:33:00 +02:00
* Sun May 23 2021 Daniel Steiner <daniel.steiner@dsteiner.ch>
- Update to 2.4.8.2.
2021-05-01 07:31:00 +02:00
* Wed Apr 28 2021 Daniel Steiner <daniel.steiner@dsteiner.ch>
- Update to 2.4.7.
2021-03-04 05:54:50 +01:00
* Wed Mar 3 2021 Daniel Steiner <daniel.steiner@dsteiner.ch>
- Update to 2.4.6.
2020-11-29 09:02:22 +01:00
* Sun Nov 29 2020 Daniel Steiner <daniel.steiner@dsteiner.ch>
- Update to 2.4.5.
2020-09-05 14:27:35 +02:00
* Sat Sep 5 2020 Daniel Steiner <daniel.steiner@dsteiner.ch>
- Update to 2.4.4.1.
* Mon Jul 6 2020 Daniel Steiner <daniel.steiner@threema.ch>
- Update to 2.4.3.
* Thu Feb 13 2020 Daniel Steiner <daniel.steiner@threema.ch>
- Update to 2.4.1.
* Thu Dec 19 2019 Daniel Steiner <daniel.steiner@threema.ch>
- First initial build.