/[packages]/cauldron/apache-mod_php/current/SPECS/apache-mod_php.spec
ViewVC logotype

Contents of /cauldron/apache-mod_php/current/SPECS/apache-mod_php.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 68071 - (show annotations) (download)
Fri Mar 11 00:43:57 2011 UTC (13 years, 1 month ago) by misc
File size: 3885 byte(s)
- simplify the spec

1 #Module-Specific definitions
2 %define mod_name mod_php
3 %define mod_conf 70_%{mod_name}.conf
4 %define mod_so %{mod_name}5.so
5
6 %define epoch 3
7 %define major 5
8 %define libname %mklibname php5_common %{major}
9 %define apache_version 2.2.8
10 %define php_version %{version}
11
12 Summary: The PHP5 HTML-embedded scripting language for use with apache
13 Name: apache-%{mod_name}
14 Version: 5.3.5
15 Release: %mkrel 1
16 Group: System/Servers
17 License: PHP License
18 URL: http://www.php.net/
19 Source1: %{mod_conf}
20 Requires(pre): rpm-helper
21 Requires(postun): rpm-helper
22 Requires: %{libname} >= %{epoch}:%{php_version}
23 Requires: apache-base >= %{apache_version}
24 Requires: apache-conf >= %{apache_version}
25 Requires: apache-modules >= %{apache_version}
26 Requires: apache-mpm >= %{apache_version}
27 Requires: php-ctype >= %{epoch}:%{php_version}
28 Requires: php-filter >= %{epoch}:%{php_version}
29 Requires: php-ftp >= %{epoch}:%{php_version}
30 Requires: php-gettext >= %{epoch}:%{php_version}
31 Requires: php-hash >= %{epoch}:%{php_version}
32 Requires: php-ini >= %{php_version}
33 Requires: php-json >= %{epoch}:%{php_version}
34 Requires: php-openssl >= %{epoch}:%{version}
35 Requires: php-pcre >= %{epoch}:%{php_version}
36 Requires: php-posix >= %{epoch}:%{php_version}
37 Requires: php-session >= %{epoch}:%{php_version}
38 Suggests: php-suhosin >= 0.9.29
39 Requires: php-sysvsem >= %{epoch}:%{php_version}
40 Requires: php-sysvshm >= %{epoch}:%{php_version}
41 Requires: php-tokenizer >= %{epoch}:%{php_version}
42 Requires: php-xmlreader >= %{epoch}:%{php_version}
43 Requires: php-xmlwriter >= %{epoch}:%{php_version}
44 Requires: php-zlib >= %{epoch}:%{php_version}
45 Requires: php-xml >= %{epoch}:%{version}
46 BuildRequires: apache-devel >= %{apache_version}
47 BuildRequires: php-devel >= %{epoch}:%{php_version}
48 BuildRequires: dos2unix
49 Provides: php mod_php
50 Obsoletes: php mod_php
51 Conflicts: apache-mpm-worker >= %{apache_version}
52 Conflicts: apache-mpm-event >= %{apache_version}
53 Requires: php-timezonedb >= 3:2009.10
54 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
55 Epoch: %{epoch}
56
57 %description
58 PHP5 is an HTML-embedded scripting language. PHP5 attempts to make it easy for
59 developers to write dynamically generated web pages. PHP5 also offers built-in
60 database integration for several commercial and non-commercial database
61 management systems, so writing a database-enabled web page with PHP5 is fairly
62 simple. The most common use of PHP coding is probably as a replacement for CGI
63 scripts. The %{name} module enables the apache web server to understand and
64 process the embedded PHP language in web pages.
65
66 This package contains PHP version 5. You'll also need to install the apache web
67 server.
68
69 %prep
70
71 %setup -c -T
72 cp -dpR %{_usrsrc}/php-devel/sapi/apache2handler/* .
73 cp %{_usrsrc}/php-devel/internal_functions.c .
74 cp %{_includedir}/php/ext/date/lib/timelib_config.h .
75
76 # strip away annoying ^M
77 find -type f -exec dos2unix -U {} \;
78
79 cp %{SOURCE1} %{mod_conf}
80
81 %build
82
83 %{_sbindir}/apxs \
84 `php-config --includes` \
85 `apr-1-config --link-ld --libs` \
86 `xml2-config --cflags` \
87 -I%{_usrsrc}/php-devel \
88 -I. -lphp5_common \
89 -c mod_php5.c sapi_apache2.c apache_config.c \
90 php_functions.c internal_functions.c
91
92 %install
93 rm -rf %{buildroot}
94
95 install -d %{buildroot}%{_libdir}/apache-extramodules
96 install -d %{buildroot}%{_sysconfdir}/httpd/modules.d
97
98 install -m0755 .libs/*.so %{buildroot}%{_libdir}/apache-extramodules/
99 install -m0644 %{mod_conf} %{buildroot}%{_sysconfdir}/httpd/modules.d/%{mod_conf}
100
101 %post
102 if [ -f %{_var}/lock/subsys/httpd ]; then
103 %{_initrddir}/httpd restart 1>&2;
104 fi
105
106 %postun
107 if [ "$1" = "0" ]; then
108 if [ -f %{_var}/lock/subsys/httpd ]; then
109 %{_initrddir}/httpd restart 1>&2
110 fi
111 fi
112
113 %clean
114 rm -rf %{buildroot}
115
116 %files
117 %defattr(-,root,root)
118 %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/%{mod_conf}
119 %attr(0755,root,root) %{_libdir}/apache-extramodules/%{mod_so}
120
121

  ViewVC Help
Powered by ViewVC 1.1.30