]>
Commit | Line | Data |
---|---|---|
893d52a7 JB |
1 | %define mod_name authn_pam |
2 | %define apxs /usr/sbin/apxs | |
3 | Summary: This is the PAM authentication module for Apache 2.2 | |
4c8b4169 JB |
4 | Summary(es.UTF-8): Este módulo proporciona autenticación PAM para Apache 2.2 |
5 | Summary(pl.UTF-8): Moduł uwierzytelnienia PAM dla Apache | |
6 | Summary(pt_BR.UTF-8): Este módulo provê autenticação PAM para o Apache | |
7 | Name: apache-mod_authn_pam | |
893d52a7 JB |
8 | Version: 0.0.1 |
9 | Release: 1 | |
10 | Epoch: 1 | |
816d04f0 | 11 | License: Apache |
f0beb809 | 12 | Group: Networking/Daemons/HTTP |
7aa7fe4e | 13 | Source0: mod_%{mod_name}.tar.bz2 |
14 | # Source0-md5: c0bcce844da1df21ede8ee9a6cfb33e6 | |
4c8b4169 JB |
15 | Source1: %{name}.conf |
16 | Source2: %{name}.pamd | |
17 | Patch0: %{name}-AuthnPAMService.patch | |
893d52a7 JB |
18 | URL: http://cvs.sourceforge.net/viewcvs.py/mod-auth/mod_authn_pam/ |
19 | BuildRequires: %{apxs} | |
20 | BuildRequires: apache-devel >= 2.2 | |
21 | BuildRequires: pam-devel | |
22 | BuildRequires: rpmbuild(macros) >= 1.268 | |
23 | Requires: apache >= 2.2 | |
24 | Requires: apache(modules-api) = %apache_modules_api | |
893d52a7 | 25 | Provides: apache-mod_auth_pam |
4c8b4169 | 26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
893d52a7 JB |
27 | |
28 | %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) | |
ca97eb04 | 29 | %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d |
893d52a7 JB |
30 | |
31 | %description | |
32 | This is an authentication module for Apache that allows you to | |
33 | authenticate HTTP clients using PAM (pluggable authentication module). | |
34 | ||
4c8b4169 JB |
35 | %description -l es.UTF-8 |
36 | Este módulo permite autenticar clientes HTTP usando el directorio PAM. | |
893d52a7 | 37 | |
4c8b4169 JB |
38 | %description -l pl.UTF-8 |
39 | To jest moduł uwierzytelnienia dla Apache pozwalający na | |
40 | uwierzytelnianie klientów HTTP przez PAM. | |
893d52a7 | 41 | |
4c8b4169 JB |
42 | %description -l pt_BR.UTF-8 |
43 | Este módulo permite que você autentique clientes HTTP usando o | |
44 | diretório PAM. | |
893d52a7 JB |
45 | |
46 | %prep | |
47 | %setup -q -n mod_%{mod_name} | |
48 | %patch0 -p1 | |
49 | ||
50 | %build | |
51 | cd src | |
4c8b4169 | 52 | %{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.la -lpam |
893d52a7 JB |
53 | |
54 | %install | |
893d52a7 | 55 | rm -rf $RPM_BUILD_ROOT |
ca97eb04 | 56 | install -d $RPM_BUILD_ROOT{%{_pkglibdir},/etc/pam.d,%{_sysconfdir}} |
893d52a7 | 57 | |
94d29df6 | 58 | cd src |
ca97eb04 ER |
59 | install -p .libs/mod_*.so $RPM_BUILD_ROOT%{_pkglibdir} |
60 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/52_mod_authn_pam.conf | |
61 | cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/pam.d/httpd | |
893d52a7 JB |
62 | |
63 | %clean | |
64 | rm -rf $RPM_BUILD_ROOT | |
65 | ||
66 | %post | |
67 | %service -q httpd restart | |
68 | ||
69 | %postun | |
70 | if [ "$1" = "0" ]; then | |
71 | %service -q httpd restart | |
72 | fi | |
73 | ||
74 | %files | |
75 | %defattr(644,root,root,755) | |
ca97eb04 | 76 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_authn_pam.conf |
893d52a7 JB |
77 | %attr(755,root,root) %{_pkglibdir}/*.so |
78 | %config(noreplace) /etc/pam.d/httpd |