]>
Commit | Line | Data |
---|---|---|
54acf1bc | 1 | %define mod_name auth_pam |
70ed21f7 | 2 | %define apxs /usr/sbin/apxs1 |
54acf1bc | 3 | Summary: This is the PAM authentication module for Apache |
5f7c95e8 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 | |
70ed21f7 | 7 | Name: apache1-mod_%{mod_name} |
4a297730 | 8 | Version: 1.1.1 |
42847c42 | 9 | Release: 5 |
54acf1bc | 10 | License: GPL |
11 | Group: Networking/Daemons | |
4a297730 | 12 | Source0: http://pam.sourceforge.net/mod_auth_pam/dist/mod_%{mod_name}-%{version}.tar.gz |
03ef1e14 | 13 | # Source0-md5: b1e36b5df18a177e671785f7f4c8001c |
2364a1d5 | 14 | Patch0: %{name}-symbol_fix.patch |
70ed21f7 | 15 | Patch1: %{name}-broken_lines.patch |
cbc0866a | 16 | URL: http://pam.sourceforge.net/mod_auth_pam/ |
c80ba3de | 17 | BuildRequires: apache1-devel >= 1.3.39 |
c87c1a5a | 18 | BuildRequires: pam-devel |
53f56e37 | 19 | BuildRequires: rpmbuild(macros) >= 1.268 |
66267b38 | 20 | Requires(triggerpostun): %{apxs} |
42847c42 | 21 | Requires: apache1(EAPI) |
65bbae35 | 22 | Obsoletes: apache-mod_auth_pam <= 1.1.1-4 |
54acf1bc | 23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
24 | ||
66267b38 ER |
25 | %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) |
26 | %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null) | |
54acf1bc | 27 | |
28 | %description | |
29 | This is an authentication module for Apache that allows you to | |
ba820386 | 30 | authenticate HTTP clients using PAM (pluggable authentication module). |
54acf1bc | 31 | |
1533680a JR |
32 | %description -l es.UTF-8 |
33 | Este módulo permite autenticar clientes HTTP usando el directorio PAM. | |
ff356874 | 34 | |
1533680a JR |
35 | %description -l pl.UTF-8 |
36 | To jest moduł uwierzytelnienia dla Apache pozwalający na | |
37 | uwierzytelnianie klientów HTTP przez PAM. | |
9cf58d6b | 38 | |
1533680a JR |
39 | %description -l pt_BR.UTF-8 |
40 | Este módulo permite que você autentique clientes HTTP usando o | |
41 | diretório PAM. | |
ff356874 | 42 | |
3b975f60 | 43 | %prep |
54acf1bc | 44 | %setup -q -n mod_%{mod_name}-%{version} |
70ed21f7 | 45 | %patch0 -p1 |
46 | %patch1 -p0 | |
54acf1bc | 47 | |
48 | %build | |
ead2e8d0 | 49 | %{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.so -lpam -ldl |
54acf1bc | 50 | |
51 | %install | |
52 | rm -rf $RPM_BUILD_ROOT | |
66267b38 | 53 | install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d,/etc/pam.d} |
54acf1bc | 54 | |
55 | install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir} | |
4a297730 | 56 | install samples/httpd- $RPM_BUILD_ROOT/etc/pam.d/httpd |
54acf1bc | 57 | |
66267b38 ER |
58 | echo 'LoadModule %{mod_name}_module modules/mod_%{mod_name}.so' > \ |
59 | $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf | |
60 | ||
3c8bcb53 JB |
61 | %clean |
62 | rm -rf $RPM_BUILD_ROOT | |
63 | ||
54acf1bc | 64 | %post |
53f56e37 | 65 | %service -q apache restart |
54acf1bc | 66 | |
dd1e7d12 | 67 | %postun |
54acf1bc | 68 | if [ "$1" = "0" ]; then |
53f56e37 | 69 | %service -q apache restart |
54acf1bc | 70 | fi |
71 | ||
66267b38 ER |
72 | %triggerpostun -- apache1-mod_%{mod_name} < 1.1.1-3.1 |
73 | # check that they're not using old apache.conf | |
74 | if grep -q '^Include conf\.d' /etc/apache/apache.conf; then | |
75 | %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2 | |
76 | fi | |
77 | ||
54acf1bc | 78 | %files |
79 | %defattr(644,root,root,755) | |
4a297730 | 80 | %doc doc/{configure,faq}.txt samples/dot-htaccess README |
81 | %config(noreplace) /etc/pam.d/httpd | |
8148f738 | 82 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf |
a4789c74 | 83 | %attr(755,root,root) %{_pkglibdir}/* |