File apache2-mod_auth_mellon.spec of Package apache2-mod_auth_mellon.23564

# spec file for package apache2-mod_auth_mellon
# Copyright (c) 2020 SUSE LLC
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

%define upstream_name mod_auth_mellon
Name:           apache2-mod_auth_mellon
Version:        0.17.0
Release:        0
Summary:        A SAML 2.0 authentication module for the Apache Server
License:        GPL-2.0-or-later
Group:          Productivity/Networking/Web/Servers
URL:  {upstream_name}
Source1:        %{upstream_name}.conf
Source2:        %{name}.conf
Source3:        README.diagnostics
Patch0:         mod_auth_mellon-0.16.0-env-script-interpreter.patch
Patch1:		fix-CVE-2021-3639.patch
BuildRequires:  apache-rpm-macros
BuildRequires:  apache2-devel
BuildRequires:  curl-devel
BuildRequires:  gcc
BuildRequires:  glib2-devel
BuildRequires:  openssl-devel
BuildRequires:  pkgconfig
BuildRequires:  xmlsec1-devel
BuildRequires:  pkgconfig(lasso) >= 2.5.1
BuildRequires:  rubygem(asciidoctor)
Requires:       %{apache_mmn}
Requires:       %{apache_suse_maintenance_mmn}
Requires:       liblasso3 >= 2.5.1

The mod_auth_mellon module is an authentication service that implements the
SAML 2.0 federation protocol. It grants access based on the attributes
received in assertions generated by a IdP server.

%package doc
Summary:        Documentation for mod_auth_mellon module
Group:          Productivity/Networking/Web/Servers
Requires:       %{name} = %{version}

%description doc
This package contains a documentation for mod_auth_mellon module.

%package diagnostics
Summary:        Build of mod_auth_mellon with diagnostic logging
Group:          Productivity/Networking/Web/Servers
Requires:       %{name} = %{version}-%{release}

%description diagnostics
Build of mod_auth_mellon with diagnostic logging. See README.diagnostics
in the doc directory for instructions on using the diagnostics build.

%autosetup -n %{upstream_name}-%{version}

export APXS=%{_httpd_apxs}
%configure --enable-diagnostics
%make_build clean
cp .libs/%{upstream_name}.so %{upstream_name}

%make_build clean
pushd doc/user_guide
asciidoctor -a data-uri mellon_user_guide.adoc

# install module
mkdir -p %{buildroot}/%{apache_libexecdir}
install -m 755 .libs/%{upstream_name}.so %{buildroot}%{apache_libexecdir}
install -m 755 %{upstream_name} %{buildroot}%{apache_libexecdir}

# install module configuration
mkdir -p %{buildroot}%{_sysconfdir}/apache2/conf.d
install -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/apache2/conf.d

install -d -m 0755 %{buildroot}%{_tmpfilesdir}
install -m 0644 %{SOURCE2} %{buildroot}%{_tmpfilesdir}/%{name}.conf

# install script to generate metadata
mkdir -p %{buildroot}/%{_libexecdir}/%{name}
install -m 755 %{buildroot}/%{_libexecdir}/%{name}

# install user guide
mkdir -p %{buildroot}/%{_docdir}
cp -r doc/user_guide %{buildroot}/%{_docdir}

# install diagnostics README
install -m 0644  %{SOURCE3} %{buildroot}/%{_docdir}

%tmpfiles_create %{_tmpfilesdir}/%{name}.conf

%files diagnostics

%license COPYING
%doc NEWS ECP.rst
%config(noreplace) %{_sysconfdir}/apache2/conf.d/%{upstream_name}.conf
%ghost /run/mod_auth_mellon

%files doc
%doc %{_docdir}/README.diagnostics
%doc %{_docdir}/user_guide

openSUSE Build Service is sponsored by