blob: 23f88693b602b56583bc212b466938f3a00350f9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
|
# remirepo spec file for php-psr-simple-cache, from:
#
# Fedora spec file for php-psr-simple-cache
#
# Copyright (c) 2017-2018 Shawn Iwinski <shawn@iwin.ski>
#
# License: MIT
# http://opensource.org/licenses/MIT
#
# Please preserve changelog entries
#
%global github_owner php-fig
%global github_name simple-cache
%global github_version 1.0.1
%global github_commit 408d5eafb83c57f6365a3ca330ff23aa4a5fa39b
%global composer_vendor psr
%global composer_project simple-cache
# "php": ">=5.3.0"
%global php_min_ver 5.3.0
%{!?phpdir: %global phpdir %{_datadir}/php}
Name: php-%{composer_vendor}-%{composer_project}
Version: %{github_version}
Release: 1%{?github_release}%{?dist}
Summary: Common interfaces for simple caching (PSR-16)
License: MIT
URL: http://www.php-fig.org/psr/psr-16/
Source0: https://github.com/%{github_owner}/%{github_name}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz
BuildArch: noarch
# Minimal autoloader test
BuildRequires: php-cli >= %{php_min_ver}
# Autoloader
BuildRequires: php-composer(fedora/autoloader)
# composer.json
Requires: php(language) >= %{php_min_ver}
# phpcompatinfo (computed from version 1.0.0)
# <none>
# Autoloader
Requires: php-composer(fedora/autoloader)
# Composer
Provides: php-composer(%{composer_vendor}/%{composer_project}) = %{version}
%description
This repository holds all interfaces related to PSR-16.
Note that this is not a cache implementation of its own. It is merely an
interface that describes a cache implementation. See the specification [1]
for more details.
You can find implementations of the specification by looking for packages
providing the psr/simple-cache-implementation [2] virtual package.
Autoloader: %{phpdir}/Psr/SimpleCache/autoload.php
[1] https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-16-simple-cache.md
[2] https://packagist.org/providers/psr/simple-cache-implementation
%prep
%setup -qn %{github_name}-%{github_commit}
%build
: Create autoloader
cat <<'AUTOLOAD' | tee src/autoload.php
<?php
/**
* Autoloader for %{name} and its' dependencies
* (created by %{name}-%{version}-%{release}).
*/
require_once '%{phpdir}/Fedora/Autoloader/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('Psr\\SimpleCache\\', __DIR__);
AUTOLOAD
%install
mkdir -p %{buildroot}%{phpdir}/Psr
cp -rp src %{buildroot}%{phpdir}/Psr/SimpleCache
%check
: Minimal autoloader test
%{_bindir}/php -r '
require "%{buildroot}%{phpdir}/Psr/SimpleCache/autoload.php";
exit(interface_exists("Psr\\SimpleCache\\CacheInterface") ? 0 : 1);
'
%files
%{!?_licensedir:%global license %%doc}
%license LICENSE.md
%doc README.md
%doc composer.json
%dir %{phpdir}/Psr
%{phpdir}/Psr/SimpleCache
%changelog
* Tue Apr 17 2018 Remi Collet <remi@remirepo.net> - 1.0.1-1
- update to 1.0.1
* Sun Apr 30 2017 Remi Collet <remi@remirepo.net> - 1.0.0-1
- add backport stuff
* Fri Apr 14 2017 Shawn Iwinski <shawn@iwin.ski> - 1.0.0-1
- Initial package
|