1 %define apxs /usr/sbin/apxs
2 %define _apache1 %(rpm -q apache-devel 2> /dev/null | grep -Eq '\\-2\\.[0-9]+\\.' && echo 0 || echo 1)
3 Summary: A binary compatibility alternative to Apache module mod_fastcgi
4 Summary(pl): Binarnie kompatybilna alternatywa dla modu³u Apache'a mod_fastcgi
9 Group: Networking/Daemons
10 Source0: http://fastcgi.coremail.cn/mod_fcgid.%{version}.tar.gz
11 # Source0-md5: 1bfdf0274caf9ecaee089e4b3f70326e
12 Source1: 70_mod_fastcgi.conf
13 URL: http://fastcgi.coremail.cn/
14 BuildRequires: %{apxs}
15 BuildRequires: apache-devel
16 BuildRequires: libtool
17 BuildRequires: sed >= 4.0
18 Requires(post,preun): %{apxs}
19 Requires: apache >= 1.3.1
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22 %define _libexecdir %{_libdir}/apache
25 A binary compatibility alternative to Apache module mod_fastcgi.
26 mod_fcgid has a new process management strategy, which concentrates on
27 reducing the number of fastcgi server, and kick out the corrupt
28 fastcgi server as soon as possible.
31 Binarnie kompatybilna alternatywa dla modu³u Apache'a mod_fastcgi.
32 mod_fcgid to nowa strategia zarz±dzania procesami, koncentruj±ca siê
33 na redukcji liczby serwerów fastcgi i usuwaniu uszkodzonych serwerów
34 fastcgi najszybciej jak to mo¿liwe.
37 %setup -q -n mod_fcgid
40 sed -i -e 's#top_dir.*=.*#top_dir = %{_libexecdir}#g' Makefile
41 echo "INCLUDES=`apr-config --includes` `apu-config --includes` -I%{_includedir}/apache" >> Makefile
45 rm -rf $RPM_BUILD_ROOT
46 install -d $RPM_BUILD_ROOT{%{_libexecdir},%{_htmldocdir}}
47 install -d $RPM_BUILD_ROOT%{_sysconfdir}/httpd/httpd.conf
49 libtool --mode=install install mod_fcgid.la $RPM_BUILD_ROOT%{_libexecdir}
50 install %{SOURCE1} $RPM_BUILD_ROOT/%{_sysconfdir}/httpd/httpd.conf/70_mod_fcgid.conf
53 rm -rf $RPM_BUILD_ROOT
56 if [ -f /var/lock/subsys/httpd ]; then
57 /etc/rc.d/init.d/httpd restart 1>&2
59 echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache http daemon."
63 if [ "$1" = "0" ]; then
64 if [ -f /var/lock/subsys/httpd ]; then
65 /etc/rc.d/init.d/httpd restart 1>&2
70 %defattr(644,root,root,755)
72 %attr(755,root,root) %{_libexecdir}/*.so