]> git.pld-linux.org Git - packages/apache-mod_fcgid.git/blob - apache-mod_fcgid.spec
92f0232239baeb09c721ab664b482fb9c7657f19
[packages/apache-mod_fcgid.git] / apache-mod_fcgid.spec
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 Name:           apache-mod_fcgid
5 Version:        0.7
6 Release:        1
7 License:        distributable
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)
19
20 %define         _libexecdir     %{_libdir}/apache
21
22 %description
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.
27
28 %prep
29 %setup -q -n mod_fcgid
30
31 %build
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
34 %{__make}
35
36 %install
37 rm -rf $RPM_BUILD_ROOT
38 install -d $RPM_BUILD_ROOT{%{_libexecdir},%{_htmldocdir}}
39 install -d $RPM_BUILD_ROOT%{_sysconfdir}/httpd/httpd.conf
40
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
43
44 %clean
45 rm -rf $RPM_BUILD_ROOT
46
47 %post
48 if [ -f /var/lock/subsys/httpd ]; then
49         /etc/rc.d/init.d/httpd restart 1>&2
50 else
51         echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache http daemon."
52 fi
53
54 %preun
55 if [ "$1" = "0" ]; then
56         if [ -f /var/lock/subsys/httpd ]; then
57                 /etc/rc.d/init.d/httpd restart 1>&2
58         fi
59 fi
60
61 %files
62 %defattr(644,root,root,755)
63 %doc AUTHOR ChangeLog
64 %attr(755,root,root) %{_libexecdir}/*.so
This page took 0.057123 seconds and 2 git commands to generate.