]> git.pld-linux.org Git - packages/apache-php-fcgi.git/blame - apache-php-fcgi.spec
- virtual package providing php5 to apache1 via fcgi
[packages/apache-php-fcgi.git] / apache-php-fcgi.spec
CommitLineData
0854e400
ER
1%define apxs /usr/sbin/apxs1
2Summary: Support for the PHP via FastCGI protocol for Apache webserver
3Name: apache1-php-fcgi
4Version: 5.2.6
5Release: 1
6License: GPL
7Group: Applications/WWW
8BuildRequires: apache1-devel >= 1.3.39
9BuildRequires: rpmbuild(macros) >= 1.268
10Requires: apache1-mod_fastcgi
11Requires: php-fcgi >= 4:%{version}
12Requires: php-fcgi-init
13Provides: webserver(php) = %{version}
14BuildArch: noarch
15BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
16
17%define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)
18%define fcgiapp /usr/bin/php.fcgi
19
20%description
21This virtual package provides support for the PHP via FastCGI
22protocol.
23
24%prep
25%setup -qcT
26
27cat <<'EOF' > apache.conf
28# setup via fastcgi to run php5
29<IfModule mod_fastcgi.c>
30 # the server name is bogus actually, to satisfy mod_fastcgi
31 FastCgiExternalServer %{fcgiapp} -socket /var/run/php/fcgi.sock
32 ScriptAlias /php-fcgi %{fcgiapp}
33 <Location "/php-fcgi">
34 SetHandler fastcgi-script
35 Allow from all
36 </Location>
37
38 Action application/x-httpd-php-fcgi /php-fcgi
39</IfModule>
40
41# To register handler for .php in your config context:
42#<IfModule mod_fastcgi.c>
43# AddType application/x-httpd-php-fcgi .php
44#</IfModule>
45EOF
46
47%install
48rm -rf $RPM_BUILD_ROOT
49install -d $RPM_BUILD_ROOT%{_sysconfdir}/conf.d
50cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_php-fcgi.conf
51
52%clean
53rm -rf $RPM_BUILD_ROOT
54
55%post
56%service -q apache restart
57
58%postun
59if [ "$1" = "0" ]; then
60 %service -q apache restart
61fi
62
63%files
64%defattr(644,root,root,755)
65%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_php-fcgi.conf
This page took 0.069204 seconds and 4 git commands to generate.