%define real_name mod_auth_kerb Summary: Kerberos authentication module for Apache HTTP Server 2.2.x Name: mod_auth_kerb_ap22 Version: 5.4 Release: 3 License: BSD and MIT Group: System Environment/Daemons URL: http://modauthkerb.sourceforge.net/ Source0: http://downloads.sourceforge.net/modauthkerb/%{real_name}-%{version}.tar.gz Source1: %{real_name}.conf Patch0: %{real_name}-%{version}-aix.patch Patch1: %{real_name}-%{version}-rcopshack.patch Patch2: %{real_name}-%{version}-fixes.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: apr-devel >= 1.5.2-2, apr-util-devel >= 1.5.4-3 BuildRequires: httpd-devel >= 2.2.29-2, httpd-devel < 2.4 BuildRequires: patch BuildRequires: krb5-devel >= 1.14.4-1 Requires: apr >= 1.5.2-2, apr-util >= 1.5.4-3 Requires: httpd >= 2.2.29-2, httpd < 2.4 Requires: krb5-libs >= 1.14.4-1 Provides: %{real_name} = %{version}-%{release} %description mod_auth_kerb is a module for the Apache HTTP Server designed to provide Kerberos authentication over HTTP. The module supports the Negotiate authentication method, which performs full Kerberos authentication based on ticket exchanges. %prep %setup -q -n %{real_name}-%{version} %patch0 export PATH=/opt/freeware/bin:$PATH %patch1 -p1 -b .rcopshack %patch2 -p1 -b .fixes %build ./configure \ --without-krb4 \ --with-krb5=%{_prefix} \ --with-apache=%{_prefix} make %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/httpd/modules cp src/.libs/mod_auth_kerb.so ${RPM_BUILD_ROOT}%{_libdir}/httpd/modules/mod_auth_kerb.so chmod 0755 ${RPM_BUILD_ROOT}%{_libdir}/httpd/modules/mod_auth_kerb.so mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf/extra cp %{SOURCE1} ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf/extra/auth_kerb.conf chmod 0644 ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf/extra/auth_kerb.conf %post cat %{_sysconfdir}/httpd/conf/httpd.conf | \ grep -v "# auth_kerb settings" | \ grep -v "Include conf/extra/auth_kerb.conf" \ > %{_sysconfdir}/httpd/conf/tmp_httpd.conf mv -f %{_sysconfdir}/httpd/conf/tmp_httpd.conf %{_sysconfdir}/httpd/conf/httpd.conf echo "# auth_kerb settings" >> %{_sysconfdir}/httpd/conf/httpd.conf echo "Include conf/extra/auth_kerb.conf" >> %{_sysconfdir}/httpd/conf/httpd.conf echo "Please restart your web server using: '/opt/freeware/sbin/apachectl restart'" %postun if [ "$1" = 0 ]; then cat %{_sysconfdir}/httpd/conf/httpd.conf | \ grep -v "# auth_kerb settings" | \ grep -v "Include conf/extra/auth_kerb.conf" \ > %{_sysconfdir}/httpd/conf/tmp_httpd.conf mv -f %{_sysconfdir}/httpd/conf/tmp_httpd.conf %{_sysconfdir}/httpd/conf/httpd.conf echo "Please restart your web server using: '/opt/freeware/sbin/apachectl restart'" fi %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc README %config(noreplace) %{_sysconfdir}/httpd/conf/extra/auth_kerb.conf %{_libdir}/httpd/modules/*.so %changelog * Tue Nov 29 2016 Michael Perzl - 5.4-3 - recompiled against latest versions * Tue May 28 2013 Michael Perzl - 5.4-2 - restructured package to better adapt to different Apache (httpd) versions * Fri Nov 11 2011 Michael Perzl - 5.4-1 - first version for AIX V5.1 and higher