-# PHP Fatal error: Cannot redeclare Zend_Db_Adapter_Pdo_Mysql::_connect() in library/Zend/Db/Adapter/Pdo/Mysql.php on line 120
-# Errors parsing library/Zend/Db/Adapter/Pdo/Mysql.php
-# upstream bug: http://framework.zend.com/issues/browse/ZF-6881
%include /usr/lib/rpm/macros.php
Summary: Zend Framework
Summary(pl.UTF-8): Szkielet Zend
Name: ZendFramework
-Version: 1.8.2
-Release: 0.1
+Version: 1.8.4
+Release: 1
License: New BSD License
Group: Development/Languages/PHP
Source0: http://framework.zend.com/releases/%{name}-%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: 6c5e824feb11a913453b0d4208029e06
+# Source0-md5: d86770f2e0c1f9c836eb643744e4f0ae
Source1: http://framework.zend.com/releases/%{name}-%{version}/%{name}-%{version}-manual-en.tar.gz
-# Source1-md5: 993547c3d128cde28197bb013024d945
+# Source1-md5: 341fbd9ded24b38ecf061675919691e1
Source2: %{name}-find-lang.sh
Patch0: %{name}-additional-locales.patch
-Patch1: %{name}-db_charset.patch
-Patch2: %{name}-deps.patch
-Patch3: %{name}-bug6499.patch
+Patch1: %{name}-deps.patch
+Patch2: %{name}-bug6499.patch
URL: http://framework.zend.com/
+BuildRequires: php-pecl-runkit
BuildRequires: rpm-php-pearprov >= 4.4.2-11
BuildRequires: sed >= 4.0
Requires: php-common >= 4:5.1.4
mv %{name}-%{version}/documentation .
find '(' -name '*.php' -o -name '*.xml' ')' -print0 | xargs -0 %{__sed} -i -e 's,\r$,,'
%patch0 -p1
-cd library
-%patch1 -p0
-cd -
-%patch2 -p1
-%patch3 -p0
+%patch1 -p1
+%patch2 -p0
install %{SOURCE2} find-lang.sh
+# cleanup backups after patching
+find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
+
%build
# check *.php files syntax using runkit extension
lint_php() {
- for a in $(find library -name '*.php'); do
- php -l "$a"
- done
+ php -r '
+ $errors = 0;
+ array_shift($argv);
+ echo "Checking syntax of ", count($argv), " PHP files";
+ foreach ($argv as $file) {
+ echo ".";
+ if (!runkit_lint_file($file)) {
+ echo "PHP Lint: $file\n";
+ $errors++;
+ }
+ }
+ echo "\nDONE!\n";
+ exit($errors ? 1 : 0);
+ ' $(find library -name '*.php')
}
lint_php