Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > by-pkgid > ed866d1b4470ff854a664d40382398be > files > 2

mod_auth_pam-1.1.1-5mdk.src.rpm

#New ADVX macros
%define ADVXdir %{_datadir}/ADVX
%{expand:%(cat %{ADVXdir}/ADVX-build)}

%{expand:%%define apache_version %(rpm -q apache-devel|sed 's/apache-devel-\([0-9].*\)-.*$/\1/')}
%{expand:%%define apache_release %(rpm -q apache-devel|sed 's/apache-devel-[0-9].*-\(.*\)$/\1/')}

%{expand:%%define mm_major %(mm-config --version|sed 's/MM \([0-9]\)\.\([0-9.].*\) \(.*\)$/\1/')}
%{expand:%%define mm_minor %(mm-config --version|sed 's/MM \([0-9]\)\.\([0-9.].*\) \(.*\)$/\2/')}
%define mm_version %{mm_major}.%{mm_minor}

%define name mod_auth_pam
%define release 5mdk
%define version 1.1.1

Summary: 	Pam authorisation for Apache
Name: 		%name
Version: 	%version
Release: 	%release
License: 	LGPL
Group: 		System/Servers
Source: 	http://pam.sourceforge.net/mod_auth_pam/dist/%name-%{version}.tar.bz2
BuildRoot: 	%{_tmppath}/%{name}-root
Url: 		http://pam.sourceforge.net/mod_auth_pam/
BuildRequires: ADVX-build >= 1.2
BuildRequires:	apache-devel

Prereq: apache = %{apache_version}
Prereq:	apache-common >= %{apache_version}
Prereq:	apache-conf >= %{apache_version}
Prereq: mm = %{mm_major}.%{mm_minor}

%description
The PAM authentication module implements Basic authentication on 
top of the Pluggable Authentication Module library. Thereby it 
supports standard unix passwd, shadow, NIS, SMB auth and radius 
authentication transparently and easily interchangeable, wherever 
the HTTP protocol allows it.

%prep
rm -rf %{buildroot}

%setup -q

%build
cp  mod_auth_pam.c  mod_pam_auth.c
%{_sbindir}/apxs -c mod_pam_auth.c -o mod_pam_auth.so -lpam -ldl

%install
mkdir -p %{buildroot}%{_libdir}/apache
cp mod_pam_auth.so %{buildroot}%{_libdir}/apache/mod_pam_auth.so
chmod 755 %{buildroot}%{_libdir}/apache/mod_pam_auth.so

mkdir -p %{buildroot}/etc/pam.d
cp samples/httpd-rh6+ %{buildroot}/etc/pam.d/httpd

%pre
#Check config file sanity
%AP13pre

%post
%ADVXpost

%postun
%ADVXpost

%files
%defattr(-,root,root)
%{_libdir}/apache/mod_pam_auth.so
%defattr(644,root,root,755)
%doc INSTALL README doc/configure.txt  doc/faq.txt  doc/install.txt
%config(noreplace) %{_sysconfdir}/pam.d/httpd

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

%changelog
* Thu Feb 13 2003 Jean-Michel Dault <jmdault@mandrakesoft.com> 1.1.1-5mdk
- new macros from ADVX-build

* Sat Feb 01 2003 Lenny Cartier <lenny@mandrakesoft.com 1.1.1-4mdk
- rebuild

* Fri Nov  8 2002 Jean-Michel Dault <jmdault@mandrakesoft.com> 1.1.1-3mdk
- Rebuild for Cooker

* Mon Oct 28 2002 Jean-Michel Dault <jmdault@mandrakesoft.com> 1.1.1-2mdk
- Rebuild with new apache

* Tue Aug 27 2002 Lenny Cartier <lenny@mandrakesoft.com> 1.1.1-1mdk
- from Franck Martin <franck@sopac.org> :
	- Packaged for mdk8.2