diff options
author | Remi Collet <fedora@famillecollet.com> | 2014-06-22 10:16:19 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2014-06-22 10:16:19 +0200 |
commit | ce9c92e822ad176e5381f2510790280badcc62fb (patch) | |
tree | 21da4f577df436f9de3f92f00646ca344f2e64f5 | |
parent | a6ae0f5249aa573c355aa8d17bd15721e6e71d6a (diff) |
php-doctrine-cache: rawhide changes
-rw-r--r-- | php-doctrine-cache.spec | 59 |
1 files changed, 43 insertions, 16 deletions
diff --git a/php-doctrine-cache.spec b/php-doctrine-cache.spec index dc33149..76107f0 100644 --- a/php-doctrine-cache.spec +++ b/php-doctrine-cache.spec @@ -1,19 +1,34 @@ -%global github_owner doctrine -%global github_name cache -%global github_version 1.3.0 -%global github_commit e16d7adf45664a50fa86f515b6d5e7f670130449 +# +# RPM spec file for php-doctrine-cache +# +# Copyright (c) 2013-2014 Shawn Iwinski <shawn.iwinski@gmail.com> +# +# License: MIT +# http://opensource.org/licenses/MIT +# +# Please preserve changelog entries +# + +%global github_owner doctrine +%global github_name cache +%global github_version 1.3.0 +%global github_commit e16d7adf45664a50fa86f515b6d5e7f670130449 + +%global composer_vendor doctrine +%global composer_project cache # "php": ">=5.3.2" -%global php_min_ver 5.3.2 +%global php_min_ver 5.3.2 # "phpunit/phpunit": ">=3.7" -%global phpunit_min_ver 3.7 +%global phpunit_min_ver 3.7 -%global summary_base Doctrine Cache +# Build using "--without tests" to disable tests +%global with_tests %{?_without_tests:0}%{!?_without_tests:1} -Name: php-%{github_owner}-%{github_name} +Name: php-%{composer_vendor}-%{composer_project} Version: %{github_version} -Release: 2%{?dist} -Summary: %{summary_base} +Release: 4%{?dist} +Summary: Doctrine Cache Group: Development/Libraries License: MIT @@ -22,15 +37,17 @@ Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{githu BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch +%if %{with_tests} # For tests -BuildRequires: php(language) >= %{php_min_ver} -BuildRequires: php-pear(pear.phpunit.de/PHPUnit) >= %{phpunit_min_ver} +BuildRequires: php(language) >= %{php_min_ver} +BuildRequires: php-phpunit-PHPUnit >= %{phpunit_min_ver} # For tests: phpcompatinfo (computed from v1.3.0) BuildRequires: php-date BuildRequires: php-hash BuildRequires: php-pcre BuildRequires: php-reflection BuildRequires: php-spl +%endif Requires: php(language) >= %{php_min_ver} # phpcompatinfo (computed from git commit v1.3.0) @@ -39,6 +56,9 @@ Requires: php-hash Requires: php-pcre Requires: php-spl +# Composer +Provides: php-composer(%{composer_vendor}/%{composer_project}) = %{version} + # Extracted from Doctrine Common as of version 2.4 Conflicts: php-pear(pear.doctrine-project.org/DoctrineCommon) < 2.4 @@ -57,7 +77,7 @@ Optional: %prep -%setup -q -n %{github_name}-%{github_commit} +%setup -qn %{github_name}-%{github_commit} # Remove files that will never be used find . -name '*WinCache*' -delete @@ -75,6 +95,7 @@ cp -rp lib/* %{buildroot}/%{_datadir}/php/ %check +%if %{with_tests} # Create tests' init cat > tests/Doctrine/Tests/TestInit.php <<'TESTINIT' <?php @@ -87,9 +108,7 @@ spl_autoload_register(function ($class) { TESTINIT # Create PHPUnit config w/ colors turned off -cat phpunit.xml.dist \ - | sed 's/colors="true"/colors="false"/' \ - > phpunit.xml +sed 's/colors="true"/colors="false"/' phpunit.xml.dist > phpunit.xml # Skip tests requiring a server to connect to rm -f \ @@ -98,6 +117,9 @@ rm -f \ tests/Doctrine/Tests/Common/Cache/RiakCacheTest.php %{_bindir}/phpunit --include-path ./lib:./tests -d date.timezone="UTC" +%else +: Tests skipped +%endif %clean @@ -113,6 +135,11 @@ rm -rf %{buildroot} %changelog +* Fri Jun 20 2014 Shawn Iwinski <shawn.iwinski@gmail.com> - 1.3.0-4 +- Added php-composer(%%{composer_vendor}/%%{composer_project}) virtual provide +- Removed %%{summary_base} +- Added option to build without tests + * Sat Jan 11 2014 Remi Collet <rpms@famillecollet.com> 1.3.0-2 - backport for remi repo |