]>
Commit | Line | Data |
---|---|---|
ead9fb75 | 1 | %define mod_name auth_samba |
fcf44355 | 2 | Summary: This is the samba authentication module for Apache |
ead9fb75 | 3 | Name: apache-mod_%{mod_name} |
4 | Version: 1.1 | |
5 | Release: 1 | |
6 | License: GPL | |
7 | Group: Networking/Daemons | |
fcf44355 | 8 | Group(de): Netzwerkwesen/Server |
ead9fb75 | 9 | Group(pl): Sieciowe/Serwery |
fcf44355 | 10 | Source0: ftp://download.sourceforge.net/pub/sourceforge/modauthsamba/mod_%{mod_name}-%{version}.tar.gz |
ead9fb75 | 11 | BuildRequires: /usr/sbin/apxs |
12 | BuildRequires: apache(EAPI)-devel | |
13 | Prereq: /usr/sbin/apxs | |
14 | Requires: apache(EAPI) | |
fcf44355 | 15 | URL: http://modauthsamba.sourceforge.net/ |
ead9fb75 | 16 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
17 | ||
18 | %define _pkglibdir %(/usr/sbin/apxs -q LIBEXECDIR) | |
19 | ||
20 | %description | |
21 | This is an authentication module for Apache that allows you to | |
22 | authenticate HTTP clients using user entries in an samba directory. | |
23 | ||
24 | %prep | |
25 | %setup -q -n mod_%{mod_name} | |
26 | ||
27 | %build | |
28 | /usr/sbin/apxs -c mod_%{mod_name}.c -o mod_%{mod_name}.so | |
29 | ||
30 | %install | |
31 | rm -rf $RPM_BUILD_ROOT | |
ead9fb75 | 32 | install -d $RPM_BUILD_ROOT%{_pkglibdir} |
33 | ||
34 | install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir} | |
35 | ||
ead9fb75 | 36 | %post |
fcf44355 | 37 | /usr/sbin/apxs -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2 |
ead9fb75 | 38 | if [ -f /var/lock/subsys/httpd ]; then |
fcf44355 | 39 | /etc/rc.d/init.d/httpd restart 1>&2 |
ead9fb75 | 40 | fi |
41 | ||
42 | %preun | |
43 | if [ "$1" = "0" ]; then | |
44 | /usr/sbin/apxs -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2 | |
45 | if [ -f /var/lock/subsys/httpd ]; then | |
46 | /etc/rc.d/init.d/httpd restart 1>&2 | |
47 | fi | |
48 | fi | |
49 | ||
50 | %clean | |
51 | rm -rf $RPM_BUILD_ROOT | |
52 | ||
53 | %files | |
54 | %defattr(644,root,root,755) | |
55 | %attr(755,root,root) %{_pkglibdir}/* |