]> git.pld-linux.org Git - packages/apache1-mod_auth_yp.git/blob - apache1-mod_auth_yp.spec
- release 2
[packages/apache1-mod_auth_yp.git] / apache1-mod_auth_yp.spec
1 %define         mod_name        auth_yp
2 %define         apxs            /usr/sbin/apxs
3 Summary:        NIS/YP domain authentication module for Apache
4 Summary(pl):    Modu³ Apache'a uwierzytelniaj±cy u¿ytkownika w domenie NIS/YP
5 Name:           apache-mod_%{mod_name}
6 Version:        1.0
7 Release:        2
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:  apache(EAPI)-devel
15 Prereq:         %{_sbindir}/apxs
16 Requires:       apache(EAPI)
17 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18
19 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR)
20
21 %description
22 Apache module authenticating against a NIS/YP domain.
23
24 %description -l pl
25 Modu³ do Apache'a autoryzuj±cy w domenie NIS/YP.
26
27 %prep
28 %setup -q -T -c -n "mod_%{mod_name}-%{version}"
29 install %{SOURCE0} .
30 %patch0
31 %patch1
32
33 %build
34 %{apxs} \
35         -c mod_%{mod_name}.c \
36         -o mod_%{mod_name}.so \
37         -l nsl
38
39 %install
40 rm -rf $RPM_BUILD_ROOT
41 install -d $RPM_BUILD_ROOT%{_pkglibdir}
42
43 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
44 install %{SOURCE1} ./sample-htaccess
45
46 %post
47 %{apxs} -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
48 if [ -f /var/lock/subsys/httpd ]; then
49         /etc/rc.d/init.d/httpd restart 1>&2
50 fi
51
52 %preun
53 if [ "$1" = "0" ]; then
54         %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
55         if [ -f /var/lock/subsys/httpd ]; then
56                 /etc/rc.d/init.d/httpd restart 1>&2
57         fi
58 fi
59
60 %clean
61 rm -rf $RPM_BUILD_ROOT
62
63 %files
64 %defattr(644,root,root,755)
65 %doc sample-htaccess
66 %attr(755,root,root) %{_pkglibdir}/*
This page took 0.21453 seconds and 3 git commands to generate.