From 4a85474d08e025d63b61337c5b5d22fc336d96ee Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 7 Jun 2017 09:11:30 +0200 Subject: import from fedora --- php-cache-filesystem-adapter.spec | 178 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 178 insertions(+) create mode 100644 php-cache-filesystem-adapter.spec diff --git a/php-cache-filesystem-adapter.spec b/php-cache-filesystem-adapter.spec new file mode 100644 index 0000000..cf306e7 --- /dev/null +++ b/php-cache-filesystem-adapter.spec @@ -0,0 +1,178 @@ +# +# Fedora spec file for php-cache-filesystem-common +# +# Copyright (c) 2017 Shawn Iwinski +# +# License: MIT +# http://opensource.org/licenses/MIT +# +# Please preserve changelog entries +# + +%global github_owner php-cache +%global github_name filesystem-adapter +%global github_version 0.4.0 +%global github_commit 98ee81842156d18dade449f4dd5b3a89f9a9fcc9 + +%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/integration-tests": "^0.16" +%global cache_integration_tests_min_ver 0.16 +%global cache_integration_tests_max_ver 1.0 +# "league/flysystem": "^1.0" +%global league_flysystem_min_ver 1.0 +%global league_flysystem_max_ver 2.0 +# "psr/cache": "^1.0" +%global psr_cache_min_ver 1.0 +%global psr_cache_max_ver 2.0 +# "psr/simple-cache": "^1.0" +%global psr_simple_cache_min_ver 1.0 +%global psr_simple_cache_max_ver 2.0 + +# Build using "--without tests" to disable tests +%global with_tests 0%{!?_without_tests:1} + +%{!?phpdir: %global phpdir %{_datadir}/php} + +Name: php-%{composer_vendor}-%{composer_project} +Version: %{github_version} +Release: 2%{?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 + +BuildArch: noarch +# Tests +%if %{with_tests} +## composer.json +BuildRequires: php(language) >= %{php_min_ver} +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) +BuildRequires: php-date +BuildRequires: php-pcre +## Autoloader +BuildRequires: php-composer(fedora/autoloader) +%endif + +# composer.json +Requires: php(language) >= %{php_min_ver} +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} +Requires: php-composer(league/flysystem) >= %{league_flysystem_min_ver} +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) +Requires: php-date +Requires: php-pcre +# Autoloader +Requires: php-composer(fedora/autoloader) + +# Composer +Provides: php-composer(%{composer_vendor}/%{composer_project}) = %{version} +Provides: php-composer(psr/cache-implementation) = 1.0 + +%description +A PSR-6 cache implementation using filesystem. This implementation supports +tags. + +Autoloader: %{phpdir}/Cache/Adapter/Filesystem/autoload.php + + +%prep +%setup -qn %{github_name}-%{github_commit} + + +%build +: Create autoloader +cat <<'AUTOLOAD' | tee autoload.php + - 0.4.0-2 +- Fix directory ownership + +* Fri Apr 14 2017 Shawn Iwinski - 0.4.0-1 +- Initial package -- cgit