auto-import php-4.2.2-10 from php-4.2.2-10.src.rpm
This commit is contained in:
parent
ad4f8691b4
commit
a127cccbb3
326
php.spec
326
php.spec
@ -1,32 +1,21 @@
|
|||||||
# HTML cgi-bin directory exists under
|
|
||||||
#
|
|
||||||
%define contentdir /var/www
|
%define contentdir /var/www
|
||||||
|
|
||||||
|
|
||||||
# Language sets that we bundle with php
|
|
||||||
#
|
|
||||||
%define manual_langs de en es fr it ja ko pt_BR
|
%define manual_langs de en es fr it ja ko pt_BR
|
||||||
|
|
||||||
|
ExcludeArch: x86_64
|
||||||
|
|
||||||
# For those wanting to recompile with Oracle libraries
|
# For those wanting to recompile with Oracle libraries
|
||||||
# rpm --rebuild --define 'oracle 1' php4.2.1-x.src.rpm
|
# rpm --rebuild --define 'oracle 1' php4.2.1-x.src.rpm
|
||||||
#
|
#
|
||||||
%{!?oracle:%define oracle 0}
|
%{!?oracle:%define oracle 0}
|
||||||
|
|
||||||
|
|
||||||
# RPM Informational headers
|
|
||||||
#
|
|
||||||
Summary: The PHP HTML-embedded scripting language. (PHP: Hypertext Preprocessor)
|
Summary: The PHP HTML-embedded scripting language. (PHP: Hypertext Preprocessor)
|
||||||
Name: php
|
Name: php
|
||||||
Version: 4.2.2
|
Version: 4.2.2
|
||||||
Release: 8.0.8
|
Release: 10
|
||||||
License: The PHP License, version 2.02
|
License: The PHP License
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
URL: http://www.php.net/
|
URL: http://www.php.net/
|
||||||
|
|
||||||
|
|
||||||
# The one true source and manuals
|
|
||||||
#
|
|
||||||
Source0: http://www.php.net/distributions/php-%{version}.tar.gz
|
Source0: http://www.php.net/distributions/php-%{version}.tar.gz
|
||||||
Source1: http://www.php.net/distributions/manual/php_manual_de.tar.bz2
|
Source1: http://www.php.net/distributions/manual/php_manual_de.tar.bz2
|
||||||
Source2: http://www.php.net/distributions/manual/php_manual_en.tar.bz2
|
Source2: http://www.php.net/distributions/manual/php_manual_en.tar.bz2
|
||||||
@ -37,121 +26,40 @@ Source6: http://www.php.net/distributions/manual/php_manual_ja.tar.bz2
|
|||||||
Source7: http://www.php.net/distributions/manual/php_manual_ko.tar.bz2
|
Source7: http://www.php.net/distributions/manual/php_manual_ko.tar.bz2
|
||||||
Source8: http://www.php.net/distributions/manual/php_manual_pt_BR.tar.bz2
|
Source8: http://www.php.net/distributions/manual/php_manual_pt_BR.tar.bz2
|
||||||
|
|
||||||
|
|
||||||
# httpd configuration file.
|
|
||||||
#
|
|
||||||
Source50: php.conf
|
Source50: php.conf
|
||||||
|
|
||||||
|
|
||||||
# Patches (old)
|
|
||||||
#
|
|
||||||
# Patch for https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=58801
|
|
||||||
# Patch0: php-4.1.1-domxml.patch
|
|
||||||
#
|
|
||||||
# Patch for https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=60515
|
|
||||||
# Patch1: php-4.1.2-mysql-path.patch
|
|
||||||
#
|
|
||||||
# Patch to tweak the default php.ini
|
|
||||||
# Patch2: php-4.1.2-php.ini-dist.patch
|
|
||||||
#
|
|
||||||
# Patch in repsonse to bugzilla entry #60855
|
|
||||||
# Patch3: php-4.1.2-bug-60855.patch
|
|
||||||
|
|
||||||
|
|
||||||
# Patches (current)
|
|
||||||
#
|
|
||||||
|
|
||||||
# Patch to get around a dumb assumption that size_t is always 4 bytes
|
# Patch to get around a dumb assumption that size_t is always 4 bytes
|
||||||
Patch0: php-4.2.1-64bit-iconv.patch
|
Patch0: php-4.2.1-64bit-iconv.patch
|
||||||
|
# Fix for ldap module
|
||||||
|
|
||||||
# Argh! openldap 2.1.x changed it's API! This is needed only for openldap 2.1.x and higher
|
|
||||||
Patch1: php-4.2.1-ldap-TSRM.patch
|
Patch1: php-4.2.1-ldap-TSRM.patch
|
||||||
|
# php.ini defaults
|
||||||
|
|
||||||
# Patch to tweak the default php.ini to something a little more unix like
|
|
||||||
Patch2: php-4.2.1-php.ini-dist.patch
|
Patch2: php-4.2.1-php.ini-dist.patch
|
||||||
|
# use -DUCD_COMPATIBLE to make net-snmp backwards-compatible
|
||||||
|
|
||||||
# Patch to pass in -DUCD_COMPATIBLE to the net-snmp package
|
|
||||||
Patch3: php-4.2.1-snmp.patch
|
Patch3: php-4.2.1-snmp.patch
|
||||||
|
# Fix for #67853
|
||||||
|
|
||||||
# Patch to fix a problem where, given multiple cookies to set,
|
|
||||||
# only the last one would be made (#67853)
|
|
||||||
Patch4: php-4.2.2-cookies.patch
|
Patch4: php-4.2.2-cookies.patch
|
||||||
|
# Apache 2.0 compatibility fixes
|
||||||
|
|
||||||
# Apache httpd 2.0.40 compatibility fixes
|
|
||||||
Patch5: php-4.2.2-apache2.patch
|
Patch5: php-4.2.2-apache2.patch
|
||||||
|
|
||||||
|
|
||||||
# Patch to get around php dropping variables
|
# Patch to get around php dropping variables
|
||||||
Patch6: php-4.1.2-missing-vars.patch
|
Patch6: php-4.1.2-missing-vars.patch
|
||||||
|
# Fixes for libdir = /usr/lib64; based on SuSE's patches.
|
||||||
# Fix mail() security issues
|
Patch9: php-4.2.2-lib64.patch
|
||||||
Patch7: php-4.2.2-mailsec.patch
|
|
||||||
|
|
||||||
# Fix wordwrap() security issues
|
|
||||||
Patch8: php-4.2.2-wrap.patch
|
|
||||||
|
|
||||||
Patch9: php-4.2.2-exit.patch
|
|
||||||
Patch10: php-4.2.2-sockets.patch
|
|
||||||
Patch11: php-4.2.2-sessid.patch
|
|
||||||
Patch12: php-4.2.2-snmp.patch
|
|
||||||
|
|
||||||
# Where are we going to build the install set to?
|
# Where are we going to build the install set to?
|
||||||
#
|
#
|
||||||
BuildRoot: %{_tmppath}/%{name}-root
|
BuildRoot: %{_tmppath}/%{name}-root
|
||||||
|
|
||||||
|
BuildRequires: bzip2-devel, curl-devel >= 7.9, db4-devel, expat-devel, freetype-devel
|
||||||
# Kill off some old history that we no longer wish to see
|
BuildRequires: gd-devel >= 1.8.4, gdbm-devel, gmp-devel, pspell-devel
|
||||||
#
|
BuildRequires: httpd-devel >= 2.0.40-6, libjpeg-devel, libpng-devel, pam-devel
|
||||||
Obsoletes: mod_php, php3, phpfi
|
BuildRequires: libstdc++-devel, libxml2-devel, ncurses-devel, openssl-devel
|
||||||
|
|
||||||
|
|
||||||
# Ok, you wanna build it, you gotta have these packages around
|
|
||||||
#
|
|
||||||
BuildRequires: bzip2-devel
|
|
||||||
BuildRequires: curl-devel
|
|
||||||
BuildRequires: db4-devel
|
|
||||||
BuildRequires: expat-devel
|
|
||||||
BuildRequires: freetype-devel
|
|
||||||
BuildRequires: gd-devel >= 1.8.4
|
|
||||||
BuildRequires: gdbm-devel
|
|
||||||
BuildRequires: gmp-devel
|
|
||||||
BuildRequires: httpd-devel >= 2.0.40-6
|
|
||||||
BuildRequires: libjpeg-devel
|
|
||||||
BuildRequires: libpng-devel
|
|
||||||
BuildRequires: libstdc++-devel
|
|
||||||
BuildRequires: libxml2-devel
|
|
||||||
BuildRequires: ncurses-devel
|
|
||||||
BuildRequires: openssl-devel
|
|
||||||
BuildRequires: pam-devel
|
|
||||||
BuildRequires: pspell-devel
|
|
||||||
BuildRequires: zlib-devel
|
BuildRequires: zlib-devel
|
||||||
BuildRequires: imap-devel
|
BuildRequires: bzip2, fileutils
|
||||||
|
Obsoletes: php-dbg, mod_php, php3, phpfi
|
||||||
|
|
||||||
# What we obsolete
|
|
||||||
#
|
|
||||||
Obsoletes: php-dbg
|
|
||||||
|
|
||||||
|
|
||||||
# To install, you must be /this/ high...
|
|
||||||
# Basically it's a list of items php itself during the build doesn't
|
|
||||||
# directly touch eg fileutils for mkdir, perl for the install scripts
|
|
||||||
# etc. We require httpd-mmn which is a provides from httpd. ie it doesn't
|
|
||||||
# show up in rpm -qa use rpm -q --whatprovides httpd-mmn instead.
|
|
||||||
# Personally I'm not fond of the way the version number is aquired but
|
|
||||||
# if it works,...
|
|
||||||
#
|
|
||||||
BuildPrereq: bzip2
|
|
||||||
BuildPrereq: fileutils
|
|
||||||
PreReq: perl
|
PreReq: perl
|
||||||
|
# Enforce Apache module ABI compatibility
|
||||||
Requires: httpd-mmn = %(cat %{_includedir}/httpd/.mmn)
|
Requires: httpd-mmn = %(cat %{_includedir}/httpd/.mmn)
|
||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
PHP is an HTML-embedded scripting language. PHP attempts to make it
|
PHP is an HTML-embedded scripting language. PHP attempts to make it
|
||||||
easy for developers to write dynamically generated webpages. PHP also
|
easy for developers to write dynamically generated webpages. PHP also
|
||||||
@ -162,26 +70,21 @@ 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
|
mod_php module enables the Apache Web server to understand and process
|
||||||
the embedded PHP language in Web pages.
|
the embedded PHP language in Web pages.
|
||||||
|
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
Summary: Files needed for building PHP extensions.
|
Summary: Files needed for building PHP extensions.
|
||||||
|
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
The php-devel package contains the files needed for building PHP
|
The php-devel package contains the files needed for building PHP
|
||||||
extensions. If you need to compile your own PHP extensions, you will
|
extensions. If you need to compile your own PHP extensions, you will
|
||||||
need to install this package.
|
need to install this package.
|
||||||
|
|
||||||
|
|
||||||
%package imap
|
%package imap
|
||||||
Summary: An Apache module for PHP applications that use IMAP.
|
Summary: An Apache module for PHP applications that use IMAP.
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
Prereq: php = %{version}-%{release}, perl
|
Prereq: php = %{version}-%{release}, perl
|
||||||
Obsoletes: mod_php3-imap
|
Obsoletes: mod_php3-imap
|
||||||
BuildRequires: krb5-devel
|
BuildRequires: krb5-devel, openssl-devel, imap-devel
|
||||||
BuildRequires: openssl-devel
|
|
||||||
|
|
||||||
|
|
||||||
%description imap
|
%description imap
|
||||||
The php-imap package contains a dynamic shared object (DSO) for the
|
The php-imap package contains a dynamic shared object (DSO) for the
|
||||||
@ -192,16 +95,12 @@ servers. PHP is an HTML-embedded scripting language. If you need IMAP
|
|||||||
support for PHP applications, you will need to install this package
|
support for PHP applications, you will need to install this package
|
||||||
and the php package.
|
and the php package.
|
||||||
|
|
||||||
|
|
||||||
%package ldap
|
%package ldap
|
||||||
Summary: A module for PHP applications that use LDAP.
|
Summary: A module for PHP applications that use LDAP.
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
Prereq: php = %{version}-%{release}, perl
|
Prereq: php = %{version}-%{release}, perl
|
||||||
Obsoletes: mod_php3-ldap
|
Obsoletes: mod_php3-ldap
|
||||||
BuildRequires: cyrus-sasl-devel
|
BuildRequires: cyrus-sasl-devel, openldap-devel, openssl-devel
|
||||||
BuildRequires: openldap-devel
|
|
||||||
BuildRequires: openssl-devel
|
|
||||||
|
|
||||||
|
|
||||||
%description ldap
|
%description ldap
|
||||||
The php-ldap package is a dynamic shared object (DSO) for the Apache
|
The php-ldap package is a dynamic shared object (DSO) for the Apache
|
||||||
@ -211,20 +110,17 @@ services over the Internet. PHP is an HTML-embedded scripting
|
|||||||
language. If you need LDAP support for PHP applications, you will
|
language. If you need LDAP support for PHP applications, you will
|
||||||
need to install this package in addition to the php package.
|
need to install this package in addition to the php package.
|
||||||
|
|
||||||
|
|
||||||
%package manual
|
%package manual
|
||||||
Obsoletes: mod_php3-manual
|
Obsoletes: mod_php3-manual
|
||||||
Group: Documentation
|
Group: Documentation
|
||||||
Summary: The PHP manual, in HTML format.
|
Summary: The PHP manual, in HTML format.
|
||||||
Prereq: php = %{version}-%{release}
|
Prereq: php = %{version}-%{release}
|
||||||
|
|
||||||
|
|
||||||
%description manual
|
%description manual
|
||||||
The php-manual package provides comprehensive documentation for the
|
The php-manual package provides comprehensive documentation for the
|
||||||
PHP HTML-embedded scripting language, in HTML format. PHP is an
|
PHP HTML-embedded scripting language, in HTML format. PHP is an
|
||||||
HTML-embedded scripting language.
|
HTML-embedded scripting language.
|
||||||
|
|
||||||
|
|
||||||
%package mysql
|
%package mysql
|
||||||
Summary: A module for PHP applications that use MySQL databases.
|
Summary: A module for PHP applications that use MySQL databases.
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
@ -235,7 +131,6 @@ BuildRequires: mysql-devel
|
|||||||
Requires: mysql
|
Requires: mysql
|
||||||
Requires: zlib
|
Requires: zlib
|
||||||
|
|
||||||
|
|
||||||
%description mysql
|
%description mysql
|
||||||
The php-mysql package contains a dynamic shared object that will add
|
The php-mysql package contains a dynamic shared object that will add
|
||||||
MySQL database support to PHP. MySQL is an object-relational database
|
MySQL database support to PHP. MySQL is an object-relational database
|
||||||
@ -243,21 +138,17 @@ management system. PHP is an HTML-embeddable scripting language. If
|
|||||||
you need MySQL support for PHP applications, you will need to install
|
you need MySQL support for PHP applications, you will need to install
|
||||||
this package and the php or mod_php package.
|
this package and the php or mod_php package.
|
||||||
|
|
||||||
|
|
||||||
%package pgsql
|
%package pgsql
|
||||||
Summary: A PostgreSQL database module for PHP.
|
Summary: A PostgreSQL database module for PHP.
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
Prereq: php = %{version}-%{release}, perl
|
Prereq: php = %{version}-%{release}, perl
|
||||||
Provides: php_database
|
Provides: php_database
|
||||||
Obsoletes: mod_php3-pgsql
|
Obsoletes: mod_php3-pgsql
|
||||||
BuildRequires: krb5-devel
|
BuildRequires: krb5-devel, openssl-devel, postgresql-devel
|
||||||
BuildRequires: openssl-devel
|
|
||||||
BuildRequires: postgresql-devel
|
|
||||||
Requires: krb5-libs
|
Requires: krb5-libs
|
||||||
Requires: openssl
|
Requires: openssl
|
||||||
Requires: postgresql-libs
|
Requires: postgresql-libs
|
||||||
|
|
||||||
|
|
||||||
%description pgsql
|
%description pgsql
|
||||||
The php-pgsql package includes a dynamic shared object (DSO) that can
|
The php-pgsql package includes a dynamic shared object (DSO) that can
|
||||||
be compiled in to the Apache Web server to add PostgreSQL database
|
be compiled in to the Apache Web server to add PostgreSQL database
|
||||||
@ -267,7 +158,6 @@ HTML-embedded scripting language. If you need back-end support for
|
|||||||
PostgreSQL, you should install this package in addition to the main
|
PostgreSQL, you should install this package in addition to the main
|
||||||
php package.
|
php package.
|
||||||
|
|
||||||
|
|
||||||
%package odbc
|
%package odbc
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
Prereq: php = %{version}-%{release}, perl, grep
|
Prereq: php = %{version}-%{release}, perl, grep
|
||||||
@ -276,7 +166,6 @@ Provides: php_database
|
|||||||
BuildRequires: unixODBC-devel
|
BuildRequires: unixODBC-devel
|
||||||
Requires: unixODBC
|
Requires: unixODBC
|
||||||
|
|
||||||
|
|
||||||
%description odbc
|
%description odbc
|
||||||
The php-odbc package contains a dynamic shared object that will add
|
The php-odbc package contains a dynamic shared object that will add
|
||||||
database support through ODBC to PHP. ODBC is an open specification
|
database support through ODBC to PHP. ODBC is an open specification
|
||||||
@ -286,7 +175,6 @@ HTML-embeddable scripting language. If you need ODBC support for PHP
|
|||||||
applications, you will need to install this package and the php
|
applications, you will need to install this package and the php
|
||||||
package.
|
package.
|
||||||
|
|
||||||
|
|
||||||
%if %{oracle}
|
%if %{oracle}
|
||||||
%package oci8
|
%package oci8
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
@ -295,100 +183,74 @@ Prereq: perl
|
|||||||
Summary: A module for PHP applications that use OCI8 databases.
|
Summary: A module for PHP applications that use OCI8 databases.
|
||||||
Provides: php_database
|
Provides: php_database
|
||||||
|
|
||||||
|
|
||||||
%description oci8
|
%description oci8
|
||||||
The php-oci8 package contains a dynamic shared object that will add
|
The php-oci8 package contains a dynamic shared object that will add
|
||||||
support for accessing OCI8 databases to PHP.
|
support for accessing OCI8 databases to PHP.
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%package snmp
|
%package snmp
|
||||||
Summary: A module for PHP applications that query SNMP-managed devices.
|
Summary: A module for PHP applications that query SNMP-managed devices.
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
Prereq: php = %{version}-%{release}, perl
|
Prereq: php = %{version}-%{release}, perl
|
||||||
BuildRequires: net-snmp-devel
|
BuildRequires: net-snmp-devel
|
||||||
|
|
||||||
|
|
||||||
%description snmp
|
%description snmp
|
||||||
The php-snmp package contains a dynamic shared object that will add
|
The php-snmp package contains a dynamic shared object that will add
|
||||||
support for querying SNMP devices to PHP. PHP is an HTML-embeddable
|
support for querying SNMP devices to PHP. PHP is an HTML-embeddable
|
||||||
scripting language. If you need SNMP support for PHP applications, you
|
scripting language. If you need SNMP support for PHP applications, you
|
||||||
will need to install this package and the php package.
|
will need to install this package and the php package.
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
|
||||||
|
|
||||||
# Weld the patchs into the main source
|
|
||||||
#
|
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
%patch4 -p1
|
%patch4 -p1
|
||||||
%patch5 -p1 -b .apache2
|
%patch5 -p1 -b .ap2
|
||||||
%patch6 -p1
|
%patch6 -p1
|
||||||
%patch7 -p1
|
%patch9 -p1
|
||||||
%patch8 -p1
|
|
||||||
%patch9 -p1 -b .exit
|
|
||||||
%patch10 -p1 -b .socket
|
|
||||||
%patch11 -p1 -b .sessid
|
|
||||||
%patch12 -p1 -b .snmp
|
|
||||||
|
|
||||||
# %doc gets confused about LICENSE & Zend/LICENSE
|
# Prevent %doc confusion over LICENSE & Zend/LICENSE
|
||||||
# lets just help it out,...
|
|
||||||
#
|
|
||||||
cp Zend/LICENSE Zend/ZEND_LICENSE
|
cp Zend/LICENSE Zend/ZEND_LICENSE
|
||||||
|
|
||||||
|
# Source is built twice: once for /usr/bin/php, once for the Apache DSO.
|
||||||
|
mkdir build-cgi build-apache
|
||||||
|
|
||||||
# We build php (normal cgi, apache_module)
|
# Use correct libdir
|
||||||
# Need some spare directories for to do that
|
perl -pi -e 's|\$\(prefix\)/lib|%{_libdir}|' pear/Makefile.in
|
||||||
#
|
|
||||||
mkdir build-cgi
|
|
||||||
mkdir build-apache
|
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
|
|
||||||
# Add -fPIC to RPM_OPT_FLAGS.
|
|
||||||
#
|
|
||||||
CFLAGS="$RPM_OPT_FLAGS -fPIC"; export CFLAGS
|
CFLAGS="$RPM_OPT_FLAGS -fPIC"; export CFLAGS
|
||||||
|
|
||||||
|
|
||||||
# Add the Kerberos library path to the default LDFLAGS so that the IMAP checks
|
# Add the Kerberos library path to the default LDFLAGS so that the IMAP checks
|
||||||
# will be able to find the GSSAPI libraries.
|
# will be able to find the GSSAPI libraries.
|
||||||
#
|
|
||||||
LDFLAGS="-L/usr/kerberos/lib"; export LDFLAGS
|
LDFLAGS="-L/usr/kerberos/lib"; export LDFLAGS
|
||||||
|
|
||||||
|
|
||||||
# Configure may or may not catch these (mostly second-order) dependencies.
|
# Configure may or may not catch these (mostly second-order) dependencies.
|
||||||
#
|
|
||||||
LIBS="-lttf -lfreetype -lpng -ljpeg -lz -lnsl"; export LIBS
|
LIBS="-lttf -lfreetype -lpng -ljpeg -lz -lnsl"; export LIBS
|
||||||
|
|
||||||
|
|
||||||
# This causes the shared extension modules to be installed into %{_libdir}/php4.
|
# This causes the shared extension modules to be installed into %{_libdir}/php4.
|
||||||
#
|
|
||||||
EXTENSION_DIR=%{_libdir}/php4; export EXTENSION_DIR
|
EXTENSION_DIR=%{_libdir}/php4; export EXTENSION_DIR
|
||||||
|
|
||||||
|
|
||||||
# This pulls the static /usr/lib/libc-client.a into the IMAP extension module.
|
# This pulls the static /usr/lib/libc-client.a into the IMAP extension module.
|
||||||
#
|
|
||||||
IMAP_SHARED_LIBADD=-lc-client ; export IMAP_SHARED_LIBADD
|
IMAP_SHARED_LIBADD=-lc-client ; export IMAP_SHARED_LIBADD
|
||||||
|
|
||||||
|
# pull latest ltmain.sh, AC_PROG_LIBTOOL
|
||||||
|
libtoolize --force --copy
|
||||||
|
# force aclocal run during buildconf
|
||||||
|
touch acinclude.m4
|
||||||
|
|
||||||
# Regenerate configure scripts (patches change config.m4's)
|
# Regenerate configure scripts (patches change config.m4's)
|
||||||
#
|
|
||||||
./buildconf
|
./buildconf
|
||||||
|
|
||||||
|
|
||||||
# Shell function to configure and build a PHP tree.
|
# Shell function to configure and build a PHP tree.
|
||||||
#
|
|
||||||
build() {
|
build() {
|
||||||
ln -sf ../configure
|
ln -sf ../configure
|
||||||
%configure \
|
%configure \
|
||||||
--prefix=%{_prefix} \
|
--prefix=%{_prefix} \
|
||||||
|
--cache-file=../config.cache \
|
||||||
--with-config-file-path=%{_sysconfdir} \
|
--with-config-file-path=%{_sysconfdir} \
|
||||||
--enable-force-cgi-redirect \
|
--enable-force-cgi-redirect \
|
||||||
--disable-debug \
|
--disable-debug \
|
||||||
@ -457,49 +319,33 @@ ln -sf ../configure
|
|||||||
--enable-mcal \
|
--enable-mcal \
|
||||||
$*
|
$*
|
||||||
|
|
||||||
|
|
||||||
# Fixup the config_vars to not include the '-a' on lines which call apxs.
|
# Fixup the config_vars to not include the '-a' on lines which call apxs.
|
||||||
#
|
#
|
||||||
cat config_vars.mk > config_vars.mk.old
|
cat config_vars.mk > config_vars.mk.old
|
||||||
awk '/^INSTALL_IT.*apxs.*-a -n/ {sub("-a -n ","-n ");} {print $0;}' \
|
awk '/^INSTALL_IT.*apxs.*-a -n/ {sub("-a -n ","-n ");} {print $0;}' \
|
||||||
config_vars.mk.old > config_vars.mk
|
config_vars.mk.old > config_vars.mk
|
||||||
|
|
||||||
make %{_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Build standalone /usr/bin/php
|
||||||
# First, build a CGI tree. Remember that nice handy build() { ... } above?
|
|
||||||
#
|
|
||||||
pushd build-cgi
|
pushd build-cgi
|
||||||
build \
|
build --enable-force-cgi-redirect
|
||||||
--enable-force-cgi-redirect
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
# Build Apache module
|
||||||
# Second, build an Apache tree.
|
|
||||||
#
|
|
||||||
pushd build-apache
|
pushd build-apache
|
||||||
|
build --with-apxs2=%{_sbindir}/apxs
|
||||||
|
|
||||||
# Add the buildroot location to the front of the libexecdir.
|
|
||||||
# Again use the build() call
|
|
||||||
#
|
|
||||||
build \
|
|
||||||
--with-apxs2=%{_sbindir}/apxs
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
# Install from CGI tree
|
||||||
# First, install the CGI tree.
|
|
||||||
#
|
|
||||||
pushd build-cgi
|
pushd build-cgi
|
||||||
make install INSTALL_ROOT=$RPM_BUILD_ROOT
|
make install INSTALL_ROOT=$RPM_BUILD_ROOT
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
|
||||||
# Second, install the Apache tree. Note that this overwrites the modules which
|
# Second, install the Apache tree. Note that this overwrites the modules which
|
||||||
# were installed as part of the CGI build. Lucky for us they're compatible.
|
# were installed as part of the CGI build. Lucky for us they're compatible.
|
||||||
#
|
#
|
||||||
@ -507,7 +353,6 @@ pushd build-apache
|
|||||||
make install INSTALL_ROOT=$RPM_BUILD_ROOT INSTALL_IT="echo "
|
make install INSTALL_ROOT=$RPM_BUILD_ROOT INSTALL_IT="echo "
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
|
||||||
# Install the default configuration file and some icons which can be used to
|
# Install the default configuration file and some icons which can be used to
|
||||||
# indicate that this site uses PHP.
|
# indicate that this site uses PHP.
|
||||||
#
|
#
|
||||||
@ -516,19 +361,14 @@ install -m 644 php.ini-dist $RPM_BUILD_ROOT%{_sysconfdir}/php.ini
|
|||||||
install -m 755 -d $RPM_BUILD_ROOT%{contentdir}/icons
|
install -m 755 -d $RPM_BUILD_ROOT%{contentdir}/icons
|
||||||
install -m 644 *.gif $RPM_BUILD_ROOT%{contentdir}/icons/
|
install -m 644 *.gif $RPM_BUILD_ROOT%{contentdir}/icons/
|
||||||
|
|
||||||
|
# install the DSO
|
||||||
|
install -m 755 -d $RPM_BUILD_ROOT%{_libdir}/httpd/modules
|
||||||
|
install -m 755 build-apache/libs/libphp4.so $RPM_BUILD_ROOT%{_libdir}/httpd/modules
|
||||||
|
|
||||||
# Gurrrr @!!$#? apxs/buildroot mess
|
# Apache config fragment
|
||||||
#
|
|
||||||
install -m 755 -d $RPM_BUILD_ROOT/usr/lib/httpd/modules
|
|
||||||
install -m 755 build-apache/libs/libphp4.so $RPM_BUILD_ROOT/usr/lib/httpd/modules
|
|
||||||
|
|
||||||
|
|
||||||
# Install the httpd configuration file
|
|
||||||
#
|
|
||||||
install -m 755 -d $RPM_BUILD_ROOT/etc/httpd/conf.d
|
install -m 755 -d $RPM_BUILD_ROOT/etc/httpd/conf.d
|
||||||
install -m 644 $RPM_SOURCE_DIR/php.conf $RPM_BUILD_ROOT/etc/httpd/conf.d
|
install -m 644 $RPM_SOURCE_DIR/php.conf $RPM_BUILD_ROOT/etc/httpd/conf.d
|
||||||
|
|
||||||
|
|
||||||
# Manuals -- we'll place English (en) in the location where the only version
|
# Manuals -- we'll place English (en) in the location where the only version
|
||||||
# of the manual was before, and langify the rest.
|
# of the manual was before, and langify the rest.
|
||||||
# Hence we don't specify %lang(en) in the files section for the manual rpm
|
# Hence we don't specify %lang(en) in the files section for the manual rpm
|
||||||
@ -543,42 +383,33 @@ for lang in %{manual_langs} ; do
|
|||||||
bzip2 -dc $RPM_SOURCE_DIR/php_manual_${lang}.tar.bz2 | tar -x -C $RPM_BUILD_ROOT%{contentdir}/manual/mod/mod_php4/${target_lang} -f -
|
bzip2 -dc $RPM_SOURCE_DIR/php_manual_${lang}.tar.bz2 | tar -x -C $RPM_BUILD_ROOT%{contentdir}/manual/mod/mod_php4/${target_lang} -f -
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Remove unpackaged files
|
||||||
|
rm -f $RPM_BUILD_ROOT%{_libdir}/php4/*.a \
|
||||||
|
$RPM_BUILD_ROOT%{_bindir}/{phptar,pearize}
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
### Files for main package
|
||||||
################################################################################
|
|
||||||
# PHP ##########################################################################
|
|
||||||
#
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc CODING_STANDARDS CREDITS EXTENSIONS INSTALL LICENSE NEWS README*
|
%doc CODING_STANDARDS CREDITS EXTENSIONS INSTALL LICENSE NEWS README*
|
||||||
%doc Zend/ZEND_*
|
%doc Zend/ZEND_*
|
||||||
%config(noreplace) %{_sysconfdir}/php.ini
|
%config(noreplace) %{_sysconfdir}/php.ini
|
||||||
%{_bindir}/php
|
%{_bindir}/php
|
||||||
%{_bindir}/pear
|
%{_bindir}/pear
|
||||||
%{_datadir}/pear
|
%{_datadir}/pear
|
||||||
%dir %{_libdir}/php4
|
%{_libdir}/httpd/modules/libphp4.so
|
||||||
%{_libdir}/httpd/modules/libphp4.so
|
%config(noreplace) %{_sysconfdir}/httpd/conf.d/php.conf
|
||||||
%config(noreplace) %{_sysconfdir}/httpd/conf.d/php.conf
|
|
||||||
|
|
||||||
%post -p /sbin/ldconfig
|
### Files for -devel package
|
||||||
|
|
||||||
%postun -p /sbin/ldconfig
|
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
# devel ########################################################################
|
|
||||||
#
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_bindir}/php-config
|
%{_bindir}/php-config
|
||||||
%{_bindir}/phpize
|
%{_bindir}/phpize
|
||||||
%{_bindir}/phpextdist
|
%{_bindir}/phpextdist
|
||||||
%{_includedir}/php
|
%{_includedir}/php
|
||||||
%{_libdir}/php
|
%{_libdir}/php
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# From here on in we need to make php-(extension) alter the php.ini
|
# From here on in we need to make php-(extension) alter the php.ini
|
||||||
@ -588,7 +419,6 @@ done
|
|||||||
# file extensions from .so to .dll
|
# file extensions from .so to .dll
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# pgsql ########################################################################
|
# pgsql ########################################################################
|
||||||
#
|
#
|
||||||
@ -607,13 +437,11 @@ done
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
%preun pgsql
|
%preun pgsql
|
||||||
if [ $1 = 0 -a -f %{_sysconfdir}/php.ini ] ; then
|
if [ $1 = 0 -a -f %{_sysconfdir}/php.ini ] ; then
|
||||||
%{__perl} -pi -e "s|^extension=pgsql.so|;extension=pgsql.so|" %{_sysconfdir}/php.ini
|
%{__perl} -pi -e "s|^extension=pgsql.so|;extension=pgsql.so|" %{_sysconfdir}/php.ini
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ $1 = 0 -a -f %{_sysconfdir}/php.ini.rpmnew ] ; then
|
if [ $1 = 0 -a -f %{_sysconfdir}/php.ini.rpmnew ] ; then
|
||||||
%{__perl} -pi -e "s|^extension=pgsql.so|;extension=pgsql.so|" %{_sysconfdir}/php.ini.rpmnew
|
%{__perl} -pi -e "s|^extension=pgsql.so|;extension=pgsql.so|" %{_sysconfdir}/php.ini.rpmnew
|
||||||
fi
|
fi
|
||||||
@ -625,7 +453,6 @@ done
|
|||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_libdir}/php4/mysql.so
|
%{_libdir}/php4/mysql.so
|
||||||
|
|
||||||
|
|
||||||
%post mysql
|
%post mysql
|
||||||
if %{__grep} -q "extension=mysql.so" %{_sysconfdir}/php.ini; then
|
if %{__grep} -q "extension=mysql.so" %{_sysconfdir}/php.ini; then
|
||||||
%{__perl} -pi -e "s|^;extension=mysql.so|extension=mysql.so|" %{_sysconfdir}/php.ini
|
%{__perl} -pi -e "s|^;extension=mysql.so|extension=mysql.so|" %{_sysconfdir}/php.ini
|
||||||
@ -653,7 +480,6 @@ done
|
|||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_libdir}/php4/odbc.so
|
%{_libdir}/php4/odbc.so
|
||||||
|
|
||||||
|
|
||||||
%post odbc
|
%post odbc
|
||||||
if %{__grep} -q "extension=odbc.so" %{_sysconfdir}/php.ini; then
|
if %{__grep} -q "extension=odbc.so" %{_sysconfdir}/php.ini; then
|
||||||
%{__perl} -pi -e "s|^;extension=odbc.so|extension=odbc.so|" %{_sysconfdir}/php.ini
|
%{__perl} -pi -e "s|^;extension=odbc.so|extension=odbc.so|" %{_sysconfdir}/php.ini
|
||||||
@ -682,7 +508,6 @@ done
|
|||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_libdir}/php4/oci8.so
|
%{_libdir}/php4/oci8.so
|
||||||
|
|
||||||
|
|
||||||
%post oci8
|
%post oci8
|
||||||
if %{__grep} -q "extension=oci8.so" %{_sysconfdir}/php.ini; then
|
if %{__grep} -q "extension=oci8.so" %{_sysconfdir}/php.ini; then
|
||||||
%{__perl} -pi -e "s|^;extension=oci8.so|extension=oci8.so|" %{_sysconfdir}/php.ini
|
%{__perl} -pi -e "s|^;extension=oci8.so|extension=oci8.so|" %{_sysconfdir}/php.ini
|
||||||
@ -711,7 +536,6 @@ done
|
|||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_libdir}/php4/imap.so
|
%{_libdir}/php4/imap.so
|
||||||
|
|
||||||
|
|
||||||
%post imap
|
%post imap
|
||||||
if %{__grep} -q "extension=imap.so" %{_sysconfdir}/php.ini; then
|
if %{__grep} -q "extension=imap.so" %{_sysconfdir}/php.ini; then
|
||||||
%{__perl} -pi -e "s|^;extension=imap.so|extension=imap.so|" %{_sysconfdir}/php.ini
|
%{__perl} -pi -e "s|^;extension=imap.so|extension=imap.so|" %{_sysconfdir}/php.ini
|
||||||
@ -739,7 +563,6 @@ done
|
|||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_libdir}/php4/ldap.so
|
%{_libdir}/php4/ldap.so
|
||||||
|
|
||||||
|
|
||||||
%post ldap
|
%post ldap
|
||||||
if %{__grep} -q "extension=ldap.so" %{_sysconfdir}/php.ini; then
|
if %{__grep} -q "extension=ldap.so" %{_sysconfdir}/php.ini; then
|
||||||
%{__perl} -pi -e "s|^;extension=ldap.so|extension=ldap.so|" %{_sysconfdir}/php.ini
|
%{__perl} -pi -e "s|^;extension=ldap.so|extension=ldap.so|" %{_sysconfdir}/php.ini
|
||||||
@ -767,7 +590,6 @@ done
|
|||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_libdir}/php4/snmp.so
|
%{_libdir}/php4/snmp.so
|
||||||
|
|
||||||
|
|
||||||
%post snmp
|
%post snmp
|
||||||
if %{__grep} -q "extension=snmp.so" %{_sysconfdir}/php.ini; then
|
if %{__grep} -q "extension=snmp.so" %{_sysconfdir}/php.ini; then
|
||||||
%{__perl} -pi -e "s|^;extension=snmp.so|extension=snmp.so|" %{_sysconfdir}/php.ini
|
%{__perl} -pi -e "s|^;extension=snmp.so|extension=snmp.so|" %{_sysconfdir}/php.ini
|
||||||
@ -792,7 +614,6 @@ done
|
|||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
|
|
||||||
%files manual
|
%files manual
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{contentdir}/icons/*
|
%{contentdir}/icons/*
|
||||||
@ -806,19 +627,20 @@ done
|
|||||||
%lang(ko) %{contentdir}/manual/mod/mod_php4/ko
|
%lang(ko) %{contentdir}/manual/mod/mod_php4/ko
|
||||||
%lang(pt) %{contentdir}/manual/mod/mod_php4/pt_BR
|
%lang(pt) %{contentdir}/manual/mod/mod_php4/pt_BR
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Jun 11 2003 Joe Orton <jorton@redhat.com> 4.2.2-8.0.8
|
* Mon Dec 2 2002 Joe Orton <jorton@redhat.com> 4.2.2-10
|
||||||
- add bug fixes for #74761, #84828, #85820, #91019, #91279
|
- remove ldconfig invocation in post/postun
|
||||||
- add security fix for CAN-2003-0442
|
- add fixes for #73516, #78586, #75029, #75712, #75878
|
||||||
|
|
||||||
* Wed Jan 22 2003 Joe Orton <jorton@redhat.com> 4.2.2-8.0.7
|
* Wed Nov 6 2002 Joe Orton <jorton@redhat.com> 4.2.2-9
|
||||||
- security fix for wordwrap() overflow, CAN-2002-1396
|
- fixes for libdir=/usr/lib64, based on SuSE's patches.
|
||||||
- bug fixes in Apache httpd 2.0 compatibility: #73516 (partially), #74396,
|
- add build prereqs for zlib-devel, imap-devel, curl-devel (#74819)
|
||||||
#75029, #75712, #75878, #78586
|
- remove unpackaged files from install root
|
||||||
- add missing buildprereqs for zlib-devel, imap-devel (#74819)
|
- libtoolize; use configure cache to speed up build
|
||||||
- own the /usr/lib/php4 directory (#73894)
|
|
||||||
- pass _smp_mflags to make
|
* Mon Sep 23 2002 Philip Copeland <bryce@redhat.com> 4.2.2-8.0.6
|
||||||
|
- PHP cannot determine which UID is being used, so safe
|
||||||
|
mode restrictions were always applied. Fixed. (#74396)
|
||||||
|
|
||||||
* Tue Sep 3 2002 Philip Copeland <bryce@redhat.com> 4.2.2-8.0.4
|
* Tue Sep 3 2002 Philip Copeland <bryce@redhat.com> 4.2.2-8.0.4
|
||||||
- zts support seems to crash out httpd on a *second* sighup
|
- zts support seems to crash out httpd on a *second* sighup
|
||||||
|
Loading…
Reference in New Issue
Block a user