summaryrefslogtreecommitdiffstats
path: root/php-doctrine-cache.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-doctrine-cache.spec')
-rw-r--r--php-doctrine-cache.spec83
1 files changed, 40 insertions, 43 deletions
diff --git a/php-doctrine-cache.spec b/php-doctrine-cache.spec
index 520158a..3581e74 100644
--- a/php-doctrine-cache.spec
+++ b/php-doctrine-cache.spec
@@ -2,7 +2,7 @@
#
# Fedora spec file for php-doctrine-cache
#
-# Copyright (c) 2013-2016 Shawn Iwinski <shawn.iwinski@gmail.com>
+# Copyright (c) 2013-2017 Shawn Iwinski <shawn.iwinski@gmail.com>
#
# License: MIT
# http://opensource.org/licenses/MIT
@@ -12,14 +12,14 @@
%global github_owner doctrine
%global github_name cache
-%global github_version 1.6.1
-%global github_commit b6f544a20f4807e81f7044d31e679ccbb1866dc3
+%global github_version 1.7.1
+%global github_commit b3217d58609e9c8e661cd41357a54d926c4a2a1a
%global composer_vendor doctrine
%global composer_project cache
-# "php": "~5.5|~7.0"
-%global php_min_ver 5.5
+# "php": "~7.1"
+%global php_min_ver 7.1
# Build using "--without tests" to disable tests
%global with_tests 0%{!?_without_tests:1}
@@ -34,42 +34,42 @@ Summary: Doctrine Cache
Group: Development/Libraries
License: MIT
URL: https://github.com/%{github_owner}/%{github_name}
-Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+# GitHub export does not include tests.
+# Run php-doctrine-cache-get-source.sh to create full source.
+Source0: %{name}-%{version}-%{github_commit}.tar.gz
+Source1: %{name}-get-source.sh
+
BuildArch: noarch
# Tests
%if %{with_tests}
## composer.json
BuildRequires: php(language) >= %{php_min_ver}
BuildRequires: php-composer(phpunit/phpunit)
-## phpcompatinfo (computed from version 1.6.1)
+## phpcompatinfo (computed from version 1.7.1)
BuildRequires: php-date
BuildRequires: php-hash
+BuildRequires: php-pecl(igbinary)
BuildRequires: php-reflection
BuildRequires: php-spl
-%if 0%{?rhel} != 5
BuildRequires: php-sqlite3
-%endif
## Autoloader
BuildRequires: php-composer(fedora/autoloader)
%endif
# composer.json
Requires: php(language) >= %{php_min_ver}
-# phpcompatinfo (computed from version 1.6.1)
+# phpcompatinfo (computed from version 1.7.1)
Requires: php-date
Requires: php-hash
Requires: php-spl
-%if 0%{?rhel} != 5
-Requires: php-sqlite3
-%endif
# Autoloader
Requires: php-composer(fedora/autoloader)
# Weak dependencies
%if 0%{?fedora} > 21
Suggests: php-composer(predis/predis)
Suggests: php-pecl(apcu)
+Suggests: php-pecl(igbinary)
Suggests: php-pecl(memcache)
Suggests: php-pecl(memcached)
Suggests: php-pecl(mongo)
@@ -114,19 +114,18 @@ AUTOLOAD
%install
-rm -rf %{buildroot}
-mkdir -p %{buildroot}%{phpdir}
-cp -rp lib/* %{buildroot}%{phpdir}/
+mkdir -p %{buildroot}%{phpdir}/Doctrine/Common
+cp -rp lib/Doctrine/Common/Cache %{buildroot}%{phpdir}/Doctrine/Common/
%check
%if %{with_tests}
-: Create tests autoloader
-cat <<'AUTOLOAD' | tee autoload.php
+: Create tests bootstrap
+cat <<'BOOTSTRAP' | tee bootstrap.php
<?php
require_once '%{buildroot}%{phpdir}/Doctrine/Common/Cache/autoload.php';
-\Fedora\Autoloader\Autoload::addPsr0('Doctrine\\Tests\\', __DIR__.'/tests');
-AUTOLOAD
+\Fedora\Autoloader\Autoload::addPsr4('Doctrine\\Tests\\', __DIR__.'/tests/Doctrine/Tests');
+BOOTSTRAP
: Skip tests known to fail
rm -f tests/Doctrine/Tests/Common/Cache/ApcCacheTest.php
@@ -134,40 +133,30 @@ rm -f tests/Doctrine/Tests/Common/Cache/ApcCacheTest.php
: Skip tests requiring a server to connect to
rm -f \
tests/Doctrine/Tests/Common/Cache/CouchbaseCacheTest.php \
+ tests/Doctrine/Tests/Common/Cache/ExtMongoDBCacheTest.php \
+ tests/Doctrine/Tests/Common/Cache/LegacyMongoDBCacheTest.php \
tests/Doctrine/Tests/Common/Cache/MemcacheCacheTest.php \
tests/Doctrine/Tests/Common/Cache/MemcachedCacheTest.php \
- tests/Doctrine/Tests/Common/Cache/MongoDBCacheTest.php \
tests/Doctrine/Tests/Common/Cache/PredisCacheTest.php \
tests/Doctrine/Tests/Common/Cache/RedisCacheTest.php \
tests/Doctrine/Tests/Common/Cache/RiakCacheTest.php
-%if 0%{?rhel} == 5
-rm tests/Doctrine/Tests/Common/Cache/SQLite3CacheTest.php
-%endif
-: Run tests
-run=0
-if which php56; then
- php56 %{_bindir}/phpunit --bootstrap autoload.php
- run=1
-fi
-if which php71; then
- php71 %{_bindir}/phpunit --bootstrap autoload.php
- run=1
-fi
-if [ $run -eq 0 ]; then
-%{_bindir}/phpunit --verbose --bootstrap autoload.php
-fi
+: Upstream tests
+RETURN_CODE=0
+PHPUNIT=$(which phpunit)
+for PHP_EXEC in "" php72; do
+ if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then
+ $PHP_EXEC $PHPUNIT --verbose --bootstrap bootstrap.php \
+ || RETURN_CODE=1
+ fi
+done
+exit $RETURN_CODE
%else
: Tests skipped
%endif
-%clean
-rm -rf %{buildroot}
-
-
%files
-%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc *.md
@@ -178,6 +167,14 @@ rm -rf %{buildroot}
%changelog
+* Sun Sep 10 2017 Shawn Iwinski <shawn.iwinski@gmail.com> - 1.7.1-1
+- Update to 1.7.1 (RHBZ #1485327)
+
+* Sat Aug 05 2017 Shawn Iwinski <shawn.iwinski@gmail.com> - 1.7.0-1
+- Update to 1.7.0 (RHBZ #1473989)
+- Add "get source" script
+- Test with SCLs if available
+
* Fri Nov 04 2016 Shawn Iwinski <shawn.iwinski@gmail.com> - 1.6.1-1
- Updated to 1.6.1 (RHBZ #1389915)
- Removed PHP max version dependency