From 791462d57db9e5257087f5cb459221bb06e27f92 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sat, 14 Dec 2013 12:08:27 +0100 Subject: php-symfony: fix PEAR compatibility: add missing "autoloader.php" --- getautoloader.sh | 32 ++++++++++++++++++++++++++++++++ php-symfony.spec | 19 ++++++++++++++++++- 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 getautoloader.sh diff --git a/getautoloader.sh b/getautoloader.sh new file mode 100644 index 0000000..0e9af18 --- /dev/null +++ b/getautoloader.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +if [ "$1" = "" ] +then + echo usage $0 version + exit 1 +fi + +tmp=$(mktemp --dir) +pushd $tmp + +echo -e "\n+ channel" +pear channel-discover pear.symfony.com + +echo -e "\n+ packages" +pear list-all -c symfony2 | while read name version descr +do + if [ "$name" = "ALL" -o "$name" = "PACKAGE" -o "$version" = "" ] + then + continue + fi + pear download $name-$1 + tar xf $(basename $name)-$1.tgz --strip-components=1 +done +lst=$(find Symfony -name autoloader.php) + +popd +echo -e "\n+ archive: autoloader-$1.tgz" +tar cvzf autoloader-$1.tgz -C $tmp $lst + +echo -e "\n+ cleanups" +rm -rf $tmp diff --git a/php-symfony.spec b/php-symfony.spec index dbc9854..92a6283 100644 --- a/php-symfony.spec +++ b/php-symfony.spec @@ -34,10 +34,11 @@ %global symfony_dir %{_datadir}/php/Symfony %global pear_channel pear.symfony.com +%global with_tests %{?_without_tests:0}%{!?_without_tests:1} Name: php-symfony Version: %{github_version} -Release: 3%{dist} +Release: 4%{dist} Summary: PHP framework for web projects Group: Development/Libraries @@ -45,6 +46,11 @@ License: MIT URL: http://symfony.com Source0: https://github.com/%{github_owner}/%{github_name}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz +# Run this command to download the PEAR package +# and retrieve missing files github archive +Source1: getautoloader.sh +Source2: autoloader-%{version}.tgz + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch # For tests @@ -1212,6 +1218,10 @@ The YAML Component loads and dumps YAML files. find src -name '.git*' -delete rm -rf src/Symfony/Bridge/{Propel1,ProxyManager} +# Add missing files for PEAR compatibility +cd src +tar xf %{SOURCE2} + %build # Empty build section, nothing required @@ -1279,6 +1289,7 @@ sed -i \ rm -f src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NativeFileSessionHandlerTest.php %endif +%if %{with_tests} # Run tests for PKG in src/Symfony/*/*; do echo -e "\n>>>>>>>>>>>>>>>>>>>>>>> ${PKG}\n" @@ -1288,6 +1299,9 @@ for PKG in src/Symfony/*/*; do -d date.timezone="UTC" \ $PKG done +%else +: Skip test suite +%endif %files @@ -1870,6 +1884,9 @@ done # ############################################################################## %changelog +* Sat Dec 14 2013 Remi Collet 2.3.7-4 +- fix PEAR compatibility: add missing "autoloader.php" + * Wed Nov 27 2013 Remi Collet 2.3.7-3 - sync with rawhide, build for remi repo -- cgit