]> git.pld-linux.org Git - packages/apache-mod_auth_pam.git/blob - apache-mod_auth_pam.spec
- release 3 (by relup.sh)
[packages/apache-mod_auth_pam.git] / apache-mod_auth_pam.spec
1 %define         mod_name        auth_pam
2 %define         apxs            /usr/sbin/apxs
3 Summary:        This is the PAM authentication module for Apache
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
7 Name:           apache-mod_auth_pam
8 Version:        1.1.1
9 Release:        3
10 Epoch:          1
11 License:        GPL
12 Group:          Networking/Daemons/HTTP
13 Source0:        http://pam.sourceforge.net/mod_auth_pam/dist/mod_%{mod_name}-2.0-%{version}.tar.gz
14 # Source0-md5:  ab873520ddd2fee7d480dfd53e464e0a
15 Source1:        %{name}.conf
16 URL:            http://pam.sourceforge.net/mod_auth_pam/
17 BuildRequires:  %{apxs}
18 BuildRequires:  apache-devel >= 2.0
19 BuildRequires:  pam-devel
20 BuildRequires:  rpmbuild(macros) >= 1.268
21 Requires:       apache(modules-api) = %apache_modules_api
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %define         apacheconfdir   %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d
25 %define         apachelibdir    %(%{apxs} -q LIBEXECDIR 2>/dev/null)
26
27 %description
28 This is an authentication module for Apache that allows you to
29 authenticate HTTP clients using PAM (pluggable authentication module).
30
31 %description -l es.UTF-8
32 Este módulo permite autenticar clientes HTTP usando el directorio PAM.
33
34 %description -l pl.UTF-8
35 To jest moduł uwierzytelnienia dla Apache pozwalający na
36 uwierzytelnianie klientów HTTP przez PAM.
37
38 %description -l pt_BR.UTF-8
39 Este módulo permite que você autentique clientes HTTP usando o
40 diretório PAM.
41
42 %prep
43 %setup -q -n mod_%{mod_name}
44
45 %build
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
48
49 %install
50 rm -rf $RPM_BUILD_ROOT
51 install -d $RPM_BUILD_ROOT{%{apachelibdir},/etc/pam.d,%{apacheconfdir}}
52
53 install .libs/mod_*.so $RPM_BUILD_ROOT%{apachelibdir}
54 install samples/httpd $RPM_BUILD_ROOT/etc/pam.d/httpd
55 install %{SOURCE1} $RPM_BUILD_ROOT%{apacheconfdir}/52_mod_auth_pam.conf
56
57 %clean
58 rm -rf $RPM_BUILD_ROOT
59
60 %post
61 %service -q httpd restart
62
63 %postun
64 if [ "$1" = "0" ]; then
65         %service -q httpd restart
66 fi
67
68 %triggerpostun -- %{name} < 1:1.1.1-1
69 if [ -f %{apacheconfdir}/52_mod_auth_pam.conf ]; then
70         echo "Saving old configuration as %{apacheconfdir}/52_mod_auth_pam.conf.rpmsave"
71         cp -f %{apacheconfdir}/52_mod_auth_pam.conf %{apacheconfdir}/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; }' %{apacheconfdir}/52_mod_auth_pam.conf
74
75         %service -q httpd restart
76 fi
77
78 %files
79 %defattr(644,root,root,755)
80 %doc doc/{configure,faq}.html samples/dot-htaccess README
81 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{apacheconfdir}/*_mod_auth_pam.conf
82 %attr(755,root,root) %{apachelibdir}/*.so
83 %config(noreplace) /etc/pam.d/httpd
This page took 0.068883 seconds and 3 git commands to generate.