File dba-apa24-mod_auth_openidc-233.spec of Package dba-apa24-mod_auth_openidc-233

%define vers	233
%define version	2.3.3
%define apavers 2.4.27
%define apapack 2427
%define prefix	/DBA/apache24/WWW/2.4.x
%define apahome /DBA/apache24/WWW/%{apavers}
%define apxs    %{apahome}/bin/apxs
%define modname mod_auth_openidc

Name:           dba-apa24-%{modname}-%{vers}
Summary:        Apache Module for OpenID Connect
Version:        %{version}
Release:        1
License:        GPL
Group:          Productivity/Networking/Web/Servers
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

BuildRequires:  dba-apache-base dba-apache-%{apapack}
Requires:  	dba-apache-base

#!BuildIgnore:	dba-openssl-098o dba-openssl-098r dba-openssl-098x dba-openssl-101c
#!BuildIgnore:  dba-curl-7371 mksh

%if %{?suse_version:1}0
BuildRequires:  libapr-util1-devel >= 1.3 libapr1-devel >= 1.3
%if 0%{?centos_version} == 504 || 0%{?rhel_version} == 501
BuildRequires:  libapr-util1-devel >= 1.3 libapr1-devel >= 1.3
BuildRequires:  apr-util-devel apr-devel

BuildRequires:  gcc-c++
BuildRequires:  curl-devel openssl-devel pcre-devel
BuildRequires:  dba-jansson-27-static
%define jandir  /DBA/jansson/2.7
BuildRequires:  dba-cjose-060-static
%define cjosedir  /DBA/cjose/0.6.0

%if 0%{?suse_version} >= 1110
BuildRequires:  -post-build-checks

mod_auth_openidc is an authentication/authorization module for the Apache 2.x HTTP server that functions as an OpenID Connect Relying Party, authenticating users against an OpenID Connect Provider. It can also function as an OAuth 2.0 Resource Server, validating OAuth 2.0 access tokens presented by OAuth 2.0 Clients

%setup -q -n %{modname}-%{version}

CFLAGS="$CFLAGS -I%{jandir}/include"
LDFLAGS="$LDFLAGS -L%{jandir}/lib"

export JANSSON_CFLAGS="-I%{jandir}/include"
export JANSSON_LIBS="-L%{jandir}/lib"

export CJOSE_CFLAGS="-I%{cjosedir}/include"
export CJOSE_LIBS="-L%{cjosedir}/lib -lcjose"

./configure --with-apxs2=%{apxs}
# # %{apxs} -c src/mod_auth_openidc.c

nm ./src/.libs/ |grep -i cjose

%{__mkdir_p} %{buildroot}%{prefix}/modules

install -m 755 src/.libs/%{modname}.so %{buildroot}%{prefix}/modules/%{modname}-%{version}.so

cd %{prefix}/modules
%{__ln_s} -f %{modname}-%{version}.so %{modname}.so

%{__rm} -rf %{buildroot};


* Thu Apr  5 2018 Holger Manthey <>
- add static link for libcjose 
* Wed Apr  4 2018 Holger Manthey <>
- initial build