]>
Commit | Line | Data |
---|---|---|
15307016 | 1 | %define mod_name auth_checkpasswd |
49051a58 | 2 | %define apxs /usr/sbin/apxs1 |
15307016 | 3 | Summary: This is the CHECKPASSWD authentication module for Apache |
9756cd36 | 4 | Summary(pl.UTF-8): To jest moduł Apache uwierzytelniający przez CHECKPASSWD |
49051a58 | 5 | Name: apache1-mod_%{mod_name} |
15307016 | 6 | Version: 1.0 |
4d99782f | 7 | Release: 3 |
15307016 SZ |
8 | License: GPL |
9 | Group: Networking/Daemons | |
15307016 | 10 | Source0: mod_%{mod_name}-%{version}.tar.gz |
022761e3 | 11 | # Source0-md5: 7f699981ada026656affe2e35409bdf2 |
9127a38d | 12 | Patch0: %{name}-aplog.patch |
620d03a3 | 13 | BuildRequires: %{apxs} |
c3103146 | 14 | BuildRequires: apache1-devel >= 1.3.33-2 |
21e5aaae | 15 | BuildRequires: rpmbuild(macros) >= 1.268 |
c3103146 | 16 | Requires(triggerpostun): %{apxs} |
4d99782f | 17 | Requires: apache1(EAPI) |
21e5aaae | 18 | Obsoletes: apache-mod_auth_checkpasswd <= 1.0 |
15307016 SZ |
19 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
20 | ||
c3103146 ER |
21 | %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) |
22 | %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null) | |
15307016 SZ |
23 | |
24 | %description | |
25 | This is an authentication module for Apache that uses an external | |
509e2239 | 26 | application compatible with DJB's "checkpasswd". The application may |
620d03a3 | 27 | be setuid, which gives you a possibility to verify passwords using |
28 | regular /etc/shadow. | |
15307016 | 29 | |
9756cd36 JR |
30 | %description -l pl.UTF-8 |
31 | To jest moduł uwierzytelniający dla Apache który wykorzystuje | |
32 | zewnętrzną aplikację kompatybilną z "checkpasswd" DJB. Aplikacja może | |
33 | być suidowana, co daje możliwość weryfikowania haseł wykorzystując | |
34 | zwykły plik /etc/shadow. | |
15307016 | 35 | |
ddbdb620 | 36 | %prep |
15307016 | 37 | %setup -q -c -n "mod_%{mod_name}-%{version}" |
a3c81902 | 38 | %patch0 -p1 |
15307016 SZ |
39 | |
40 | %build | |
49051a58 | 41 | %{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.so |
15307016 SZ |
42 | |
43 | %install | |
44 | rm -rf $RPM_BUILD_ROOT | |
c3103146 | 45 | install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d} |
15307016 SZ |
46 | |
47 | install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir} | |
48 | ||
c3103146 ER |
49 | echo 'LoadModule %{mod_name}_module modules/mod_%{mod_name}.so' > \ |
50 | $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf | |
51 | ||
1e4b16af JB |
52 | %clean |
53 | rm -rf $RPM_BUILD_ROOT | |
54 | ||
15307016 | 55 | %post |
21e5aaae | 56 | %service -q apache restart |
15307016 | 57 | |
091a1b94 | 58 | %postun |
15307016 | 59 | if [ "$1" = "0" ]; then |
21e5aaae | 60 | %service -q apache restart |
15307016 SZ |
61 | fi |
62 | ||
c3103146 ER |
63 | %triggerpostun -- apache1-mod_%{mod_name} < 1.0-1.1 |
64 | # check that they're not using old apache.conf | |
65 | if grep -q '^Include conf\.d' /etc/apache/apache.conf; then | |
66 | %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2 | |
67 | fi | |
68 | ||
15307016 SZ |
69 | %files |
70 | %defattr(644,root,root,755) | |
11fcafbf | 71 | %doc README |
03966505 | 72 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf |
15307016 | 73 | %attr(755,root,root) %{_pkglibdir}/* |