summaryrefslogtreecommitdiffstats
path: root/php-cache-filesystem-adapter.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-cache-filesystem-adapter.spec')
-rw-r--r--php-cache-filesystem-adapter.spec52
1 files changed, 37 insertions, 15 deletions
diff --git a/php-cache-filesystem-adapter.spec b/php-cache-filesystem-adapter.spec
index 07f07cf..cf1b15c 100644
--- a/php-cache-filesystem-adapter.spec
+++ b/php-cache-filesystem-adapter.spec
@@ -1,8 +1,8 @@
-# remirepo spec file for php-cache-filesystem-common, from:
+# remirepo spec file for php-cache-filesystem-adapter, from:
#
-# Fedora spec file for php-cache-filesystem-common
+# Fedora spec file for php-cache-filesystem-adapter
#
-# Copyright (c) 2017 Shawn Iwinski <shawn@iwin.ski>
+# Copyright (c) 2017-2019 Shawn Iwinski <shawn@iwin.ski>
#
# License: MIT
# http://opensource.org/licenses/MIT
@@ -12,17 +12,17 @@
%global github_owner php-cache
%global github_name filesystem-adapter
-%global github_version 0.4.0
-%global github_commit 98ee81842156d18dade449f4dd5b3a89f9a9fcc9
+%global github_version 1.0.0
+%global github_commit d50680b6dabbe39f9831f5fc9efa61c09d936017
%global composer_vendor cache
%global composer_project filesystem-adapter
# "php": "^5.6 || ^7.0"
%global php_min_ver 5.6
-# "cache/adapter-common": "^0.4"
-%global cache_adapter_common_min_ver 0.4
-%global cache_adapter_common_max_ver 1.0
+# "cache/adapter-common": "^1.0"
+%global cache_adapter_common_min_ver 1.0
+%global cache_adapter_common_max_ver 2.0
# "cache/integration-tests": "^0.16"
%global cache_integration_tests_min_ver 0.16
%global cache_integration_tests_max_ver 1.0
@@ -43,31 +43,42 @@
Name: php-%{composer_vendor}-%{composer_project}
Version: %{github_version}
-Release: 2%{?github_release}%{?dist}
+Release: 1%{?github_release}%{?dist}
Summary: A PSR-6 cache implementation using filesystem
-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
+
+# GitHub export does not include tests
+# Run php-cache-filesystem-adapter-get-source.sh to create full source
+Source0: %{name}-%{github_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)
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+BuildRequires: (php-composer(cache/adapter-common) >= %{cache_adapter_common_min_ver} with php-composer(cache/adapter-common) < %{cache_adapter_common_max_ver})
+BuildRequires: (php-composer(cache/integration-tests) >= %{cache_integration_tests_min_ver} with php-composer(cache/integration-tests) < %{cache_integration_tests_max_ver})
+BuildRequires: (php-composer(league/flysystem) >= %{league_flysystem_min_ver} with php-composer(league/flysystem) < %{league_flysystem_max_ver})
+BuildRequires: (php-composer(psr/cache) >= %{psr_cache_min_ver} with php-composer(psr/cache) < %{psr_cache_max_ver})
+BuildRequires: (php-composer(psr/simple-cache) >= %{psr_simple_cache_min_ver} with php-composer(psr/simple-cache) < %{psr_simple_cache_max_ver})
+%else
BuildRequires: php-composer(cache/adapter-common) < %{cache_adapter_common_max_ver}
BuildRequires: php-composer(cache/adapter-common) >= %{cache_adapter_common_min_ver}
BuildRequires: php-composer(cache/integration-tests) < %{cache_integration_tests_max_ver}
BuildRequires: php-composer(cache/integration-tests) >= %{cache_integration_tests_min_ver}
BuildRequires: php-composer(league/flysystem) < %{league_flysystem_max_ver}
BuildRequires: php-composer(league/flysystem) >= %{league_flysystem_min_ver}
-BuildRequires: php-composer(phpunit/phpunit)
BuildRequires: php-composer(psr/cache) < %{psr_cache_max_ver}
BuildRequires: php-composer(psr/cache) >= %{psr_cache_min_ver}
BuildRequires: php-composer(psr/simple-cache) < %{psr_simple_cache_max_ver}
BuildRequires: php-composer(psr/simple-cache) >= %{psr_simple_cache_min_ver}
-## phpcompatinfo (computed from version 0.4.0)
+%endif
+## phpcompatinfo (computed from version 1.0.0)
BuildRequires: php-date
BuildRequires: php-pcre
## Autoloader
@@ -76,6 +87,12 @@ BuildRequires: php-composer(fedora/autoloader)
# composer.json
Requires: php(language) >= %{php_min_ver}
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+Requires: (php-composer(cache/adapter-common) >= %{cache_adapter_common_min_ver} with php-composer(cache/adapter-common) < %{cache_adapter_common_max_ver})
+Requires: (php-composer(league/flysystem) >= %{league_flysystem_min_ver} with php-composer(league/flysystem) < %{league_flysystem_max_ver})
+Requires: (php-composer(psr/cache) >= %{psr_cache_min_ver} with php-composer(psr/cache) < %{psr_cache_max_ver})
+Requires: (php-composer(psr/simple-cache) >= %{psr_simple_cache_min_ver} with php-composer(psr/simple-cache) < %{psr_simple_cache_max_ver})
+%else
Requires: php-composer(cache/adapter-common) < %{cache_adapter_common_max_ver}
Requires: php-composer(cache/adapter-common) >= %{cache_adapter_common_min_ver}
Requires: php-composer(league/flysystem) < %{league_flysystem_max_ver}
@@ -84,7 +101,8 @@ Requires: php-composer(psr/cache) < %{psr_cache_max_ver}
Requires: php-composer(psr/cache) >= %{psr_cache_min_ver}
Requires: php-composer(psr/simple-cache) < %{psr_simple_cache_max_ver}
Requires: php-composer(psr/simple-cache) >= %{psr_simple_cache_min_ver}
-# phpcompatinfo (computed from version 0.4.0)
+%endif
+# phpcompatinfo (computed from version 1.0.0)
Requires: php-date
Requires: php-pcre
# Autoloader
@@ -146,7 +164,7 @@ BOOTSTRAP
: Upstream tests
RETURN_CODE=0
PHPUNIT=$(which phpunit)
-for PHP_EXEC in "" php70 php71 php72; do
+for PHP_EXEC in "" php71 php72 php73 php74; do
if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then
$PHP_EXEC $PHPUNIT --verbose --bootstrap bootstrap.php \
|| RETURN_CODE=1
@@ -172,6 +190,10 @@ exit $RETURN_CODE
%changelog
+* Sat Jun 01 2019 Shawn Iwinski <shawn@iwin.ski> - 1.0.0-1
+- Update to 1.0.0 (RHBZ #1471569)
+- Add range version dependencies for Fedora >= 27 || RHEL >= 8
+
* Tue May 30 2017 Shawn Iwinski <shawn@iwin.ski> - 0.4.0-2
- Fix directory ownership