]> git.pld-linux.org Git - packages/apache-mod_auth_pam.git/blob - apache-mod_auth_pam.spec
- added symbol_fixa patch which allow (de)register module using apxs.
[packages/apache-mod_auth_pam.git] / apache-mod_auth_pam.spec
1 %define         mod_name        auth_pam
2 Summary:        This is the PAM authentication module for Apache
3 Name:           apache-mod_%{mod_name}
4 Version:        1.0a
5 Release:        1
6 License:        GPL
7 Group:          Networking/Daemons
8 Group(de):      Netzwerkwesen/Server
9 Group(pl):      Sieciowe/Serwery
10 Source0:        http://pam.sourceforge.net/mod_auth_pam/dist/mod_%{mod_name}.tar.gz
11 Patch0:         %{name}-symbol_fix.patch
12 BuildRequires:  /usr/sbin/apxs
13 BuildRequires:  apache(EAPI)-devel
14 Prereq:         /usr/sbin/apxs
15 Requires:       apache(EAPI)
16 URL:            http://pam.sourceforge.net/mod_auth_pam/
17 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18
19 %define         _pkglibdir      %(/usr/sbin/apxs -q LIBEXECDIR)
20
21 %description
22 This is an authentication module for Apache that allows you to
23 authenticate HTTP clients using PAM (pluggable authentication module).
24
25 %prep 
26 %setup -q -n mod_%{mod_name}-%{version}
27 %patch -p1
28
29 %build
30 /usr/sbin/apxs -c mod_%{mod_name}.c -o mod_%{mod_name}.so -lpam -ldl
31
32 %install
33 rm -rf $RPM_BUILD_ROOT
34 install -d $RPM_BUILD_ROOT%{_pkglibdir}
35
36 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
37
38 %post
39 /usr/sbin/apxs -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
40 if [ -f /var/lock/subsys/httpd ]; then
41         /etc/rc.d/init.d/httpd restart 1>&2
42 fi
43
44 %preun
45 if [ "$1" = "0" ]; then
46         /usr/sbin/apxs -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
47         if [ -f /var/lock/subsys/httpd ]; then
48                 /etc/rc.d/init.d/httpd restart 1>&2
49         fi
50 fi
51
52 %clean
53 rm -rf $RPM_BUILD_ROOT
54
55 %files
56 %defattr(644,root,root,755)
57 %attr(755,root,root) %{_pkglibdir}/*
This page took 0.025983 seconds and 3 git commands to generate.