]>
Commit | Line | Data |
---|---|---|
9ad9f9b8 | 1 | %define mod_name auth_any |
2 | Summary: This is the any authentication module for Apache | |
3 | Name: apache-mod_%{mod_name} | |
4 | Version: 1.2 | |
5 | Release: 1 | |
6 | License: GPL | |
7 | Group: Networking/Daemons | |
8 | Group(de): Netzwerkwesen/Server | |
9 | Group(pl): Sieciowe/Serwery | |
10 | Source0: ftp://ftp.itlab.musc.edu/pub/toolbox/mod_%{mod_name}/mod_%{mod_name}-%{version}.tar.gz | |
11 | URL: http://www.itlab.musc.edu/~nafees/mod_%{mod_name}.html | |
12 | Prereq: /usr/sbin/apxs | |
13 | Requires: apache(EAPI) | |
14 | BuildRequires: /usr/sbin/apxs | |
15 | BuildRequires: apache(EAPI)-devel | |
16 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
17 | ||
18 | %define _pkglibdir %(/usr/sbin/apxs -q LIBEXECDIR) | |
19 | ||
20 | %description | |
21 | This module allows you to use any command line program (such as webNIS) to | |
22 | authenticate a user. | |
23 | ||
24 | %prep | |
25 | %setup -q -n mod_%{mod_name} | |
26 | ||
27 | %build | |
28 | /usr/sbin/apxs -c src/mod_%{mod_name}.c -o mod_%{mod_name}.so | |
29 | ||
30 | %install | |
31 | rm -rf $RPM_BUILD_ROOT | |
32 | install -d $RPM_BUILD_ROOT%{_pkglibdir} | |
33 | ||
34 | install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir} | |
35 | gzip -9nf docs/* | |
36 | ||
37 | %post | |
38 | /usr/sbin/apxs -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2 | |
39 | if [ -f /var/lock/subsys/httpd ]; then | |
40 | /etc/rc.d/init.d/httpd restart 1>&2 | |
41 | fi | |
42 | ||
43 | %preun | |
44 | if [ "$1" = "0" ]; then | |
45 | /usr/sbin/apxs -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2 | |
46 | if [ -f /var/lock/subsys/httpd ]; then | |
47 | /etc/rc.d/init.d/httpd restart 1>&2 | |
48 | fi | |
49 | fi | |
50 | ||
51 | %clean | |
52 | rm -rf $RPM_BUILD_ROOT | |
53 | ||
54 | %files | |
55 | %defattr(644,root,root,755) | |
56 | %attr(755,root,root) %{_pkglibdir}/* | |
57 | %doc docs/*.gz |