]> git.pld-linux.org Git - packages/apache1-mod_auth_yp.git/blob - apache1-mod_auth_yp.spec
- apxs1 in apache1-devel now
[packages/apache1-mod_auth_yp.git] / apache1-mod_auth_yp.spec
1 %define         mod_name        auth_yp
2 %define         apxs            /usr/sbin/apxs1
3 Summary:        NIS/YP domain authentication module for Apache
4 Summary(pl.UTF-8):      Moduł Apache'a uwierzytelniający użytkownika w domenie NIS/YP
5 Name:           apache1-mod_%{mod_name}
6 Version:        1.0
7 Release:        3
8 License:        GPL
9 Group:          Networking/Daemons
10 Source0:        http://nte.univ-lyon2.fr/~brogniar/articles/mod_%{mod_name}.c
11 Source1:        %{name}-htaccess
12 Patch0:         %{name}-authfile.patch
13 Patch1:         %{name}-shadow.patch
14 BuildRequires:  apache1-devel >= 1.3.39
15 BuildRequires:  rpmbuild(macros) >= 1.268
16 Requires(triggerpostun):        %{apxs}
17 Requires:       apache1(EAPI)
18 Obsoletes:      apache-mod_auth_yp <= 1.0
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
22 %define         _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)
23
24 %description
25 Apache module authenticating against a NIS/YP domain.
26
27 %description -l pl.UTF-8
28 Moduł do Apache'a autoryzujący w domenie NIS/YP.
29
30 %prep
31 %setup -qcT
32 install %{SOURCE0} .
33 %patch0
34 %patch1
35
36 %build
37 %{apxs} \
38         -c mod_%{mod_name}.c \
39         -o mod_%{mod_name}.so \
40         -l nsl
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 install %{SOURCE1} ./sample-htaccess
48
49 echo 'LoadModule %{mod_name}_module     modules/mod_%{mod_name}.so' > \
50         $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf
51
52 %post
53 %service -q apache restart
54
55 %postun
56 if [ "$1" = "0" ]; then
57         %service -q apache restart
58 fi
59
60 %clean
61 rm -rf $RPM_BUILD_ROOT
62
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
69 %files
70 %defattr(644,root,root,755)
71 %doc sample-htaccess
72 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
73 %attr(755,root,root) %{_pkglibdir}/*
This page took 0.073638 seconds and 3 git commands to generate.