#Module-Specific definitions %define mod_version 0.26 %define mod_name mod_authz_ldap %define mod_conf A31_%{mod_name}.conf %define mod_so %{mod_name}.so %define sourcename %{mod_name}-%{mod_version} %define apache_version 2.0.54 # Standard Module Definitions %define name apache-%{mod_name} %define version %{apache_version}_%{mod_version} Summary: LDAP authorization module for apache Name: %{name} Version: %{version} Release: %mkrel 3 Group: System/Servers License: GPL URL: http://authzldap.othello.ch/ Source0: %{sourcename}.tar.bz2 Source1: %{mod_conf}.bz2 Patch1: mod_authz_ldap-0.22-hook.patch.bz2 Patch2: mod_authz_ldap-0.22-passlog.patch.bz2 Patch3: mod_authz_ldap-0.25-build.patch.bz2 Patch4: mod_authz_ldap-0.26-subreq.patch.bz2 BuildRequires: openssl-devel BuildRequires: openldap-devel BuildRequires: automake1.7 BuildRequires: autoconf2.5 Requires: openldap Requires: apache-mod_ssl Requires(pre): rpm-helper Requires(postun): rpm-helper Requires(pre): apache-conf >= 2.0.54 Requires(pre): apache >= %{apache_version} Requires: apache-conf >= 2.0.54 Requires: apache >= %{apache_version} BuildRequires: apache-devel >= %{apache_version} BuildRequires: file Provides: apache2-mod_authz_ldap Obsoletes: apache2-mod_authz_ldap BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot %description The mod_authz_ldap package provides support for authenticating users of the Apache HTTP server against an LDAP database. mod_authz_ldap features the ability to authenticate users based on the SSL client certificate presented, and also supports password aging, and authentication based on role or by configured filters. %prep %setup -q -n %{sourcename} %patch1 -p1 -b .hook %patch2 -p1 -b .passlog %patch3 -p1 -b .build %patch4 -p1 -b .subreq # strip away annoying ^M find . -type f|xargs file|grep 'CRLF'|cut -d: -f1|xargs perl -p -i -e 's/\r//' find . -type f|xargs file|grep 'text'|cut -d: -f1|xargs perl -p -i -e 's/\r//' %build export WANT_AUTOCONF_2_5=1 rm -f configure libtoolize --copy --force && aclocal-1.7 && autoconf --force && autoheader export CPPFLAGS="`apr-config --includes` `apu-config --includes` -I%{_includedir}/openssl" %configure2_5x \ --with-apxs=%{_sbindir}/apxs \ --disable-static cd module %{_sbindir}/apxs -c -o mod_authz_ldap.la *.c -DAUTHZ_LDAP_HAVE_SSL %install [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} make -C tools install DESTDIR=%{buildroot} make -C docs install DESTDIR=%{buildroot} # fix advx compat rm -rf .libs; cp -rp module/.libs . install -d %{buildroot}%{_libdir}/apache-extramodules install -d %{buildroot}%{_sysconfdir}/httpd/modules.d install -m0755 .libs/*.so %{buildroot}%{_libdir}/apache-extramodules/ bzcat %{SOURCE1} > %{buildroot}%{_sysconfdir}/httpd/modules.d/%{mod_conf} install -d %{buildroot}%{_var}/www/html/addon-modules ln -s ../../../..%{_docdir}/%{name}-%{version} %{buildroot}%{_var}/www/html/addon-modules/%{name}-%{version} %post if [ -f %{_var}/lock/subsys/httpd ]; then %{_initrddir}/httpd restart 1>&2; fi %postun if [ "$1" = "0" ]; then if [ -f %{_var}/lock/subsys/httpd ]; then %{_initrddir}/httpd restart 1>&2 fi fi %clean [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} %files %defattr(-,root,root) %doc ldap/*.schema docs/*.{html,jpg} docs/*.{HOWTO,txt} docs/README %doc NEWS AUTHORS ChangeLog COPYING INSTALL %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/%{mod_conf} %attr(0755,root,root) %{_libdir}/apache-extramodules/%{mod_so} %attr(0755,root,root) %{_bindir}/cert* %attr(0644,root,root) %{_mandir}/man1/cert* %{_var}/www/html/addon-modules/* %changelog * Tue Aug 30 2005 Oden Eriksson <oeriksson@mandriva.com> 2.0.54_0.26-3mdk - rebuilt against new openldap-2.3.6 libs * Sat Jul 30 2005 Oden Eriksson <oeriksson@mandriva.com> 2.0.54_0.26-2mdk - fix deps * Thu Jun 02 2005 Oden Eriksson <oeriksson@mandriva.com> 2.0.54_0.26-1mdk - rename the package - the conf.d directory is renamed to modules.d - use new rpm-4.4.x pre,post magic * Sun Mar 20 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.53_0.26-4mdk - use the %%mkrel macro * Mon Feb 28 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.53_0.26-3mdk - fix %%post and %%postun to prevent double restarts - fix bug #6574 * Wed Feb 16 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.53_0.26-2mdk - spec file cleanups, remove the ADVX-build stuff * Tue Feb 8 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.53_0.26-1mdk - rebuilt for apache 2.0.53 * Mon Feb 07 2005 Buchan Milne <bgmilne@linux-mandrake.com> 2.0.52_0.26-2mdk - rebuild for ldap2.2_7 * Fri Nov 26 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.52_0.26-1mdk - initial fedora import