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
8 Group: Networking/Daemons
9 Source0: http://fastcgi.coremail.cn/mod_fcgid.%{version}.tar.gz
10 # Source0-md5: 1bfdf0274caf9ecaee089e4b3f70326e
11 Source1: 70_mod_fastcgi.conf
12 URL: http://fastcgi.coremail.cn/
13 BuildRequires: %{apxs}
14 BuildRequires: apache-devel
15 BuildRequires: libtool
16 Requires(post,preun): %{apxs}
17 Requires: apache >= 1.3.1
18 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20 %define _libexecdir %{_libdir}/apache
23 A binary compatibility alternative to Apache module mod_fastcgi.
24 mod_fcgid has a new process management strategy, which concentrates on
25 reducing the number of fastcgi server, and kick out the corrupt
26 fastcgi server as soon as possible.
29 %setup -q -n mod_fcgid
32 sed -i -e 's#top_dir.*=.*#top_dir = %{_libexecdir}#g' Makefile
33 echo "INCLUDES=`apr-config --includes` `apu-config --includes` -I%{_includedir}/apache" >> Makefile
37 rm -rf $RPM_BUILD_ROOT
38 install -d $RPM_BUILD_ROOT{%{_libexecdir},%{_htmldocdir}}
39 install -d $RPM_BUILD_ROOT%{_sysconfdir}/httpd/httpd.conf
41 libtool --mode=install install mod_fcgid.la $RPM_BUILD_ROOT%{_libexecdir}
42 install %{SOURCE1} $RPM_BUILD_ROOT/%{_sysconfdir}/httpd/httpd.conf/70_mod_fcgid.conf
45 rm -rf $RPM_BUILD_ROOT
48 if [ -f /var/lock/subsys/httpd ]; then
49 /etc/rc.d/init.d/httpd restart 1>&2
51 echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache http daemon."
55 if [ "$1" = "0" ]; then
56 if [ -f /var/lock/subsys/httpd ]; then
57 /etc/rc.d/init.d/httpd restart 1>&2
62 %defattr(644,root,root,755)
64 %attr(755,root,root) %{_libexecdir}/*.so