%define version 3.11
%define release 0vl2

Summary: This is a LDAP authentication module for Apache 2.x
Summary(ja): Apache バージョン 2.x 用の LDAP 認証モジュール
Name: mm_mod_auth_ldap
Group: Applications/System
License: GPL
Version: %{version}
Release: %{release}
Source: http://www.muquit.com/muquit/software/mod_auth_ldap/mm_mod_auth_ldap%{version}.tar.gz
Patch0: %{name}%{version}.Makefile.patch

Url: http://www.muquit.com/muquit/software/mod_auth_ldap/mod_auth_ldap.html
BuildRoot: %{_tmppath}/%{name}-root
BuildPrereq: apache2-devel, openldap-devel

%description
This is an authentication module for Apache 2.x that allows you to authenticate
HTTP clients using user entries in an LDAP directory.

%prep
[ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT}

%setup -q -n %{name}%{version}
%patch0 -p1

%build
%configure \
	--with-apache-ver=2.2 \
	--with-apache-dir=%{_prefix} \
	--with-mem-cache \
	--with-apxs=%{_bindir} \
	--with-ldap-dir=%{_prefix} \
	--with-ssl=yes

pushd libs/libghthash
%configure
%__make && touch .xxxx
popd

%__make

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_libdir}/apache2/modules
install -m755 .libs/mm_mod_auth_ldap.so $RPM_BUILD_ROOT%{_libdir}/apache2/modules/mm_mod_auth_ldap.so

%clean
[ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT}

%files
%defattr(-,root,root)
%{_libdir}/apache2/modules/mm_mod_auth_ldap.so

%changelog
* Sun Jan 13 2008 NOGUCHI Shoji <ng@jpng.jp> 3.11-0vl2
- s/Copyright/License/

* Sun Jul 16 2006 NOGUCHI Shoji <noguchi@org3.net> 3.11-0vl1
- first build for Vine Linux 3.1

