/[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 68078 - (show annotations) (download)
Fri Mar 11 00:46:42 2011 UTC (13 years, 3 months ago) by misc
File size: 3753 byte(s)
- do not requires all apache packages, they are already pulled by apache-mpm 

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

  ViewVC Help
Powered by ViewVC 1.1.30