# Use --define 'nossl 1' on the command line to disable SSL detection %{!?nossl:%define SSL 1} %{?nossl:%define SSL 0} %define ssldir %{_prefix} Summary: The PHP scripting language. Name: php Version: 4.0.6 Release: 5%{!?nossl:ssl} Group: Development/Languages URL: http://www.php.net/ Source0: http://www.php.net/distributions/php-%{version}.tar.gz Source1: http://www.php.net/manual/en/manual.tar.gz Source2: php-%{version}.imp Patch1: php-%{version}-conf.patch Patch2: php-%{version}-alloca.patch Patch3: php-%{version}-rfc1867.patch Copyright: PHP BuildRoot: %{_tmppath}/%{name}-root Obsoletes: mod_php, php3, phpfi BuildPrereq: apache-devel BuildConflicts: apache == 1.*-*ssl %if %{SSL} == 1 BuildPrereq: openssl %endif Prefix: %{_prefix} %ifarch ia64 %define stdlib lib/ia64l32 %define liblink ../../.. %define DEFCCIA cc %define DEFCC %{DEFCCIA} %else %define stdlib lib %define liblink ../.. %define DEFCC cc %endif %define contentdir %{prefix}/share/%{name}-%{version} %description PHP is an HTML-embeddable scripting language. PHP offers built-in database integration for several commercial and non-commercial database management systems, so writing a database-enabled script with PHP is fairly simple. The most common use of PHP coding is probably as a replacement for CGI scripts. %package devel Group: Development/Libraries Summary: Files needed for building PHP extensions. %description devel The php-devel package contains the files needed for building PHP extensions. If you need to compile your own PHP extensions, you will need to install this package. %package manual Obsoletes: mod_php3-manual Group: Documentation Summary: The PHP manual, in HTML format. Prereq: php = %{version} %description manual The php-manual package provides comprehensive documentation for the PHP HTML-embedded scripting language, in HTML format. %prep %setup -q %ifarch ppc %patch1 -p1 -b .confpatch %endif %patch2 -p1 -b .allocapatch %patch3 -p1 -b .rfc1867 # get import file for AIX cp $RPM_SOURCE_DIR/php-%{version}.imp $RPM_BUILD_DIR/%{name}-%{version}/php.imp mkdir manual gzip -dc %{SOURCE1} | tar -xf - -C manual cp Zend/LICENSE Zend/ZEND_LICENSE %build # Use the default compiler for this platform - gcc otherwise if [[ -z "$CC" ]] then if test "X`type %{DEFCC} 2>/dev/null`" != 'X'; then export CC=%{DEFCC} else export CC=gcc fi fi if test "X$CC" != "Xgcc" then export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's:-fsigned-char::'` export CFLAGS="$RPM_OPT_FLAGS" fi # A basic configure and make ./configure --prefix=%{prefix} --with-apxs --with-mysql \ --with-config-file-path=/etc/opt/freeware/apache --with-ftp \ --with-zlib --with-system-regex \ --without-xml --with-ftp \ %if %{SSL} == 1 --with-ssl %endif make %install [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT for dir in Zend TSRM main regex ext/standard ; do mkdir -p $RPM_BUILD_ROOT%{_prefix}/include/php/$dir cd $dir cp -p *.h $RPM_BUILD_ROOT%{_prefix}/include/php/$dir cd - done cp -p *.h $RPM_BUILD_ROOT%{_prefix}/include/php mkdir -p $RPM_BUILD_ROOT%{_prefix}/apache/libexec cp .libs/libphp4.so.0 $RPM_BUILD_ROOT%{_prefix}/apache/libexec/libphp4.so chmod 755 $RPM_BUILD_ROOT%{_prefix}/apache/libexec/libphp4.so mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/php/extensions/no-debug-non-zts-20001214 ./build/shtool mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/php/Benchmark ./build/shtool mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/php/Crypt ./build/shtool mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/php/Date ./build/shtool mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/php/DB ./build/shtool mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/php/File ./build/shtool mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/php/HTML ./build/shtool mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/php/Mail ./build/shtool mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/php/Net ./build/shtool mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/php/Payment ./build/shtool mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/php/PEAR ./build/shtool mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/php/XML ./build/shtool mkdir -p $RPM_BUILD_ROOT%{_prefix}/bin ./build/shtool mkdir -p $RPM_BUILD_ROOT/etc%{_prefix}/apache ./build/shtool install -c -m 644 ./pear/Benchmark/Iterate.php $RPM_BUILD_ROOT%{_prefix}/lib/php/Benchmark/ ./build/shtool install -c -m 644 ./pear/Benchmark/Timer.php $RPM_BUILD_ROOT%{_prefix}/lib/php/Benchmark/ ./build/shtool install -c -m 644 ./pear/Crypt/HCEMD5.php $RPM_BUILD_ROOT%{_prefix}/lib/php/Crypt/ ./build/shtool install -c -m 644 ./pear/Date/Calc.php $RPM_BUILD_ROOT%{_prefix}/lib/php/Date/ ./build/shtool install -c -m 644 ./pear/DB.php $RPM_BUILD_ROOT%{_prefix}/lib/php/ ./build/shtool install -c -m 644 ./pear/DB/common.php $RPM_BUILD_ROOT%{_prefix}/lib/php/DB/ ./build/shtool install -c -m 644 ./pear/DB/ibase.php $RPM_BUILD_ROOT%{_prefix}/lib/php/DB/ ./build/shtool install -c -m 644 ./pear/DB/msql.php $RPM_BUILD_ROOT%{_prefix}/lib/php/DB/ ./build/shtool install -c -m 644 ./pear/DB/mssql.php $RPM_BUILD_ROOT%{_prefix}/lib/php/DB/ ./build/shtool install -c -m 644 ./pear/DB/mysql.php $RPM_BUILD_ROOT%{_prefix}/lib/php/DB/ ./build/shtool install -c -m 644 ./pear/DB/oci8.php $RPM_BUILD_ROOT%{_prefix}/lib/php/DB/ ./build/shtool install -c -m 644 ./pear/DB/odbc.php $RPM_BUILD_ROOT%{_prefix}/lib/php/DB/ ./build/shtool install -c -m 644 ./pear/DB/pgsql.php $RPM_BUILD_ROOT%{_prefix}/lib/php/DB/ ./build/shtool install -c -m 644 ./pear/DB/storage.php $RPM_BUILD_ROOT%{_prefix}/lib/php/DB/ ./build/shtool install -c -m 644 ./pear/DB/sybase.php $RPM_BUILD_ROOT%{_prefix}/lib/php/DB/ ./build/shtool install -c -m 644 ./pear/File/Find.php $RPM_BUILD_ROOT%{_prefix}/lib/php/File/ ./build/shtool install -c -m 644 ./pear/File/SearchReplace.php $RPM_BUILD_ROOT%{_prefix}/lib/php/File/ ./build/shtool install -c -m 644 ./pear/HTML/Form.php $RPM_BUILD_ROOT%{_prefix}/lib/php/HTML/ ./build/shtool install -c -m 644 ./pear/HTTP.php $RPM_BUILD_ROOT%{_prefix}/lib/php/ ./build/shtool install -c -m 644 ./pear/Mail.php $RPM_BUILD_ROOT%{_prefix}/lib/php/ ./build/shtool install -c -m 644 ./pear/Mail/sendmail.php $RPM_BUILD_ROOT%{_prefix}/lib/php/Mail/ ./build/shtool install -c -m 644 ./pear/Mail/smtp.php $RPM_BUILD_ROOT%{_prefix}/lib/php/Mail/ ./build/shtool install -c -m 644 ./pear/Net/SMTP.php $RPM_BUILD_ROOT%{_prefix}/lib/php/Net/ ./build/shtool install -c -m 644 ./pear/Net/Socket.php $RPM_BUILD_ROOT%{_prefix}/lib/php/Net/ ./build/shtool install -c -m 644 ./pear/PEAR/Installer.php $RPM_BUILD_ROOT%{_prefix}/lib/php/PEAR/ ./build/shtool install -c -m 644 ./pear/Payment/Verisign.php $RPM_BUILD_ROOT%{_prefix}/lib/php/Payment/ ./build/shtool install -c -m 644 ./pear/XML/Parser.php $RPM_BUILD_ROOT%{_prefix}/lib/php/XML/ ./build/shtool install -c -m 644 ./pear/PEAR.php $RPM_BUILD_ROOT%{_prefix}/lib/php ./build/shtool install -c -m 755 ./pear/scripts/phpextdist $RPM_BUILD_ROOT%{_prefix}/bin/phpextdist ./build/shtool install -c -m 644 ./php.ini-dist $RPM_BUILD_ROOT/etc%{_prefix}/apache/php.ini ./build/shtool mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/php/build cp pear/pear.m4 build/fastgen.sh build/library.mk build/ltlib.mk \ build/mkdep.awk build/program.mk build/rules.mk build/rules_common.mk \ build/rules_pear.mk build/dynlib.mk build/shtool dynlib.m4 acinclude.m4 \ $RPM_BUILD_ROOT%{_prefix}/lib/php/build cd pear for prog in phpize php-config pear; do ../build/shtool install -c -m 755 scripts/$prog $RPM_BUILD_ROOT%{_prefix}/bin/$prog done cd - # manual mkdir -p $RPM_BUILD_ROOT%{contentdir}/icons install -m 644 *.gif $RPM_BUILD_ROOT%{contentdir}/icons/ mkdir -p $RPM_BUILD_ROOT%{contentdir}/html/manual/mod/mod_php4 cd manual rm -rf CVS ls | /usr/bin/xargs -I{} cp {} $RPM_BUILD_ROOT%{contentdir}/html/manual/mod/mod_php4 cd - %clean [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT %post echo "The php4 module is now installed. For Apache, you will need to add the" echo "module to your /etc/opt/freeware/apache/httpd.conf file, e.g.:" echo "LoadModule php4_module libexec/libphp4.so" echo " and" echo "AddModule mod_php4.c" perl -pi -e 's|#AddType application/x-httpd-php .php|AddType application/x-httpd-php .php|g' \ /etc/opt/freeware/apache/httpd.conf perl -pi -e 's|#AddType application/x-httpd-php-source .phps|AddType application/x-httpd-php-source .phps|g' \ /etc/opt/freeware/apache/httpd.conf %ifos Skip_this %postun # # I don't like this personally, let's comment this out. # If other people want it to keep doing this, we can always put it back. # perl -pi -e 's|AddType application/x-httpd-php .php|#AddType application/x-httpd-php .php|g' \ /etc/opt/freeware/apache/httpd.conf perl -pi -e 's|AddType application/x-httpd-php-source .phps|#AddType application/x-httpd-php-source .phps|g' \ /etc/opt/freeware/apache/httpd.conf %endif %files %defattr(-,root,root) %doc CODING_STANDARDS CREDITS INSTALL LICENSE %doc NEWS README.* Zend/ZEND_* %config /etc/%{prefix}/apache/php.ini %{prefix}/apache/libexec/libphp4.so %files devel %defattr(-,root,root) %{_bindir}/php-config %{_bindir}/phpize %{_bindir}/phpextdist %{_includedir}/php %{_libdir}/php/build %files manual %defattr(-,root,root) %{contentdir}/icons/* %{contentdir}/html/manual/mod/mod_php4 %changelog * Fri Apr 26 2002 David Clissold - The ext/xml subdirectory is GPL, but PHP is distributed under the - PHP license. GPL does not allow that. Removed all of ext/xml - from the tar image and am building --without-xml. * Wed Feb 27 2002 David Clissold - Add security patch posted today on php.net * Mon Sep 17 2001 David Clissold - Add a build conflict with the non-ssl apache. - Now build with --with-mysql * Wed Sep 05 2001 David Clissold - Update to version 4.0.6. - Now build with --with-mysql * Thu Jul 12 2001 Marc Stephenson - Fix typo in contentdir definition for manuals - Put manuals under %{prefix}/share * Tue Jul 10 2001 David Clissold - The php-%{version}-conf.patch was only being included in the SRPM - when built on 'ppc' platform. (We only want it applied on ppc, but - should always be included in the source). * Thu Jun 07 2001 David Clissold - update to version 4.0.5. Add the php.ini file and some addt'l - configure options to more closely match RedHat's PHP build. - Also, build with gcc; otherwise include and require does not - work, for some reason. * Mon Mar 26 2001 David Clissold - simplify and rework file for AIX 4.3. * Fri Mar 2 2001 Nalin Dahyabhai - rebuild in new environment * Fri Feb 23 2001 Nalin Dahyabhai - obsolete the old phpfi (PHP 2.x) package * Thu Feb 8 2001 Nalin Dahyabhai - add a commented-out curl extension to the config file (part of #24933) - fix the PEAR-installation-directory-not-being-eval'ed problem (#24938) - find the right starting point for multipart form data (#24933) * Tue Jan 30 2001 Nalin Dahyabhai - aaarrgh, the fix breaks something else, aaarrgh; revert it (#24933) - terminate variable names at the right place (#24933) * Sat Jan 20 2001 Nalin Dahyabhai - tweak the fix some more * Thu Jan 18 2001 Nalin Dahyabhai - extract stas's fix for quoting problems from CVS for testing - tweak the fix, ask the PHP folks about the tweak - tweak the fix some more * Wed Jan 17 2001 Nalin Dahyabhai - merge mod_php into the main php package (#22906) * Fri Dec 29 2000 Nalin Dahyabhai - try to fix a quoting problem * Wed Dec 20 2000 Nalin Dahyabhai - update to 4.0.4 to get a raft of bug fixes - enable sockets - enable wddx * Fri Nov 3 2000 Nalin Dahyabhai - rebuild in updated environment * Thu Nov 2 2000 Nalin Dahyabhai - add more commented-out modules to the default config file (#19276) * Wed Nov 1 2000 Nalin Dahyabhai - fix not-using-gd problem (#20137) * Tue Oct 17 2000 Nalin Dahyabhai - update to 4.0.3pl1 to get some bug fixes * Sat Oct 14 2000 Nalin Dahyabhai - build for errata * Wed Oct 11 2000 Nalin Dahyabhai - update to 4.0.3 to get security fixes integrated - patch around problems configuring without Oracle support - add TSRM to include path when building individual modules * Fri Sep 8 2000 Nalin Dahyabhai - rebuild in new environment - enable OpenSSL support * Wed Sep 6 2000 Nalin Dahyabhai - update to 4.0.2, and move the peardir settings to configure (#17171) - require %%{version}-%%{release} for subpackages - add db2-devel and db3-devel prereqs (#17168) * Wed Aug 23 2000 Nalin Dahyabhai - rebuild in new environment (new imap-devel) * Wed Aug 16 2000 Nalin Dahyabhai - fix summary and descriptions to match the specspo package * Wed Aug 9 2000 Nalin Dahyabhai - hard-code the path to apxs in build_ext() (#15799) * Tue Aug 1 2000 Nalin Dahyabhai - add "." to the include path again, which is the default * Wed Jul 19 2000 Nalin Dahyabhai - enable PEAR and add it to the include path - add the beginnings of a -devel subpackage * Wed Jul 12 2000 Prospector - automatic rebuild * Fri Jul 7 2000 Nalin Dahyabhai - tweaks to post and postun from Bill Peck * Thu Jul 6 2000 Nalin Dahyabhai - fixes from Nils for building the MySQL client - change back to requiring %{version} instead of %{version}-%{release} * Sat Jul 1 2000 Nalin Dahyabhai - update to 4.0.1pl2 - enable MySQL client - move the php.ini file to %{_sysconfdir} * Fri Jun 30 2000 Nils Philippsen - build_ext defines HAVE_PGSQL so pgsql.so in fact contains symbols - post/un scripts tweak php.ini correctly now * Thu Jun 28 2000 Nalin Dahyabhai - update to 4.0.1 - refresh manual * Tue Jun 26 2000 Nalin Dahyabhai - rebuild against new krb5 package * Mon Jun 19 2000 Nalin Dahyabhai - rebuild against new db3 package * Sat Jun 17 2000 Nalin Dahyabhai - Fix syntax error in post and preun scripts. - Disable IMAP, LDAP, PgSql in the standalone version because it picks up the extensions. * Fri Jun 16 2000 Nalin Dahyabhai - Unexclude the Sparc arch. - Exclude the ia64 arch until we get a working Postgres build. - Stop stripping extensions as aggressively. - Start linking the IMAP module to libpam again. - Work around extension loading problems. - Reintroduce file-editing post and preun scripts for the mod_php extensions until we come up with a better way to do it. * Mon Jun 5 2000 Nalin Dahyabhai - ExcludeArch: sparc for now * Sun Jun 4 2000 Nalin Dahyabhai - add Obsoletes: phpfi, because their content handler names are the same - add standalone binary, rename module packages to mod_php - FHS fixes * 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.