-%define apxs /usr/sbin/apxs
+%define mod_name fastcgi
+%define apxs /usr/sbin/apxs
Summary: Support for the FastCGI protocol for apache webserver
Summary(pl): Obs³uga protoko³u FastCGI dla serwera apache
Summary(ru): FastCGI - ÂÏÌÅÅ ÂÙÓÔÒÁÑ ×ÅÒÓÉÑ CGI
Summary(uk): FastCGI - ¦ÌØÛ Û×ÉÄËÁ ×ÅÒÓ¦Ñ CGI
-Name: apache-mod_fastcgi
-Version: 2.4.0
-Release: 1
+Name: apache-mod_%{mod_name}
+Version: 2.4.2
+Release: 3
License: distributable
Group: Networking/Daemons
-Source0: http://www.FastCGI.com/dist/mod_fastcgi-%{version}.tar.gz
-# Source0-md5: e4f5b1b185db4774021163dd0fcd2c56
+Source0: http://www.FastCGI.com/dist/mod_%{mod_name}-%{version}.tar.gz
+# Source0-md5: e994414304b535cb99e10b7d1cad1d1e
+Patch0: %{name}-allow-uid-gid.patch
+Source1: %{name}.conf
URL: http://www.FastCGI.com/
BuildRequires: %{apxs}
-BuildRequires: apache-devel
+BuildRequires: apache-devel >= 2
+BuildRequires: libtool
Requires(post,preun): %{apxs}
-Requires: apache >= 1.3.1
+Requires: apache >= 2
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-%define _libexecdir %{_libdir}/apache
-%define _htmldocdir /home/httpd/manual/mod
+%define _sysconfdir %(%{apxs} -q SYSCONFDIR)
+%define _pkglibdir %(%{apxs} -q LIBEXECDIR)
%description
This 3rd party module provides support for the FastCGI protocol.
û×ÉÄ˦ÓÔØ API web-ÓÅÒ×ÅÒ¦× Ú¦ ×Ó¦ÍÁ ÐÅÒÅ×ÁÇÁÍÉ CGI.
%prep
-%setup -q -n mod_fastcgi-%{version}
+%setup -q -n mod_%{mod_name}-%{version}
+%patch0 -p1
%build
-%{apxs} -D SUEXEC_BIN="\"\\\"%{_sbindir}/suexec\\\"\"" -o mod_fastcgi.so -c *.c
+%{__make} -f Makefile.AP2 \
+ top_dir=%{_pkglibdir} \
+ INCLUDES="-I%(%{apxs} -q INCLUDEDIR)"
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_libexecdir},%{_htmldocdir}}
+install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf}
-install mod_fastcgi.so $RPM_BUILD_ROOT%{_libexecdir}
-install docs/*.html $RPM_BUILD_ROOT%{_htmldocdir}
+install .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
+install %{SOURCE1} $RPM_BUILD_ROOT/%{_sysconfdir}/httpd.conf/
%clean
rm -rf $RPM_BUILD_ROOT
%post
-%{apxs} -e -a -n fastcgi %{_libexecdir}/mod_fastcgi.so 1>&2
if [ -f /var/lock/subsys/httpd ]; then
/etc/rc.d/init.d/httpd restart 1>&2
else
echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache http daemon."
-fi
-
+
%preun
if [ "$1" = "0" ]; then
- %{apxs} -e -A -n fastcgi %{_libexecdir}/mod_fastcgi.so 1>&2
if [ -f /var/lock/subsys/httpd ]; then
/etc/rc.d/init.d/httpd restart 1>&2
fi
fi
-
+
%files
%defattr(644,root,root,755)
-%doc docs/LICENSE.TERMS CHANGES
-%doc %{_htmldocdir}/*
-%attr(755,root,root) %{_libexecdir}/*
+%doc docs/LICENSE.TERMS CHANGES docs/*.html
+%attr(755,root,root) %{_pkglibdir}/*.so
+%config %{_sysconfdir}/httpd.conf/*.conf