1 %define mod_name auth_pgsql
2 Summary: This is the PgSQL authentication module for Apache
3 Name: apache-mod_%{mod_name}
7 Group: Networking/Daemons
8 Group(de): Netzwerkwesen/Server
9 Group(pl): Sieciowe/Serwery
10 Source0: http://www.giuseppetanzilli.it/mod_%{mod_name}/dist/mod_%{mod_name}-%{version}.tar.gz
11 Patch0: %{name}-version.patch
12 BuildRequires: postgresql-devel
13 BuildRequires: /usr/sbin/apxs
14 BuildRequires: apache(EAPI)-devel
15 Prereq: /usr/sbin/apxs
16 Requires: apache(EAPI)
17 URL: http://www.giuseppetanzilli.it/mod_auth_pgsql/
18 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20 %define _pkglibdir %(/usr/sbin/apxs -q LIBEXECDIR)
23 This is an authentication module for Apache that allows you to
24 authenticate HTTP clients using postgresql RDBMS.
27 %setup -q -n "mod_%{mod_name}-%{version}"
32 -I /usr/include/postgresql \
34 -c mod_%{mod_name}.c \
38 rm -rf $RPM_BUILD_ROOT
39 install -d $RPM_BUILD_ROOT%{_pkglibdir}
41 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
44 /usr/sbin/apxs -e -a -n auth_pgsql %{_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
50 if [ "$1" = "0" ]; then
51 /usr/sbin/apxs -e -A -n auth_pgsql %{_pkglibdir}/mod_%{mod_name}.so 1>&2
52 if [ -f /var/lock/subsys/httpd ]; then
53 /etc/rc.d/init.d/httpd restart 1>&2
58 rm -rf $RPM_BUILD_ROOT
61 %defattr(644,root,root,755)
62 %attr(755,root,root) %{_pkglibdir}/*