1 %define mod_name auth_mysql
2 Summary: This is the PAM authentication module for Apache
3 Name: apache-mod_%{mod_name}
7 Group: Networking/Daemons
8 Group(de): Netzwerkwesen/Server
9 Group(pl): Sieciowe/Serwery
10 Source0: ftp://ftp.kcilink.com/pub/mod_%{mod_name}.c.gz
11 BuildRequires: mysql-devel
12 BuildRequires: /usr/sbin/apxs
13 BuildRequires: apache(EAPI)-devel
14 Prereq: /usr/sbin/apxs
15 Requires: apache(EAPI)
16 URL: http://modntlm.sourceforge.net/
17 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19 %define _pkglibdir %(/usr/sbin/apxs -q LIBEXECDIR)
22 This is an authentication module for Apache that allows you to
23 authenticate HTTP clients using mysql RDBMS.
28 gzip -d mod_%{mod_name}.c.gz
31 /usr/sbin/apxs -c mod_%{mod_name}.c -o mod_%{mod_name}.so -lmysqlclient
34 rm -rf $RPM_BUILD_ROOT
35 install -d $RPM_BUILD_ROOT%{_pkglibdir}
37 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
40 /usr/sbin/apxs -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
41 if [ -f /var/lock/subsys/httpd ]; then
42 /etc/rc.d/init.d/httpd restart 1>&2
46 if [ "$1" = "0" ]; then
47 /usr/sbin/apxs -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
48 if [ -f /var/lock/subsys/httpd ]; then
49 /etc/rc.d/init.d/httpd restart 1>&2
54 rm -rf $RPM_BUILD_ROOT
57 %defattr(644,root,root,755)
58 %attr(755,root,root) %{_pkglibdir}/*