]> git.pld-linux.org Git - packages/apache1-mod_auth_checkpasswd.git/blob - apache1-mod_auth_checkpasswd.spec
98d8a2875a141c8543f2403cf8d28a4e4f12ffe3
[packages/apache1-mod_auth_checkpasswd.git] / apache1-mod_auth_checkpasswd.spec
1 %define         mod_name        auth_checkpasswd
2 %define         apxs            /usr/sbin/apxs1
3 Summary:        This is the CHECKPASSWD authentication module for Apache
4 Summary(pl):    To jest modu³ Apache uwierzytelniaj±cy przez CHECKPASSWD
5 Name:           apache1-mod_%{mod_name}
6 Version:        1.0
7 Release:        2
8 License:        GPL
9 Group:          Networking/Daemons
10 Source0:        mod_%{mod_name}-%{version}.tar.gz
11 # Source0-md5:  7f699981ada026656affe2e35409bdf2
12 Patch0:         %{name}-aplog.patch
13 BuildRequires:  %{apxs}
14 BuildRequires:  apache1-devel >= 1.3.33-2
15 Requires(triggerpostun):        %{apxs}
16 Requires:       apache1 >= 1.3.33-2
17 Obsoletes:      apache-mod_%{mod_name} <= %{version}
18 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
21 %define         _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)
22
23 %description
24 This is an authentication module for Apache that uses an external
25 application compatible with DJB's "checkpasswd". The application may
26 be setuid, which gives you a possibility to verify passwords using
27 regular /etc/shadow.
28
29 %description -l pl
30 To jest modu³ uwierzytelniaj±cy dla Apache który wykorzystuje
31 zewnêtrzn± aplikacjê kompatybiln± z "checkpasswd" DJB. Aplikacja mo¿e
32 byæ suidowana, co daje mo¿liwo¶æ weryfikowania hase³ wykorzystuj±c
33 zwyk³y plik /etc/shadow.
34
35 %prep
36 %setup -q -c -n "mod_%{mod_name}-%{version}"
37 %patch -p1
38
39 %build
40 %{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.so
41
42 %install
43 rm -rf $RPM_BUILD_ROOT
44 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d}
45
46 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
47
48 echo 'LoadModule %{mod_name}_module     modules/mod_%{mod_name}.so' > \
49         $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf
50
51 %clean
52 rm -rf $RPM_BUILD_ROOT
53
54 %post
55 if [ -f /var/lock/subsys/apache ]; then
56         /etc/rc.d/init.d/apache restart 1>&2
57 fi
58
59 %preun
60 if [ "$1" = "0" ]; then
61         if [ -f /var/lock/subsys/apache ]; then
62                 /etc/rc.d/init.d/apache restart 1>&2
63         fi
64 fi
65
66 %triggerpostun -- apache1-mod_%{mod_name} < 1.0-1.1
67 # check that they're not using old apache.conf
68 if grep -q '^Include conf\.d' /etc/apache/apache.conf; then
69         %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
70 fi
71
72 %files
73 %defattr(644,root,root,755)
74 %doc README
75 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
76 %attr(755,root,root) %{_pkglibdir}/*
This page took 0.064578 seconds and 2 git commands to generate.