%define phpdir %{_libdir}/php Summary: The PHP4 scripting language Name: php Version: 4.1.2 Release: 1mdk Group: Development/Other URL: http://www.php.net Source0: http://www.php.net/distributions/php-%{version}.tar.bz2 Source1: php-killrpath.c Source3: FAQ.php Source6: php.ini Patch: php-4.0.0-init.patch.bz2 Patch1: php-4.0.6-shared.patch.bz2 Patch2: php-4.1.0-imap.patch.bz2 # (cb) Security fix. Upgrade to 4.1.2 after Mdk 8.2 release. Patch5: php-4.1.1-upload.patch.bz2 #Obsolete patches, keep them just in case Patch10: php-ac-m4.patch.bz2 Patch20: php-security.patch.bz2 License: PHP License BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root Requires: php-common = %{version}-%{release} BuildRequires: bison byacc libgdbm2-devel zlib1-devel mm-devel pam-devel flex BuildRequires: smtpdaemon Obsoletes: php3 Provides: php3, php4 %description PHP4 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. This package contains a standalone (CGI) version of php. You must also install php4-common. If you need apache module support, you also need to install the mod_php package %package common Group: System/Libraries Summary: Shared library for php URL: http://www.php.net %description common This package provides the common files to run with different implementations of PHP. You need this package if you install the php standalone package or a webserver with php support (ie: mod_php). %package devel Group: Development/C Summary: Development package for PHP4 URL: http://www.php.net Requires: libtool, php-common = %{version}-%{release} Requires: php = %{version}-%{release} Provides: php-devel %description devel The php-devel package lets you compile dynamic extensions to PHP4. Included here is the source for the php extensions. Instead of recompiling the whole php binary to add support for, say, oracle, install this package and use the new self-contained extensions support. For more information, read the file SELF-CONTAINED-EXTENSIONS. %prep %setup -q %patch -p1 %patch1 -p1 %patch2 -p0 #%patch5 -p0 #Obsolete patches, keep them just in case #%patch10 #%patch20 cp Zend/LICENSE Zend/ZEND_LICENSE mv README.SELF-CONTAINED-EXTENSIONS SELF-CONTAINED-EXTENSIONS mkdir -p php-devel/extensions mkdir -p php-devel/sapi cp -dpR ext/* php-devel/extensions/ rm -f php-devel/extensions/informix/stub.c rm -f php-devel/extensions/standard/.deps rm -f php-devel/extensions/skeleton/EXPERIMENTAL rm -f php-devel/extensions/ncurses/EXPERIMENTAL cp -dpR sapi/* php-devel/sapi/ rm -f php-devel/sapi/thttpd/stub.c rm -f php-devel/sapi/cgi/php.sym rm -f php-devel/sapi/fastcgi/php.sym rm -f php-devel/sapi/pi3web/php.sym cp %{SOURCE3} php-devel/PHP_FAQ.php # remove -DHAVE_CONFIG_H as it breaks the build of extensions; this is the # original buildext: (vdanen 06/29/01) #cat > php-devel/buildext <<EOF ##!/bin/bash #gcc -fPIC -shared %{optflags} -DHAVE_CONFIG_H -I.\ # -I/usr/include/php \ # -I/usr/include/php/Zend \ # -I/usr/include/php/TSRM \ # -I/usr/include/php/main \ # -Iusr/include/freetype -I/usr/include/\$1 \ # -DHAVE_CONFIG_H \ # \$4 \$2 -o \$1.so \$3 -lc #EOF cat > php-devel/buildext <<EOF #!/bin/bash gcc -fPIC -shared %{optflags} -I.\ -I/usr/include/php \ -I/usr/include/php/Zend \ -I/usr/include/php/TSRM \ -I/usr/include/php/main \ -Iusr/include/freetype -I/usr/include/\$1 \ \$4 \$2 -o \$1.so \$3 -lc EOF chmod 755 php-devel/buildext %build %serverbuild #For eventual compatibility with RedHat #%{!?nokerberos:krb5libs="-L%{_prefix}/kerberos/lib -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err"} LIBS="$LIBS -lpthread $krb5libs" export LIBS # Configure php CFLAGS="$RPM_OPT_FLAGS -fPIC -L%{_libdir}"; export CFLAGS ./configure \ --disable-static \ --disable-debug \ --disable-rpath \ --enable-pic \ --enable-inline-optimization \ --prefix=%{_prefix} \ --with-zlib \ --with-config-file-path=%{_sysconfdir} \ --enable-magic-quotes \ --enable-debugger \ --enable-track-vars \ --enable-safe-mode \ --with-exec-dir=%{_bindir} \ --with-regex=system \ --with-versioning \ --enable-sysvsem \ --enable-sysvshm \ --with-mod_charset \ --enable-force-cgi-redirect \ --enable-trans-sid \ --with-dbase \ --with-filepro \ --enable-yp \ --enable-ftp \ --with-gettext \ --with-ttf \ --with-freetype-dir \ --without-xml \ --without-mysql ### This configuration makes a dependency on those libs: # -lgdbm -lpam -lresolv -lm -ldl -lcrypt -lnsl # (Those are the standard libs for straight ./configure) # # And, because MySQL uses pthreads, we have to add this one in the # $LIBS variable: -lpthread # # Mandrake's RPM adds these (they are not in RedHat: # -lz -lmm -ldb # ### Gooodies we'll integrate someday, when we have the time # (They will be packaged separately) # --with-mod-dav=DIR # --with-recode # --with-openssl # --with-snmp # --enable-ucd-snmp-hack # --with-swf # --with-db3 ### cbelisle (02/01/16) I removed --with-mm because of the problems with /tmp/session_mm.sem # --with-mm ### jmdault (02/03/04) Removed xml because of problems with multiple expats # --with-xml \ find -type f|xargs perl -pi -e "s|/no-debug-non-zts-\d+||;" #Remove the --without-xml and --without-mysql so users don't say it's #compiled without, they just have to install the module. find -type f|xargs perl -pi -e "s|'--without-xml'||;" find -type f|xargs perl -pi -e "s|'--without-mysql'|\[Some modules are external: look for packages php-pgsql,php-mysql,...\]|;" %make perl -pi -e "s|INSTALLDIR = |INSTALLDIR = $RPM_BUILD_ROOT|g;" config_vars.mk perl -pi -e "s|EXTENSION_DIR = |EXTENSION_DIR = $RPM_BUILD_ROOT|g;" config_vars.mk perl -pi -e "s|^prefix = |prefix = $RPM_BUILD_ROOT|g;" config_vars.mk cd .libs cp %{SOURCE1} . make php-killrpath ./php-killrpath php %install rm -fr %buildroot make peardir=$RPM_BUILD_ROOT%{phpdir} install-su mkdir -p $RPM_BUILD_ROOT%{_libdir} mkdir -p $RPM_BUILD_ROOT%{_bindir} mkdir -p $RPM_BUILD_ROOT%{phpdir}/extensions cp -a .libs/*so* $RPM_BUILD_ROOT%{_libdir} cp -a .libs/php $RPM_BUILD_ROOT%{_bindir} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir} install -m 644 %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/php.ini mkdir -p $RPM_BUILD_ROOT%{_prefix}/src/php-devel cp -dpR php-devel/* $RPM_BUILD_ROOT%{_prefix}/src/php-devel/ cat > $RPM_BUILD_DIR/php-%{version}/Readme1st <<EOF - Install the mod_php package to get Apache support - Install php-[extension].rpm packages to get a specific extension EOF %clean rm -fr %buildroot %post common if [ ! -e /etc/php.ini -a -e /etc/php.ini.rpmsave ]; then cat /etc/php.ini.rpmsave > /etc/php.ini fi /sbin/ldconfig %postun common -p /sbin/ldconfig %files %defattr(-,root,root) %{_bindir}/php %doc Readme1st %files common %defattr(-,root,root) %{_libdir}/*.so.* %config(noreplace) %{_sysconfdir}/php.ini %doc CODING_STANDARDS CREDITS INSTALL LICENSE %doc NEWS README.* Zend/ZEND_* TODO %doc scripts/apache/* %doc LICENSE %dir %_datadir/php/ %_datadir/php/*.php %files devel %defattr(-,root,root) %{_bindir}/php-config %{_bindir}/phpextdist %{_bindir}/phpize %{_bindir}/pear %{_includedir}/php/* %{phpdir}/* %dir %{phpdir} %doc SELF-CONTAINED-EXTENSIONS api*.txt %dir %{_prefix}/src/php-devel %{_prefix}/src/php-devel/* %{_libdir}/*.so %changelog * Mon Mar 02 2002 Jean-Michel Dault <jmdault@mandrakesoft.com> 4.1.2-1mdk - 4.1.2 is the same as 4.1.1+patch, but the Zend optimizer will not link properly if the release number is not the same... - Removec expat because of segfaults when different versions of expat are linked statically in different pieces of apache. * Wed Feb 27 2002 Christian Belisle <cbelisle@mandrakesoft.com> 4.1.1-4mdk - File uploads security fix. * Tue Jan 15 2002 Christian Belisle <cbelisle@mandrakesoft.com> 4.1.1-3mdk - Remove --with-mm because of a bug with libmm & /tmp/session_mm.sem (Thanks to Thor). * Mon Jan 07 2002 Christian Belisle <cbelisle@mandrakesoft.com> 4.1.1-2mdk - Added smtpdaemon in BuildRequires (needed to include mail()). * Mon Jan 07 2002 Christian Belisle <cbelisle@mandrakesoft.com> 4.1.1-1mdk - 4.1.1 (bug fixes) * Wed Dec 12 2001 Christian Belisle <cbelisle@mandrakesoft.com> 4.1.0-2mdk - Patch2 to be able to compile php-imap. * Tue Dec 11 2001 Christian Belisle <cbelisle@mandrakesoft.com> 4.1.0-1mdk - 4.1.0. * Sat Sep 09 2001 David BAUDENS <baudens@mandrakesoft.com> 4.0.6-5mdk - Clean after build - Remove french locale from Summary - Fix Provides and Requires - Bzip2 patches - Use %%make - Add missing file * Tue Aug 28 2001 Christian Belisle <cbelisle@mandrakesoft.com> 4.0.6-4mdk - s/libgdbm1/libgdbm2 (Thanx to Digital Wokan). - Fixed some rpmlint warnings and errors. * Tue Jul 24 2001 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 4.0.6-3mdk - removed Obsoletes: php-devel for devel subpackage * Mon Jul 9 2001 Vincent Danen <vdanen@mandrakesoft.com> 4.0.6-2mdk - removed Obsoletes: php-mysql * Wed Jul 4 2001 Vincent Danen <vdanen@mandrakesoft.com> 4.0.6-1mdk - 4.0.6 - remove -DHAVE_CONFIG_H from buildext script so that modules build - fix PEAR installation by specifying peardir explicitly - s/Copyright/License/ * Thu Apr 12 2001 Jean-Michel Dault <jmdault@mandrakesoft.com> 4.0.4pl1-6mdk - recreate php.ini in case someone uses rpm -Uvh *, since rpm handles config files in a weird way when movig the config file to a different sub-package. *Very important* since it can render php useless when updating from the 7.2 updates from 8.0 * Mon Apr 9 2001 Jean-Michel Dault <jmdault@mandrakesoft.com> 4.0.4pl1-5mdk - use serverbuild macro * Tue Mar 27 2001 Jean-Michel Dault <jmdault@mandrakesoft.com> 4.0.4pl1-4mdk - completely remade spec file - renamed library to fit the libtool philosophy - created libphp package, the php package is now only the standalone. People shouldn't have to install the standalone package if they don't want to, and rpmlint doesn't want a binary and a library in same package - put manual and all sub-modules into their own package. It will be easier this way, since we can, say, recompile only php-mysql without touching the other modules - changed builddefs so people see --external-modules=mysql,pgsql,etc... instead of --without-mysql which fooled people in thinking they had to recompile when they only had to install the right module - removed RPATH since it could be a security problem - fix upgrade scripts for good * Mon Jan 22 2001 Vincent Danen <vdanen@mandrakesoft.com> 4.0.4pl1-3mdk - fix upgrade scripts * Sun Jan 21 2001 Vincent Danen <vdanen@mandrakesoft.com> 4.0.4pl1-2mdk - rebuild against new MySQL for php-mysql * Thu Jan 18 2001 Vincent Danen <vdanen@mandrakesoft.com> 4.0.4pl1-1mdk - 4.0.4pl1; security fixes for PHP directive problems * Thu Dec 21 2000 Vincent Danen <vdanen@mandrakesoft.com> 4.0.4-1mdk - 4.0.4 * Tue Dec 12 2000 Vincent Saugey <vince@mandrakesoft.com> 4.0.3pl1-3mdk - declare top_srcdir at build step * Sat Nov 11 2000 Daouda Lo <daouda@mandrakesoft.com> 4.0.3pl1-2mdk - correct php-pgsql preuninstall typo (thanx Florent Guillaume) * Sun Oct 22 2000 Jean-Michel Dault <jmdault@mandrakesoft.com> 4.0.3pl1-1mdk - Bugfix + Security release * Wed Sep 27 2000 Jean-Michel Dault <jmdault@mandrakesoft.com> 4.0.2-4mdk - Fixed requires - Rebuilt for new Apache - Removed security patch SRADV00001 because it was causing segfaults with POST and multipart/form-data - Removed CVS junk files in php-manual * Fri Sep 8 2000 Jean-Michel Dault <jmdault@mandrakesoft.com> 4.0.2-3mdk - Added security patch from Vincent Danen for (SRADV00001) Arbitrary file disclosure through PHP file upload - Patched aclocal.m4 and acinclude.m4... Looks like every release they break something! - imap was also broken. Added -lpam to the flags. - compiled php with -lpthread to fix damn segfaults - new MySQL release: compile with lmysqlclient_r - removed conflict with midgard (i heard that both can coexist now) - mysql: Tested phpMyAdmin - success! Tested also standalone with code from: php-manual/function.mysql-pconnect.html - gd: Tested generation of png graphics with truetype, both in standalone and apache module - pgsql: tested with standalone binary and the example code contained in php-manual/ref.pgsql.html. After a "createuser apache" in postgres, also tested successfully the apache mode - imap: tested imap_open and imap_close on port 110 with standalone and in apache module - ldap: tested functions in php-manual/function.ldap-add.html with standalone and apache module - split dba_gdbm_db2 and readline from the main package. The first, because we might support db3 eventually, and the lase because it required 3 additional libraries, and was only for the standalone version. - tested dba_gdbm_db2 with standalone and apache module with sample code from php-manual/ref.dba.html - tested readline with standalone (it is interactive so it won't work with apache) with code from php-manual/ref.readline.html - we now use a libphp4_shared: this saves space and permits to use any module with any server API - put the SAPI files into the php-devel package so we can compile eventually thttpd, roxen, or the servlet API - put php_standalone into the main php package to be able to use the new PEAR interface (like CPAN, but for PHP4) - renamed all modules. They are now called php-something instead of mod_php-something. The reason is they can be used with either php-thttpd, php-standalone, php-servlet or under apache (where this module is still called mod_php, to be consistent with mod_perl, mod_jserv, etc..). * Fri Sep 1 2000 Jean-Michel Dault <jmdault@mandrakesoft.com> 4.0.2-2mdk - Heavy use of perl s///g to make it install at the right place * Thu Aug 31 2000 Jean-Michel Dault <jmdault@mandrakesoft.com> 4.0.2-1mdk - shiny new 4.0.2!! - removed db3 support: it crashes the configure script, and besides, it's not in the distro (only in contribs). We use GDBM and DB2. * Thu Aug 24 2000 Jean-Michel Dault <jmdault@mandrakesoft.com> 4.0.1pl2-6mdk - created extensions package - fixed mysql support * Wed Aug 9 2000 Jean-Michel Dault <jmdault@mandrakesoft.com> 4.0.1pl2-5mdk - link mysql.so with libmysqlclient.so * Wed Aug 9 2000 Jean-Michel Dault <jmdault@mandrakesoft.com> 4.0.1pl2-4mdk - Compile with latest MySQL - Changed paths for FHS - Macroize - Fixed the BuildRequires (please, don't auto-regenerate) * Mon Aug 07 2000 Frederic Lepied <flepied@mandrakesoft.com> 4.0.1pl2-3mdk - automatically added BuildRequires * Fri Jul 14 2000 Jean-Michel Dault <jmdault@mandrakesoft.com> 4.0.1pl2-2mdk - added recode - rebuilt for new EAPI - use new AESctl script for %post - Bonnne Fete la France! =) * Sat Jul 08 2000 Jean-Michel Dault <jmdault@mandrakesoft.com> 4.0.1pl2-1mdk - update to 4.0.1pl2 (lots of bug fixes) - moved php binary to php-standalone package - fixed module compilation (specially the again badly broken pgsql) * Tue Jun 20 2000 Jean-Michel Dault <jmdault@mandrakesoft.com> 4.0.0-1mdk - update to PHP 4.0.0 - compile in two pass so that the extensions work both with PHP and mod_php - include development package. This will enable us to compile dynamic extensions outside the main PHP4 package. This will come handy for the Oracle, Sybase, swf, etc. modules. - spent long nights figuring how to make GD+ttf+t1lib with PHP4 - many fixes to remain RH-compatible a bit, but to keep our improvements, and have a working config (RH handles extensions poorly and makes php require postgres, ldap and imap even if the use won't use it). - change most of the Requires to Prereqs, because the post edits config files - change most of the postuns to preuns in case php gets removed before subpkgs - make subpackages require php = %{version} - add Obsoletes: phpfi, because their content handler names are the same - add standalone binary - change license from "GPL" to "PHP" * Wed Jun 14 2000 Jean-Michel Dault <jmdault@mandrakesoft.com> 3.0.16-6mdk - last version, PHP4 is on the way (hurray! ;-) - added -llber to the ldap package - split gd library out of the main package so it doesn't require XFree-libs! - removed Dadou's hack for i486 compilation. When cross-compiling, first build Apache, then install apache and apache-devel before you compile other apache modules. It will then compile for the same architecture that apache has been compiled with. * Thu May 18 2000 David BAUDENS <baudens@mandrakesoft.com> 3.0.16-5mdk - Better fix for i486 * Mon May 15 2000 David BAUDENS <baudens@mandrakesoft.com> 3.0.16-4mdk - Fix build for i486 - Fix some typos - Fix build as user * Mon May 08 2000 Jean-Michel Dault <jmdault@mandrakesoft.com> 3.0.16-3mdk - added Prereq so it doesn't complain about missing php3.ini - rebuild with EAPI 2.6.4 (bugfixes) - include /usr/bin/* - removed old manual from sources * Thu Apr 6 2000 Jean-Michel Dault <jmdault@mandrakesoft.com> 3.0.16-2mdk - rebuit with EAPI 2.6.3 - moved doc - added -DHAVE_PQCMDTUPLES - put ldap in separate module * Thu Apr 6 2000 Jean-Michel Dault <jmdault@mandrakesoft.com> 3.0.16-1mdk - 3.0.16 bugfix release * Mon Apr 3 2000 Jean-Michel Dault <jmdault@mandrakesoft.com> 3.0.15-4mdk - fixed group - created MySQL as a separate module to fix dependancies * Tue Feb 29 2000 Jean-Michel Dault <jmdault@netrevolution.com> 3.0.15-3mdk - rebuild for EAPI 2.6.1 - updated manual * Mon Feb 27 2000 Jean-Michel Dault <jmdault@netrevolution.com> 3.0.15-2mdk - re-made gd+ttf patch. (again) * Mon Feb 27 2000 Jean-Michel Dault <jmdault@netrevolution.com> 3.0.15-1mdk - added many BuildRequires (this is a very complex package!) - upgraded to 3.0.15 (security updates) - updated mysql client to 3.22.32 - added patch suggested by jeff b <jeff@univrel.pr.uconn.edu> to decrease the TOKEN_BITS from 20 to 18. This allows large applications written in PHP to not bomb out due to running out of tokens. * Tue Jan 18 2000 Jean-Michel Dault <jmdault@netrevolution.com> - upgraded to 3.0.14 - updated mysql client to 3.22.30 - added support for ftp * Mon Jan 3 2000 Jean-Michel Dault <jmdault@netrevolution.com> - final cleanup for Mandrake 7 * Mon Jan 3 2000 Jean-Michel Dault <jmdault@netrevolution.com> - upgraded to 3.0.13 - fixed png support - fixed reversed ttf fonts - fixed imap and pgsql for good, made apache restart when installing these packages - updated mysql client to 3.22.29 * Thu Dec 30 1999 Jean-Michel Dault <jmdault@netrevolution.com> - rebuilt for Oxygen and new mm-1.0.12 in Apache - added ttf and t1lib, which are now part of Mandrake - added gd support (png only, to enable gifs, you have to rebuild the rpm with the old library) * Fri Sep 3 1999 Jean-Michel Dault <jmdault@netrevolution.com> - rebuilt for new mm-1.0.10 in Apache * Thu Aug 26 1999 Jean-Michel Dault <jmdault@netrevolution.com> - added Conflicts line * Fri Aug 19 1999 Jean-Michel Dault <jmdault@netrevolution.com> - Solaris adaptations * Wed Aug 18 1999 Jean-Michel Dault <jmdault@netrevolution.com> - modified post scripts * Sat Jul 31 1999 Jean-Michel Dault <jmdault@netrevolution.com> - upgraded to 3.0.12 * Wed Jul 21 1999 Jean-Michel Dault <jmdault@netrevolution.com> - upgraded to 3.0.11 - added RPM_OPT_FLAGS - added fr locale - "mandrakized" package again * Mon Jun 14 1999 Preston Brown <pbrown@redhat.com> - upgraded to 3.0.9 - fixed postgresql module and made separate package - separated manual into separate documentation package * Mon May 24 1999 Preston Brown <pbrown@redhat.com> - 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 <pbrown@redhat.com> - hacked in imap support in an ugly way until imap gets an official shared library implementation * Fri Apr 16 1999 Preston Brown <pbrown@redhat.com> - pick up php3.ini * Wed Mar 24 1999 Preston Brown <pbrown@redhat.com> - build against apache 1.3.6 * Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> - auto rebuild in the new build environment (release 2) * Mon Mar 08 1999 Preston Brown <pbrown@redhat.com> - upgraded to 3.0.7. * Wed Feb 24 1999 Preston Brown <pbrown@redhat.com> - Injected new description and group. * Sun Feb 07 1999 Preston Brown <pbrown@redhat.com> - upgrade to php 3.0.6, built against apache 1.3.4 * Mon Oct 12 1998 Cristian Gafton <gafton@redhat.com> - rebuild for apache 1.3.3 * Thu Oct 08 1998 Preston Brown <pbrown@redhat.com> - updated to 3.0.5, fixes nasty bugs in 3.0.4. * Sun Sep 27 1998 Cristian Gafton <gafton@redhat.com> - updated to 3.0.4 and recompiled for apache 1.3.2 * Thu Sep 03 1998 Preston Brown <pbrown@redhat.com> - improvements; builds with apache-devel package installed. * Tue Sep 01 1998 Preston Brown <pbrown@redhat.com> - Made initial cut for PHP3.