Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37561337
en ru br
ALT Linux repos
5.0: 5.2.7.20080920-alt1.M50.1.1
4.1: 5.2.5-alt1.M41.3.6
4.0: 5.2.2-alt1

Group :: System/Servers
RPM: apache2-mod_php5

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

%define php5_sapi apache2-mod_php
%define so_file  mod_php5.so
%def_with interbase

Name: apache2-mod_php5
Version: %php5_version
Release: %php5_release.6

Summary: The PHP5 HTML-embedded scripting language for use with Apache2
Group: System/Servers
License: PHP
Url: http://www.php.net/
Packager: Konstantin Baev <kipruss at altlinux.org>

Prereq: php5 = %php5_version-%php5_release
Prereq: apache2-httpd-prefork >= %apache_version-%apache_release
Requires(post): apache2-httpd-prefork >= %apache_version-%apache_release
Requires: apache2

Conflicts: apache2-mod_php
Provides: php-engine = %php5_version-%php5_release

Source1: %name-php.conf
Source2: %name.service
Source3: php.ini
Source4: %name-browscap.ini
Source5: php.control

Patch0: php-5.2.1-sapi-mod_php.patch
Patch1: php-alt-namespace.patch

BuildRequires(pre): rpm-build-php5 apache2-devel
BuildRequires: php5-devel = %php5_version-%php5_release

# Automatically added by buildreq on Fri Jul 01 2005

BuildRequires: apache2-devel libmm-devel libxml2-devel zlib-devel libexpat-devel libpcre-devel

%if_with interbase
BuildRequires: firebird-devel
%endif

%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 mod_php 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
Apache2 web server.

%prep
%setup -T -c
%php5_sapi_prepare apache2handler
%patch0 -p1 -b .fix
%patch1 -p1 -b .fix1

%build
rm -f internal_functions.c

%apache_apxs \
 $(php-config --includes) \
 $(php-config --ldflags) %php5_optflags \
 $(php-config --libs) \
 -I. -I./include -I/usr/include/apache -Iext/date/lib -I/usr/include/libxml2 \
 -DUSE_TRANSFER_TABLES=1 \
 -lphp-%_php5_version \
 -o %so_file -c *.c

%install
%__mkdir_p \
%buildroot/%apache_addonconfdir \
%buildroot/%apache_moduledir \
%buildroot/%php5_servicedir/%php5_sapi \
%buildroot/%php5_sysconfdir/%php5_sapi/php.d \
%buildroot/%php5_sysconfdir/%php5_sapi/control.d \
%buildroot/%_sysconfdir/control.d/facilities

%__install -m 644 %SOURCE1 %buildroot/%apache_addonconfdir/A.%name.conf
%__install -m 700 %SOURCE2 %buildroot/%php5_servicedir/%php5_sapi/condrestart
%__install -m 644 %SOURCE3 %buildroot/%php5_sysconfdir/%php5_sapi/php.ini
%__install -m 644 %SOURCE4 %buildroot/%php5_sysconfdir/%php5_sapi/browscap.ini
%__install -m 755 %SOURCE5 %buildroot/%_sysconfdir/control.d/facilities/%name

%__cp .libs/%so_file %buildroot/%apache_moduledir

for f in \
%buildroot/%apache_addonconfdir/A.%name.conf \
%buildroot/%php5_sysconfdir/%php5_sapi/php.ini \
%buildroot/%_sysconfdir/control.d/facilities/%name
do
 %__subst 's, at SAPI at ,%php5_sapi,g' "$f"
 %__subst 's, at PHP_VERSION at ,%_php5_version,g' "$f"
 %__subst 's, at PHP_LIBDIR at ,%_libdir/php,g' "$f"
 %__subst 's, at HTDOCSDIR at ,%apache_htdocsdir,g' "$f"
 %__subst 's, at PHP_BROWSCAP at ,%php5_sysconfdir/%php5_sapi/browscap.ini,g' "$f"
 %__subst 's, at PHP_UPLOADDIR at ,%_spooldir/%a_name/uploads,g' "$f"
 %__subst 's, at PHP_SESSIONDIR at ,%_spooldir/%a_name/sessions,g' "$f"
 %__subst 's, at LIBDIR at ,%_libdir,g' "$f"
done

%post
%php5_sapi_postin
%php5_servicedir/%php5_sapi/condrestart

%preun
%php5_sapi_preun

%files
%_sysconfdir/control.d/facilities/*
%config(noreplace) %apache_addonconfdir/A.%name.conf
%dir %php5_sysconfdir/%php5_sapi
%dir %php5_sysconfdir/%php5_sapi/php.d
%dir %php5_sysconfdir/%php5_sapi/control.d
%config(noreplace) %php5_sysconfdir/%php5_sapi/php.ini
%config(noreplace) %php5_sysconfdir/%php5_sapi/browscap.ini
%php5_servicedir/%php5_sapi
%apache_moduledir/%so_file
%doc CREDITS

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin