Summary: The PHP HTML-embedded scripting language for use with Apache.
Name: php
Version: 4.0.1pl2
Release: 1
Group: System Environment/Daemons
URL: http://www.php.net/
Source0: http://www.php.net/distributions/php-%{version}.tar.gz
Source1: http://www.php.net/distributions/manual.tar.gz
#Icon: php3.gif
Copyright: PHP
BuildRoot: %{_tmppath}/%{name}-root
Prereq: webserver
Obsoletes: mod_php3, php-mysql
BuildPrereq: apache-devel
%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 4.0. If you use applications which
specifically rely on PHP/FI (PHP v2 and earlier), you should instead
install the PHP/FI module contained in the phpfi package. If you're
just starting with PHP, you should install this package. You'll also
need to install the Apache web server.
%package manual
Obsoletes: mod_php3-manual
Group: System Environment/Daemons
Summary: The manual for PHP4, in HTML format.
Prereq: php = %{version}
%description manual
The php-manual package provides comprehensive documentation for the
PHP4 HTML-embedded scripting language, in HTML format.
%package pgsql
Group: System Environment/Daemons
Prereq: php = %{version}
Summary: A PostgreSQL database module for PHP4.
Prereq: /usr/bin/perl
Provides: php_database
Obsoletes: mod_php3-pgsql
BuildPrereq: postgresql-devel
%description pgsql
The php-pgsql package includes a dynamic shared object (DSO) that can
be compiled in to the Apache Web server to add PostgreSQL database
support to PHP4. PostgreSQL is an object-relational database
management system that supports almost all SQL constructs. PHP is an
HTML-embedded scripting language. If you need back-end support for
PostgreSQL, you should install this package in addition to the main
php package.
%package imap
Group: System Environment/Daemons
Prereq: php = %{version}
Requires: krb5-libs, pam
Obsoletes: mod_php3-imap
Prereq: /usr/bin/perl
Summary: An IMAP module for PHP4.
#BuildPrereq: imap-devel
%description imap
The php-imap package contains a dynamic shared object (DSO) for the
Apache Web server. The php-imap module, when compiled into Apache,
that will add IMAP (Internet Message Access Protocol) support to
PHP4. IMAP is a protocol for retrieving and uploading e-mail messages
on mail servers. PHP is an HTML-embedded scripting language for use
with Apache. If you need IMAP support for PHP4 applications, you will
need to install this package and PHP4.
%package ldap
Group: System Environment/Daemons
Prereq: php = %{version}
Summary: An Apache Web server module for PHP4 applications that use LDAP.
#BuildPrereq: openldap-devel
%description ldap
The php-ldap package is a dynamic shared object (DSO) for the Apache
Web server that adds Lightweight Directory Access Protocol (LDAP)
support to PHP4. LDAP is a set of protocols for accessing directory
services over the Internet. PHP4 is an HTML-embedded scripting
language. If you need LDAP support for PHP4 applications, you will
need to install this package in addition to the php package.
%prep
%setup -q
mkdir manual
/bin/gzip -dc %{SOURCE1} | tar -xf - -C manual
cp Zend/LICENSE Zend/ZEND_LICENSE
%build
CC="%{__cc} -fPIC"
export CC
%configure \
--disable-debug \
--enable-pic \
--with-apxs=%{_prefix}/sbin/apxs \
--with-config-file-path=/etc/httpd \
--with-exec-dir=%{_prefix}/bin \
--with-regex=system \
--with-gettext \
--with-gd \
--with-jpeg-dir=%{_prefix} \
--with-png \
--with-zlib \
--with-db2 \
--with-db3 \
--with-gdbm \
--enable-debugger \
--enable-magic-quotes \
--enable-safe-mode \
--enable-sysvsem \
--enable-sysvshm \
--enable-track-vars \
--enable-yp \
--enable-ftp \
--without-mysql \
--with-pgsql=/usr \
--with-xml
make
build_ext() {
%{__cc} -fPIC -shared $RPM_OPT_FLAGS -DHAVE_CONFIG_H -DCOMPILE_DL=1 -I.\
-I. -I`apxs -q INCLUDEDIR` -I./Zend -I./main\
-I/usr/include/freetype -I/usr/include/$1 \
-I./ext/$1 -I./ext/$1/lib$1 \
-I./ext/xml/expat/xmltok -I./ext/xml/expat/xmlparse \
-DHAVE_CONFIG_H `grep ^CPPFLAGS Zend/Makefile | cut -f2- -d=` \
$4 $2 -o $1.so $3
}
%{!?nokerberos:kerbflags="-L/usr/kerberos/lib -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err"}
#build_ext imap ext/imap/php_imap.c "/usr/lib/c-client.a $kerbflags"
#build_ext ldap ext/ldap/ldap.c "-lldap -llber"
#build_ext pgsql ext/pgsql/pgsql.c "-lpq" -DHAVE_PQCMDTUPLES
%install
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/lib/php4
mkdir -p $RPM_BUILD_ROOT/usr/lib/apache
mkdir -p $RPM_BUILD_ROOT/etc/httpd
mkdir -p $RPM_BUILD_ROOT/home/httpd/icons
mkdir -p $RPM_BUILD_ROOT/usr/bin
install -m 755 -s .libs/libphp4.so $RPM_BUILD_ROOT/usr/lib/apache/
#install -m 755 -s pgsql.so $RPM_BUILD_ROOT/usr/lib/php4/
#install -m 755 -s imap.so $RPM_BUILD_ROOT/usr/lib/php4/
#install -m 755 -s ldap.so $RPM_BUILD_ROOT/usr/lib/php4/
install -m 644 php.ini-dist $RPM_BUILD_ROOT/etc/httpd/php.ini
install -m 644 *.gif $RPM_BUILD_ROOT/home/httpd/icons/
# manual
mkdir -p $RPM_BUILD_ROOT/home/httpd/html/manual/mod/mod_php4
cp manual/*.html $RPM_BUILD_ROOT/home/httpd/html/manual/mod/mod_php4
ln -s manual.html $RPM_BUILD_ROOT/home/httpd/html/manual/mod/mod_php4/index.html
%clean
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
%triggerpostun -- php <= 3.0.15-1
perl -pi -e 's|^#LoadModule php3_module|LoadModule php3_module|g' \
/etc/httpd/conf/httpd.conf
perl -pi -e 's|^#AddModule mod_php3.c|AddModule mod_php3.c|g' \
/etc/httpd/conf/httpd.conf
%files
%defattr(-,root,root)
/usr/lib/apache/libphp4.so
%config /etc/httpd/php.ini
/home/httpd/icons/*
%doc CODING_STANDARDS CREDITS FUNCTION_LIST.txt INSTALL LICENSE MAINTAINERS
%doc MODULES_STATUS NEWS README.* Zend/ZEND_*
#%files pgsql
#%defattr(-,root,root)
#/usr/lib/php4/pgsql.so
#%files imap
#%defattr(-,root,root)
#/usr/lib/php4/imap.so
#%files ldap
#%defattr(-,root,root)
#/usr/lib/php4/ldap.so
%files manual
%defattr(-,root,root)
/home/httpd/html/manual/mod/mod_php4
%changelog
* Sat Jul 29 2000 Dobrica Pavlinusic
- build php staticly (no modules) with PostgreSQL support
* Tue May 23 2000 Nalin Dahyabhai
- change license from "GPL" to "PHP"
- add URL: tag
- disable mysql support by default (license not specified)
* Mon May 22 2000 Nalin Dahyabhai
- update to PHP 4.0.0
- nuke the -mysql subpackage (php comes with a bundled mysql client lib now)
* Tue May 16 2000 Nalin Dahyabhai
- link IMAP module against GSS-API and PAM to get dependencies right
- change most of the Requires to Prereqs, because the post edits config files
- move the PHP *Apache* module back to the right directory
- fix broken postun trigger that broke the post
- change most of the postuns to preuns in case php gets removed before subpkgs
* Thu May 11 2000 Trond Eivind Glomsrød
- rebuilt against new postgres libraries
* Tue May 09 2000 Preston Brown
- php3 .so modules moved to /usr/lib/php3 from /usr/lib/apache (was incorrect)
* Mon Apr 10 2000 Nalin Dahyabhai
- make subpackages require php = %{version} (bug #10671)
* Thu Apr 06 2000 Nalin Dahyabhai
- update to 3.0.16
* Fri Mar 03 2000 Cristian Gafton
- fixed the post script to work when upgrading a package
- add triggere to fix the older packages
* Tue Feb 29 2000 Nalin Dahyabhai
- update to 3.0.15
- add build-time dependency for openldap-devel
- enable db,ftp,shm,sem support to fix bug #9648
* Fri Feb 25 2000 Nalin Dahyabhai
- add dependency for imap subpackage
- rebuild against Apache 1.3.12
* Thu Feb 24 2000 Preston Brown
- don't include old, outdated manual. package one from the php distribution.
* Tue Feb 01 2000 Cristian Gafton
- rebuild to fix dependency problem
* Fri Jan 14 2000 Preston Brown
- added commented out mysql module, thanks to Jason Duerstock
(jason@sdi.cluephone.com). Uncomment to build if you have mysql installed.
* Thu Jan 13 2000 Preston Brown
- rely on imap-devel, don't include imap in src.rpm (#5099).
- xml enabled (#5393)
* Tue Nov 02 1999 Preston Brown
- added post/postun sections to modify httpd.conf (#5259)
- removed old obsolete faq and gif (#5260)
- updated manual.tar.gz package (#5261)
* Thu Oct 07 1999 Matt Wilson
- rebuilt for sparc glibc brokenness
* Fri Sep 24 1999 Preston Brown
- --with-apxs --> --with-apxs=/usr/sbin/apxs (# 5094)
- ldap support (# 5097)
* Thu Sep 23 1999 Preston Brown
- fix cmdtuples for postgresql, I had it slightly wrong
* Tue Aug 31 1999 Bill Nottingham
- subpackages must obsolete old stuff...
* Sun Aug 29 1999 Preston Brown
- added -DHAVE_PGCMDTUPLES for postgresql module (bug # 4767)
* Fri Aug 27 1999 Preston Brown
- name change to php to follow real name of package
- fix up references to php3 to refer to php
- upgrade to 3.0.12
- fixed typo in pgsql postun script (bug # 4686)
* Mon Jun 14 1999 Preston Brown
- upgraded to 3.0.9
- fixed postgresql module and made separate package
- separated manual into separate documentation package
* Mon May 24 1999 Preston Brown
- upgraded to 3.0.8, which fixes problems with glibc 2.1.
- took some ideas grom Gomez's RPM.
* Tue May 04 1999 Preston Brown
- hacked in imap support in an ugly way until imap gets an official
shared library implementation
* Fri Apr 16 1999 Preston Brown
- pick up php3.ini
* Wed Mar 24 1999 Preston Brown
- build against apache 1.3.6
* Sun Mar 21 1999 Cristian Gafton
- auto rebuild in the new build environment (release 2)
* Mon Mar 08 1999 Preston Brown
- upgraded to 3.0.7.
* Wed Feb 24 1999 Preston Brown
- Injected new description and group.
* Sun Feb 07 1999 Preston Brown
- upgrade to php 3.0.6, built against apache 1.3.4
* Mon Oct 12 1998 Cristian Gafton
- rebuild for apache 1.3.3
* Thu Oct 08 1998 Preston Brown
- updated to 3.0.5, fixes nasty bugs in 3.0.4.
* Sun Sep 27 1998 Cristian Gafton
- updated to 3.0.4 and recompiled for apache 1.3.2
* Thu Sep 03 1998 Preston Brown
- improvements; builds with apache-devel package installed.
* Tue Sep 01 1998 Preston Brown
- Made initial cut for PHP3.