Sophie

Sophie

distrib > Mandriva > 2006.0 > x86_64 > by-pkgid > c1c1588b144da82eba2911c2c937d99a > files > 2

apache1-mod_php5-1.3.33_5.0.4-1mdk.src.rpm

%define apache_version 1.3.33
%define php_version 5.0.4

Summary:	The PHP5 HTML-embedded scripting language for use with Apache
Name:		apache1-mod_php5
Version:	%{apache_version}_%{php_version}
Release:	1mdk
Group:		System/Servers
URL:		http://www.php.net/ 
License:	PHP License
Source1:	apache1-mod_php.conf
Prereq: 	perl
Prereq:		apache1 = %{apache_version}
Prereq:		apache1-base >= %{apache_version}
Requires:	php-ini
BuildRequires:	php-devel 
BuildRequires:	apache1-devel 
BuildRequires:	perl
BuildRequires:	db4-devel
BuildRoot:	%{_tmppath}/%{name}-%{version}-root

%description
PHP is an HTML-embedded scripting language.  PHP attempts to make it
easy for developers to write dynamically generated web pages.  PHP
also offers built-in database integration for several commercial
and non-commercial database management systems, so writing a
database-enabled web page with PHP is fairly simple.  The most
common use of PHP coding is probably as a replacement for CGI
scripts.  The %{name} module enables the Apache web server to
understand and process the embedded PHP language in web pages.

This package contains PHP version 5. You'll also need to install the
Apache web server.

%prep

%setup -c -T 
cp -dpR %{_usrsrc}/php-devel/sapi/apache/* .
cp -p %{_usrsrc}/php-devel/internal_functions.c .
cp -p %{_usrsrc}/php-devel/PHP_FAQ.php .

%build

%{_sbindir}/apache1-apxs -c -I. -I -I./main \
    `php-config --includes` \
    -I%{_usrsrc}/php-devel \
    -I%{_includedir}/libxml2 \
    -lphp5_common -lpthread -lgdbm -lmm \
    -DHAVE_AP_COMPAT_H \
    php_apache.c sapi_apache.c mod_php5.c internal_functions.c -o mod_php5.so

%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot} 

install -d %{buildroot}%{_sysconfdir}/apache1/modules.d
install -d %{buildroot}%{_libdir}/apache1

install -m0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/apache1/modules.d/11_php.conf
install -m0755 mod_php5.so %{buildroot}%{_libdir}/apache1/

%post
if [ -f %{_var}/lock/subsys/apache1 ]; then
    %{_initrddir}/apache1 restart 1>&2;
fi

%postun
if [ "$1" = "0" ]; then
    if [ -f %{_var}/lock/subsys/apache1 ]; then
	%{_initrddir}/apache1 restart 1>&2
    fi
fi
					 
%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%files 
%defattr(-,root,root)
%doc PHP_FAQ.php
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/apache1/modules.d/11_php.conf
%attr(0755,root,root) %{_libdir}/apache1/mod_php5.so

%changelog
* Sun Jun 05 2005 Oden Eriksson <oeriksson@mandriva.com> 1.3.33_5.0.4-1mdk
- initial Mandriva package