summaryrefslogtreecommitdiffstats
path: root/php-symfony2-Security.spec
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2012-10-30 20:20:36 +0100
committerRemi Collet <fedora@famillecollet.com>2012-10-30 20:20:36 +0100
commit09273fb78102d59d0006509f3308295ad8844c90 (patch)
treeb0c57fe45495f18ad1b7a2b3ece2e373a8dd0edd /php-symfony2-Security.spec
parent89ed47dd74175044f630fbc60f662cef343fe05f (diff)
php-symfony2-Security: sync with rawhide, update to 2.1.3
Diffstat (limited to 'php-symfony2-Security.spec')
-rw-r--r--php-symfony2-Security.spec94
1 files changed, 66 insertions, 28 deletions
diff --git a/php-symfony2-Security.spec b/php-symfony2-Security.spec
index 56e8083..e0d2745 100644
--- a/php-symfony2-Security.spec
+++ b/php-symfony2-Security.spec
@@ -1,11 +1,12 @@
-%{!?pear_metadir: %global pear_metadir %{pear_phpdir}}
%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
+%{!?pear_metadir: %global pear_metadir %{pear_phpdir}}
%global pear_channel pear.symfony.com
%global pear_name %(echo %{name} | sed -e 's/^php-symfony2-//' -e 's/-/_/g')
+%global php_min_ver 5.3.3
Name: php-symfony2-Security
-Version: 2.1.2
+Version: 2.1.3
Release: 1%{?dist}
Summary: Symfony2 %{pear_name} Component
@@ -13,26 +14,38 @@ Group: Development/Libraries
License: MIT
URL: http://symfony.com/components
Source0: http://%{pear_channel}/get/%{pear_name}-%{version}.tgz
-Source1: bootstrap.php
+Patch0: %{name}-tests-bootstrap.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: php-pear(PEAR)
BuildRequires: php-channel(%{pear_channel})
-# For tests
+# Test requires
+BuildRequires: php(language) >= %{php_min_ver}
BuildRequires: php-pear(pear.phpunit.de/PHPUnit)
-BuildRequires: php-pear(%{pear_channel}/HttpKernel)
-BuildRequires: php-pear(%{pear_channel}/HttpFoundation)
-BuildRequires: php-pear(%{pear_channel}/EventDispatcher)
-BuildRequires: php-pear(%{pear_channel}/Form)
-BuildRequires: php-pear(%{pear_channel}/Routing)
-
-Requires: php-common >= 5.3.2
+BuildRequires: php-pear(%{pear_channel}/EventDispatcher) >= 2.1.0
+BuildRequires: php-pear(%{pear_channel}/HttpFoundation) >= 2.1.0
+BuildRequires: php-pear(%{pear_channel}/HttpKernel) >= 2.1.0
+BuildRequires: php-pear(%{pear_channel}/Form) >= 2.1.0
+BuildRequires: php-pear(%{pear_channel}/Routing) >= 2.1.0
+BuildRequires: php-pear(%{pear_channel}/Validator) >= 2.1.0
+# TODO: Add DoctrineCommon and DoctrineDBAL (>=2.2,<2.4-dev) when available
+# Test requires: phpci
+BuildRequires: php-date
+BuildRequires: php-hash
+BuildRequires: php-json
+BuildRequires: php-openssl
+BuildRequires: php-pcre
+BuildRequires: php-pdo
+BuildRequires: php-reflection
+BuildRequires: php-spl
+
+Requires: php(language) >= %{php_min_ver}
Requires: php-pear(PEAR)
Requires: php-channel(%{pear_channel})
-Requires: php-pear(%{pear_channel}/HttpKernel) = %{version}
-Requires: php-pear(%{pear_channel}/HttpFoundation) = %{version}
-Requires: php-pear(%{pear_channel}/EventDispatcher) = %{version}
+Requires: php-pear(%{pear_channel}/EventDispatcher) >= 2.1.0
+Requires: php-pear(%{pear_channel}/HttpFoundation) >= 2.1.0
+Requires: php-pear(%{pear_channel}/HttpKernel) >= 2.1.0
Requires(post): %{__pear}
Requires(postun): %{__pear}
# phpci requires
@@ -45,10 +58,12 @@ Requires: php-pdo
Requires: php-reflection
Requires: php-spl
# Optional requires
-Requires: php-pear(%{pear_channel}/ClassLoader) = %{version}
-Requires: php-pear(%{pear_channel}/Finder) = %{version}
-Requires: php-pear(%{pear_channel}/Form) = %{version}
-Requires: php-pear(%{pear_channel}/Routing) = %{version}
+Requires: php-pear(%{pear_channel}/ClassLoader) >= 2.1.0
+Requires: php-pear(%{pear_channel}/Finder) >= 2.1.0
+Requires: php-pear(%{pear_channel}/Form) >= 2.1.0
+Requires: php-pear(%{pear_channel}/Routing) >= 2.1.0
+Requires: php-pear(%{pear_channel}/Validator) >= 2.1.0
+# TODO: Add DoctrineDBAL (>=2.2,<2.4-dev) when available
Provides: php-pear(%{pear_channel}/%{pear_name}) = %{version}
@@ -64,11 +79,21 @@ Optional dependencies: DoctrineCommon and DoctrineDBAL
%prep
%setup -q -c
-# Hum...
-sed -e '/CHANGELOG.md/s/role="php"/role="doc"/' \
+# Patches
+cd %{pear_name}-%{version}
+%patch0 -p0
+cd ..
+
+# Modify PEAR package.xml file:
+# - Remove .gitignore file
+# - Change role from "php" to "doc" for CHANGELOG.md file
+# - Change role from "php" to "test" for all test files
+# - Remove md5sum from bootsrap.php file since it was patched
+sed -e '/.git/d' \
+ -e '/CHANGELOG.md/s/role="php"/role="doc"/' \
-e '/phpunit.xml.dist/s/role="php"/role="test"/' \
-e '/Tests/s/role="php"/role="test"/' \
- -e '/.gitignore/d' \
+ -e '/bootstrap.php/s/md5sum="[^"]*"\s*//' \
-i package.xml
# package.xml is version 2.0
@@ -81,20 +106,19 @@ mv package.xml %{pear_name}-%{version}/%{name}.xml
%install
cd %{pear_name}-%{version}
-%{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{name}.xml
+%{__pear} install --nodeps --packagingroot %{buildroot} %{name}.xml
# Clean up unnecessary files
-rm -rf $RPM_BUILD_ROOT%{pear_metadir}/.??*
+rm -rf %{buildroot}%{pear_metadir}/.??*
# Install XML package description
-mkdir -p $RPM_BUILD_ROOT%{pear_xmldir}
-install -pm 644 %{name}.xml $RPM_BUILD_ROOT%{pear_xmldir}
+mkdir -p %{buildroot}%{pear_xmldir}
+install -pm 644 %{name}.xml %{buildroot}%{pear_xmldir}
%check
-cd %{pear_name}-%{version}/Symfony/Component/%{pear_name}/Tests
-cp %{SOURCE1} bootstrap.php
-phpunit --bootstrap bootstrap.php --verbose .
+cd %{pear_name}-%{version}/Symfony/Component/%{pear_name}
+%{_bindir}/phpunit
%post
@@ -118,6 +142,20 @@ fi
%changelog
+* Tue Oct 30 2012 Remi Collet <RPMS@FamilleCollet.com> 2.1.3-1
+- sync with rawhide, update to 2.1.3
+
+* Sat Oct 27 2012 Shawn Iwinski <shawn.iwinski@gmail.com> 2.1.2-1
+- Updated to upstream version 2.1.2
+- PHP minimum version 5.3.3 instead of 5.3.2
+- Require other components ">= 2.1.0" instead of "= %%{version}"
+- Added Validator require
+- Added PEAR package.xml modifications
+- Added patch for tests' bootstrap.php
+- Added tests (%%check)
+- Changed RPM_BUILD_ROOT to %%{buildroot}
+- Added %%global pear_metadir
+
* Sat Oct 6 2012 Remi Collet <RPMS@FamilleCollet.com> 2.1.2-1
- update to 2.1.2