[php53-extras/el5] Initial import of php53 for EPEL 5

Robert Scheck robert at fedoraproject.org
Thu Aug 4 00:06:30 UTC 2011


commit 5ff0ce2839ac6d5859e77c150fdf23225d252a57
Author: Robert Scheck <robert at fedoraproject.org>
Date:   Thu Aug 4 02:06:05 2011 +0200

    Initial import of php53 for EPEL 5

 .gitignore        |    1 +
 php53-extras.spec |  214 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 sources           |    1 +
 3 files changed, 216 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..4c6f865 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+php-5.3.3.tar.bz2
diff --git a/php53-extras.spec b/php53-extras.spec
new file mode 100644
index 0000000..f49bb1d
--- /dev/null
+++ b/php53-extras.spec
@@ -0,0 +1,214 @@
+%global modules	enchant interbase pdo_firebird mcrypt mssql pdo_dblib recode tidy
+
+Summary:	Additional PHP modules from the standard PHP distribution
+Name:		php53-extras
+Version:	5.3.3
+Release:	1%{?dist}
+Group:		Development/Languages
+License:	PHP and LGPLv2 and LGPLv2+
+URL:		http://www.php.net/
+Source0:	http://www.php.net/distributions/php-%{version}.tar.bz2
+BuildRequires:	php53-devel = %{version}
+BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+%description
+PHP is an HTML-embedded scripting language.
+
+This package contains various additional modules for PHP which have not
+been included in the basic PHP package for Red Hat Enterprise Linux 5.
+
+%package -n php53-enchant
+Summary:	Human Language and Character Encoding Support
+Group:		System Environment/Libraries
+Requires:	php(api) = %{php_core_api}, php(zend-abi) = %{php_zend_api}
+BuildRequires:	enchant-devel >= 1.2.4, enchant-aspell
+Provides:	php-enchant = %{version}-%{release}
+
+%description -n php53-enchant
+The php53-intl package contains a dynamic shared object that will add
+support for using the enchant library to PHP.
+
+%package -n php53-interbase
+Summary:	Module for PHP applications that use Interbase/Firebird databases
+Group:		Development/Languages
+Requires:	php(api) = %{php_core_api}, php(zend-abi) = %{php_zend_api}
+Requires:	php53-pdo >= %{version}, php-pdo-abi = %{php_pdo_api}
+BuildRequires:	firebird-devel
+Provides:	php-interbase = %{version}-%{release}
+Provides:	php_database, php-firebird, php-pdo_firebird
+
+%description -n php53-interbase
+The php53-interbase package contains a dynamic shared object that will add
+database support through Interbase/Firebird to PHP.
+
+InterBase is the name of the closed-source variant of this RDBMS that was
+developed by Borland/Inprise. 
+
+Firebird is a commercially independent project of C and C++ programmers, 
+technical advisors and supporters developing and enhancing a multi-platform 
+relational database management system based on the source code released by 
+Inprise Corp (now known as Borland Software Corp) under the InterBase Public
+License.
+
+%package -n php53-mcrypt
+Summary:	Standard PHP module provides mcrypt library support
+Group:		Development/Languages
+Requires:	php(api) = %{php_core_api}, php(zend-abi) = %{php_zend_api}
+BuildRequires:	libmcrypt-devel
+Provides:	php-mcrypt = %{version}-%{release}
+
+%description -n php53-mcrypt
+The php53-mcrypt package contains a dynamic shared object that will add
+support for using the mcrypt library to PHP.
+
+%package -n php53-mssql
+Summary:	MSSQL database module for PHP
+Group:		Development/Languages
+Requires:	php(api) = %{php_core_api}, php(zend-abi) = %{php_zend_api}
+Requires:	php53-pdo >= %{version}, php-pdo-abi = %{php_pdo_api}
+BuildRequires:	freetds-devel
+Provides:	php-mssql = %{version}-%{release}
+Provides:	php_database, php-pdo_dblib
+
+%description -n php53-mssql
+The php53-mssql package contains a dynamic shared object that will add
+MSSQL database support to PHP.  It uses the TDS (Tabular DataStream)
+protocol through the freetds library, hence any database server which
+supports TDS can be accessed.
+
+%package -n php53-recode
+Summary:	Module for PHP applications for using the recode library
+Group:		System Environment/Libraries
+Requires:	php(api) = %{php_core_api}, php(zend-abi) = %{php_zend_api}
+BuildRequires:	recode-devel
+Provides:	php-recode = %{version}-%{release}
+
+%description -n php53-recode
+The php53-recode package contains a dynamic shared object that will add
+support for using the recode library to PHP.
+
+%package -n php53-tidy
+Summary:	Standard PHP module provides tidy library support
+Group:		Development/Languages
+Requires:	php(api) = %{php_core_api}, php(zend-abi) = %{php_zend_api}
+BuildRequires:	libtidy-devel
+Provides:	php-tidy = %{version}-%{release}
+
+%description -n php53-tidy
+The php53-tidy package contains a dynamic shared object that will add
+support for using the tidy library to PHP.
+
+%prep
+%setup -q -n php-%{version}
+
+# Avoid tests which require a database
+rm -rf ext/interbase/tests
+
+%build
+export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -Wno-pointer-sign"
+export PHP_RPATH=no
+
+for module in %{modules}; do
+  pushd ext/$module
+    phpize
+    %configure --with-libdir=%{_lib} --with-interbase=%{_libdir}/firebird --with-pdo-firebird=%{_libdir}/firebird
+    make %{?_smp_mflags}
+  popd
+done
+
+%install
+rm -rf $RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT{%{php_extdir},%{_sysconfdir}/php.d}
+
+for module in %{modules}; do
+  install -m 755 ext/${module}/modules/*.so $RPM_BUILD_ROOT%{php_extdir}
+  cat > $RPM_BUILD_ROOT%{_sysconfdir}/php.d/${module}.ini << EOF
+; Enable ${module} extension module
+extension=${module}.so
+EOF
+  cat > files.${module} << EOF
+%defattr(-,root,root,-)
+%{php_extdir}/${module}.so
+%config(noreplace) %{_sysconfdir}/php.d/${module}.ini
+EOF
+done
+
+cat files.pdo_dblib >> files.mssql
+cat files.pdo_firebird >> files.interbase
+
+%check
+# As we don't build whole php here, we must do all the tests
+# with the system php executable. Unfortunately, we cannot use
+# system's /usr/bin/php directly, therefore a wrapper is needed.
+# 
+# Some reasons for such a wrapper are:
+# - /usr/bin/php cannot handle "-d extension=" etc. on the command line
+#   (probably because of the CGI-oriented variant of php executable is
+#   installed as /usr/bin/php). We should use own config file for this.
+# - During "run-tests.php" execution, php is invoked again (recursively).
+#   (i.e. we cannot explicitly set another config for deeper php invokation).
+# - We cannot exclude /etc/php.d/* files on the host machine. It can lead to
+#   some stderr reports, which spoil the tests' output. To omit extra warnings,
+#   the stderr is redirected to /dev/null
+# - When invoked again, some CGI-related environment variables are set 
+#   by default, which confuse php a lot. Therefore the environment is cleared,
+#   and only needed variables are provided.
+# 
+# The test stuff is derived from the original tests in the php tarball,
+# with preserving some needed specifications etc.
+ 
+mkdir modules || exit 1
+ 
+cat > modules.ini << EOF
+open_basedir=
+safe_mode=0
+output_buffering=0
+extension_dir=$PWD/modules
+EOF
+
+for module in %{modules}; do
+  cp -a ext/$module/modules/${module}.so modules
+  echo "extension=${module}.so" >> modules.ini
+done
+ 
+cat > php <<EOF
+#!/bin/sh
+exec 2> /dev/null
+env -i TEST_PHP_EXECUTABLE=$PWD/php TEST_PHP_SRCDIR=\$TEST_PHP_SRCDIR \
+       NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2 \
+       %{_bindir}/php -c $PWD/modules.ini "\$@"
+EOF
+chmod +x php
+
+for module in %{modules}; do
+  [ -d ext/$module/tests ] || continue
+  pushd ext/$module
+    TEST_PHP_SRCDIR=$PWD ../../php ../../run-tests.php tests
+    set +x
+    fail=0
+    for f in tests/*.diff; do
+      [ -f "$f" ] || continue
+      echo "TEST FAILURE: $PWD/$f --"
+      cat $f
+      echo
+      echo "-- $PWD/$f result ends."
+      fail=1
+     done
+   [ $fail -ne 0 ] && exit $fail
+ popd
+done
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files -n php53-enchant -f files.enchant
+%files -n php53-interbase -f files.interbase
+%files -n php53-mcrypt -f files.mcrypt
+%files -n php53-mssql -f files.mssql
+%files -n php53-recode -f files.recode
+%files -n php53-tidy -f files.tidy
+
+%changelog
+* Wed Jul 27 2011 Robert Scheck <robert at fedoraproject.org> 5.3.3-1
+- Upgrade to 5.3.3
+- Initial spec file for Red Hat Enterprise Linux 5
diff --git a/sources b/sources
index e69de29..c52953a 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+21ceeeb232813c10283a5ca1b4c87b48  php-5.3.3.tar.bz2


More information about the scm-commits mailing list