summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2012-09-20 08:57:37 +0200
committerRemi Collet <fedora@famillecollet.com>2012-09-20 08:57:37 +0200
commit7fae2f7d3ce396e11311caf00c2cac5516f95860 (patch)
tree38ac391a1cf3890ffa3053444dd4adee5b722747
parent55539a1f147a0964575817a223e0bf99e5fd1f62 (diff)
php-symfony2-Yaml: update to 2.1.1 for PHPUnit 3.7
-rw-r--r--php-symfony2-Yaml.spec27
1 files changed, 26 insertions, 1 deletions
diff --git a/php-symfony2-Yaml.spec b/php-symfony2-Yaml.spec
index da45d95..f293571 100644
--- a/php-symfony2-Yaml.spec
+++ b/php-symfony2-Yaml.spec
@@ -2,9 +2,11 @@
%global pear_channel pear.symfony.com
%global pear_name %(echo %{name} | sed -e 's/^php-symfony2-//' -e 's/-/_/g')
+# Can't run in mock because circular dependency on PHPUnit
+%global with_tests %{?_with_tests:1}%{!?_with_tests:0}
Name: php-symfony2-Yaml
-Version: 2.0.17
+Version: 2.1.1
Release: 1%{?dist}
Summary: Symfony2 %{pear_name} Component
@@ -17,6 +19,9 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: php-pear(PEAR)
BuildRequires: php-channel(%{pear_channel})
+%if %{with_tests}
+BuildRequires: php-pear(pear.phpunit.de/PHPUnit)
+%endif
Requires: php-common >= 5.3.2
Requires: php-pear(PEAR)
@@ -49,6 +54,13 @@ specification.
%prep
%setup -q -c
+
+# Hum...
+sed -e '/CHANGELOG.md/s/role="php"/role="doc"/' \
+ -e '/phpunit.xml.dist/s/role="php"/role="test"/' \
+ -e '/Tests/s/role="php"/role="test"/' \
+ -i package.xml
+
# package.xml is version 2.0
mv package.xml %{pear_name}-%{version}/%{name}.xml
@@ -69,6 +81,15 @@ mkdir -p $RPM_BUILD_ROOT%{pear_xmldir}
install -pm 644 %{name}.xml $RPM_BUILD_ROOT%{pear_xmldir}
+%check
+%if %{with_tests}
+cd %{pear_name}-%{version}/Symfony/Component/Yaml/Tests
+phpunit --bootstrap bootstrap.php .
+%else
+: Tests skipped, missing --with tests option
+%endif
+
+
%post
%{__pear} install --nodeps --soft --force --register-only \
%{pear_xmldir}/%{name}.xml >/dev/null || :
@@ -88,9 +109,13 @@ fi
%dir %{pear_phpdir}/Symfony
%dir %{pear_phpdir}/Symfony/Component
%{pear_phpdir}/Symfony/Component/%{pear_name}
+ %{pear_testdir}/%{pear_name}
%changelog
+* Thu Sep 20 2012 Remi Collet <RPMS@FamilleCollet.com> 2.1.1-1
+- Update to 2.1.1 for PHPUnit 3.7
+
* Sat Sep 15 2012 Remi Collet <RPMS@FamilleCollet.com> 2.0.17-1
- Update to 2.0.17, backport for remi repository