]>
Commit | Line | Data |
---|---|---|
1511467c | 1 | %define mod_name auth_pam |
c99c3819 | 2 | %define apxs /usr/sbin/apxs |
1511467c | 3 | Summary: This is the PAM authentication module for Apache |
31194a30 ER |
4 | Summary(es.UTF-8): Este módulo proporciona autenticación PAM para Apache |
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 | |
b85fb670 | 7 | Name: apache-mod_auth_pam |
33040276 | 8 | Version: 1.1.1 |
9 | Release: 1 | |
10 | Epoch: 1 | |
1511467c | 11 | License: GPL |
12 | Group: Networking/Daemons | |
b85fb670 | 13 | Source0: http://pam.sourceforge.net/mod_auth_pam/dist/mod_%{mod_name}-2.0-%{version}.tar.gz |
33040276 | 14 | # Source0-md5: ab873520ddd2fee7d480dfd53e464e0a |
b85fb670 | 15 | Source1: %{name}.conf |
50a9d920 | 16 | URL: http://pam.sourceforge.net/mod_auth_pam/ |
c99c3819 | 17 | BuildRequires: %{apxs} |
6b743ca1 | 18 | BuildRequires: apache-devel >= 2.0 |
63719a24 | 19 | BuildRequires: pam-devel |
08b28793 | 20 | BuildRequires: rpmbuild(macros) >= 1.268 |
08b28793 | 21 | Requires: apache(modules-api) = %apache_modules_api |
1511467c | 22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
23 | ||
6b743ca1 ER |
24 | %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) |
25 | %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null) | |
1511467c | 26 | |
27 | %description | |
28 | This is an authentication module for Apache that allows you to | |
73f51453 | 29 | authenticate HTTP clients using PAM (pluggable authentication module). |
1511467c | 30 | |
ff79f3d0 JR |
31 | %description -l es.UTF-8 |
32 | Este módulo permite autenticar clientes HTTP usando el directorio PAM. | |
6653d2d1 | 33 | |
ff79f3d0 JR |
34 | %description -l pl.UTF-8 |
35 | To jest moduł uwierzytelnienia dla Apache pozwalający na | |
36 | uwierzytelnianie klientów HTTP przez PAM. | |
f3e5c2ef | 37 | |
ff79f3d0 JR |
38 | %description -l pt_BR.UTF-8 |
39 | Este módulo permite que você autentique clientes HTTP usando o | |
40 | diretório PAM. | |
6653d2d1 | 41 | |
2981a208 | 42 | %prep |
1d476387 | 43 | %setup -q -n mod_%{mod_name} |
1511467c | 44 | |
45 | %build | |
33040276 | 46 | %{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.la -lpam |
47 | %{apxs} -c mod_auth_sys_group.c -o mod_auth_sys_group.la -lpam | |
1511467c | 48 | |
49 | %install | |
50 | rm -rf $RPM_BUILD_ROOT | |
1d476387 | 51 | install -d $RPM_BUILD_ROOT{%{_pkglibdir},/etc/pam.d,%{_sysconfdir}/httpd.conf} |
1511467c | 52 | |
33040276 | 53 | install .libs/mod_*.so $RPM_BUILD_ROOT%{_pkglibdir} |
54 | install samples/httpd $RPM_BUILD_ROOT/etc/pam.d/httpd | |
1d476387 | 55 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/52_mod_auth_pam.conf |
1511467c | 56 | |
93ffa82a JB |
57 | %clean |
58 | rm -rf $RPM_BUILD_ROOT | |
59 | ||
1511467c | 60 | %post |
08b28793 | 61 | %service -q httpd restart |
1511467c | 62 | |
c9c02328 | 63 | %postun |
1511467c | 64 | if [ "$1" = "0" ]; then |
08b28793 | 65 | %service -q httpd restart |
1511467c | 66 | fi |
67 | ||
87e0e94d | 68 | %triggerpostun -- %{name} < 1:1.1.1-1 |
33040276 | 69 | if [ -f %{_sysconfdir}/httpd.conf/52_mod_auth_pam.conf ]; then |
08b28793 ER |
70 | echo "Saving old configuration as %{_sysconfdir}/httpd.conf/52_mod_auth_pam.conf.rpmsave" |
71 | cp -f %{_sysconfdir}/httpd.conf/52_mod_auth_pam.conf %{_sysconfdir}/httpd.conf/52_mod_auth_pam.conf.rpmsave | |
72 | echo "Adjusting configuration for apache-mod_auth_pam >= 1.1" | |
73 | sed -i -e '{ s/pam_auth_module/auth_pam_module/g; s/etc_group_auth_module/auth_sys_group_module/g; s/mod_auth_pam2.so/mod_auth_pam.so/g; s/mod_auth_etc_group.so/mod_auth_sys_group.so/g; }' %{_sysconfdir}/httpd.conf/52_mod_auth_pam.conf | |
74 | ||
75 | %service -q httpd restart | |
33040276 | 76 | fi |
77 | ||
1511467c | 78 | %files |
79 | %defattr(644,root,root,755) | |
33040276 | 80 | %doc doc/{configure,faq}.html samples/dot-htaccess README |
9c7fabc8 | 81 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*_mod_auth_pam.conf |
3e4dc491 | 82 | %attr(755,root,root) %{_pkglibdir}/*.so |
0ed828a9 | 83 | %config(noreplace) /etc/pam.d/httpd |