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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
|
# remirepo/fedora spec file for php-oneup-flysystem-bundle
#
# Copyright (c) 2018-2019 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
%global gh_commit de1aa0fa361496b3837da5cac286f029595581da
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner 1up-lab
%global gh_project OneupFlysystemBundle
# Packagist
%global pk_vendor oneup
%global pk_project flysystem-bundle
# Namespace
%global ns_vendor Oneup
%global ns_project FlysystemBundle
%global php_home %{_datadir}/php
# Disabled for now as missing dependencies ("require-dev")
%global with_tests 0%{?_with_tests:1}
Name: php-%{pk_vendor}-%{pk_project}
Version: 3.7.0
Release: 1%{?gh_date:.%{gh_date}git%{gh_short}}%{?dist}
Summary: Conversion of unicode, HTML and shortcode emoji
License: MIT
URL: https://github.com/%{gh_owner}/%{gh_project}
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{?gh_short}.tar.gz
BuildArch: noarch
%if %{with_tests}
# For tests
BuildRequires: php(language) >= 7.1
BuildRequires: php-reflection
BuildRequires: php-simplexml
BuildRequires: php-ftp
BuildRequires: php-spl
%if 0%{?fedora} >= 27 || 0%{?rhel} >=8
BuildRequires: (php-composer(symfony/config) >= 3.4 with php-composer(symfony/config) < 6)
BuildRequires: (php-composer(symfony/dependency-injection) >= 3.4 with php-composer(symfony/dependency-injection) < 6)
BuildRequires: (php-composer(symfony/http-kernel) >= 3.4 with php-composer(symfony/http-kernel) < 6)
BuildRequires: (php-composer(league/flysystem) >= 1.0.26 with php-composer(league/flysystem) < 2)
%else
BuildRequires: php-symfony3-config >= 3.4
BuildRequires: php-symfony3-dependency-injection >= 3.4
BuildRequires: php-symfony3-http-kernel >= 3.4
BuildRequires: php-league-flysystem >= 1.0.26
%endif
# From composer.json, "require-dev": {
# "require-dev": {
# "async-aws/flysystem-s3": "^1.0",
# "jenko/flysystem-gaufrette": "^1.0",
# "league/flysystem-aws-s3-v2": "^1.0",
# "league/flysystem-azure-blob-storage": "^0.1",
# "league/flysystem-cached-adapter": "^1.0",
# "league/flysystem-gridfs": "^1.0",
# "league/flysystem-memory": "^1.0",
# "league/flysystem-rackspace": "^1.0",
# "league/flysystem-replicate-adapter": "^1.0",
# "league/flysystem-sftp": "^1.0",
# "league/flysystem-webdav": "^1.0",
# "league/flysystem-ziparchive": "^1.0",
# "litipk/flysystem-fallback-adapter": "^0.1",
# "phpunit/phpunit": "^6.5 || ^7.5 || ^8.5",
# "spatie/flysystem-dropbox": "^1.0",
# "superbalist/flysystem-google-storage": "^4.0",
# "symfony/asset": "^3.4 || ^4.0 || ^5.0",
# "symfony/browser-kit": "^3.4 || ^4.0 || ^5.0",
# "symfony/finder": "^3.4 || ^4.0 || ^5.0",
# "symfony/templating": "^3.4 || ^4.0 || ^5.0",
# "symfony/translation": "^3.4 || ^4.0 || ^5.0",
# "symfony/yaml": "^3.4 || ^4.0 || ^5.0",
# "twistor/flysystem-stream-wrapper": "^1.0"
%global phpunit %{_bindir}/phpunit8
%if 0%{?fedora} >= 27 || 0%{?rhel} >=8
BuildRequires: (php-composer(symfony/asset) >= 3.4 with php-composer(symfony/asset) < 6)
BuildRequires: (php-composer(symfony/browser-kit) >= 3.4 with php-composer(symfony/browser-kit) < 6)
BuildRequires: (php-composer(symfony/finder) >= 3.4 with php-composer(symfony/finder) < 6)
BuildRequires: (php-composer(symfony/framework-bundle) >= 3.4 with php-composer(symfony/framework-bundle) < 5)
BuildRequires: (php-composer(symfony/templating) >= 3.4 with php-composer(symfony/templating) < 6)
BuildRequires: (php-composer(symfony/translation) >= 3.4 with php-composer(symfony/translation) < 6)
BuildRequires: (php-composer(symfony/yaml) >= 3.4 with php-composer(symfony/yaml) < 6)
%else
BuildRequires: php-symfony3-asset >= 3.4
BuildRequires: php-symfony3-browser-kit >= 3.4
BuildRequires: php-symfony3-finder >= 3.4
BuildRequires: php-symfony3-framework-bundle >= 3.4
BuildRequires: php-symfony3-templating >= 3.4
BuildRequires: php-symfony3-translation >= 3.4
BuildRequires: php-symfony3-yaml >= 3.4
%endif
BuildRequires: %{phpunit}
# Autoloader
BuildRequires: php-composer(fedora/autoloader)
%endif
# From composer.json, "require": {
# "php": ">=7.1",
# "league/flysystem": "^1.0.26",
# "symfony/config": "^3.4 || ^4.0 || ^5.0",
# "symfony/dependency-injection": "^3.4 || ^4.0 || ^5.0",
# "symfony/http-kernel": "^3.4 || ^4.0 || ^5.0"
Requires: php(language) >= 7.1
%if 0%{?fedora} >= 27 || 0%{?rhel} >=8
Requires: (php-composer(league/flysystem) >= 1.0.26 with php-composer(league/flysystem) < 2)
Requires: (php-composer(symfony/config) >= 3.4 with php-composer(symfony/config) < 6)
Requires: (php-composer(symfony/dependency-injection) >= 3.4 with php-composer(symfony/dependency-injection) < 6)
Requires: (php-composer(symfony/http-kernel) >= 3.4 with php-composer(symfony/http-kernel) < 6)
%else
Requires: php-league-flysystem >= 1.0.26
Requires: php-symfony3-config >= 3.4
Requires: php-symfony3-dependency-injection >= 3.4
Requires: php-symfony3-http-kernel >= 3.4
%endif
# From phpcompatinfo report for version 3.0.2
Requires: php-reflection
Requires: php-simplexml
Requires: php-ftp
Requires: php-spl
# Autoloader
Requires: php-composer(fedora/autoloader)
Provides: php-composer(%{pk_vendor}/%{pk_project}) = %{version}
%description
A PHP library simplifying the conversion of unicode, HTML and shortcode emoji.
Autoloader: %{_datadir}/php/%{ns_vendor}/%{ns_project}/autoload.php
%prep
%setup -q -n %{gh_project}-%{gh_commit}
%build
: Create autoloader
cat <<'AUTOLOAD' | tee autoload.php
<?php
/* Autoloader for %{name} and its dependencies */
require_once '%{_datadir}/php/Fedora/Autoloader/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('%{ns_vendor}\\%{ns_project}\\', __DIR__);
\Fedora\Autoloader\Dependencies::required([
[
'%{_datadir}/php/Symfony5/Component/Config/autoload.php',
'%{_datadir}/php/Symfony4/Component/Config/autoload.php',
'%{_datadir}/php/Symfony3/Component/Config/autoload.php',
], [
'%{_datadir}/php/Symfony5/Component/DependencyInjection/autoload.php',
'%{_datadir}/php/Symfony4/Component/DependencyInjection/autoload.php',
'%{_datadir}/php/Symfony3/Component/DependencyInjection/autoload.php',
], [
'%{_datadir}/php/Symfony5/Component/HttpKernel/autoload.php',
'%{_datadir}/php/Symfony4/Component/HttpKernel/autoload.php',
'%{_datadir}/php/Symfony3/Component/HttpKernel/autoload.php',
],
'%{_datadir}/php/League/Flysystem/autoload.php',
]);
AUTOLOAD
%install
mkdir -p %{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project}
cp -p *php %{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project}/
cp -pr DependencyInjection %{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project}/DependencyInjection
cp -pr StreamWrapper %{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project}/StreamWrapper
cp -pr Resources %{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project}/Resources
%check
%if %{with_tests}
cat << 'EOF' | tee Tests/bootstrap.php
<?php
require_once '%{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project}/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('%{ns_vendor}\\%{ns_project}\\', dirname(__DIR__));
\Fedora\Autoloader\Dependencies::required([
[
'%{_datadir}/php/Symfony5/Component/Finder/autoload.php',
'%{_datadir}/php/Symfony4/Component/Finder/autoload.php',
'%{_datadir}/php/Symfony3/Component/Finder/autoload.php',
], [
'%{_datadir}/php/Symfony5/Component/BrowserKit/autoload.php',
'%{_datadir}/php/Symfony4/Component/BrowserKit/autoload.php',
'%{_datadir}/php/Symfony3/Component/BrowserKit/autoload.php',
], [
'%{_datadir}/php/Symfony5/Component/Asset/autoload.php',
'%{_datadir}/php/Symfony4/Component/Asset/autoload.php',
'%{_datadir}/php/Symfony3/Component/Asset/autoload.php',
], [
'%{_datadir}/php/Symfony5/Bundle/FrameworkBundle/autoload.php',
'%{_datadir}/php/Symfony4/Bundle/FrameworkBundle/autoload.php',
'%{_datadir}/php/Symfony3/Bundle/FrameworkBundle/autoload.php',
], [
'%{_datadir}/php/Symfony5/Component/Templating/autoload.php',
'%{_datadir}/php/Symfony4/Component/Templating/autoload.php',
'%{_datadir}/php/Symfony3/Component/Templating/autoload.php',
], [
'%{_datadir}/php/Symfony5/Component/Translation/autoload.php',
'%{_datadir}/php/Symfony4/Component/Translation/autoload.php',
'%{_datadir}/php/Symfony3/Component/Translation/autoload.php',
], [
'%{_datadir}/php/Symfony5/Component/Yaml/autoload.php',
'%{_datadir}/php/Symfony4/Component/Yaml/autoload.php',
'%{_datadir}/php/Symfony3/Component/Yaml/autoload.php',
],
]);
EOF
ret=0
for cmd in php php71 php72 php73 php74 php80; do
rm -rf Tests/App/cache
if which $cmd; then
$cmd %{phpunit} \
--no-coverage \
--verbose
fi
done
exit $ret
%else
: Test suite disabled
%endif
%files
%{!?_licensedir:%global license %%doc}
%license Resources/meta/LICENSE
%doc composer.json
%doc *.md
%doc Resources/doc
%dir %{php_home}/%{ns_vendor}/
%{php_home}/%{ns_vendor}/%{ns_project}
%exclude %{php_home}/%{ns_vendor}/%{ns_project}/Resources/doc
%exclude %{php_home}/%{ns_vendor}/%{ns_project}/Resources/meta
%changelog
* Tue Dec 22 2020 Remi Collet <remi@remirepo.net> - 3.7.0-1
- update to 3.7.0
* Thu Dec 10 2020 Remi Collet <remi@remirepo.net> - 3.6.0-1
- update to 3.6.0 (no change)
- raise dependency on PHP 7.1
* Tue Jun 23 2020 Remi Collet <remi@remirepo.net> - 3.5.0-1
- update to 3.5.0
* Thu Jan 9 2020 Remi Collet <remi@remirepo.net> - 3.4.0-1
- update to 3.4.0
- drop depencency on symfony/framework-bundle
- add dependency on symfony/config, symfony/dependency-injection
and symfony/http-kernel
* Mon Dec 9 2019 Remi Collet <remi@remirepo.net> - 3.3.0-1
- update to 3.3.0
- raise dependency on Symfony 3.4
- allow Symfony 5
* Mon Nov 25 2019 Remi Collet <remi@remirepo.net> - 3.2.0-1
- update to 3.2.0
* Fri Apr 26 2019 Remi Collet <remi@remirepo.net> - 3.1.0-1
- update to 3.1.0
* Mon Dec 3 2018 Remi Collet <remi@remirepo.net> - 3.0.3-1
- update to 3.0.3
* Wed Nov 28 2018 Remi Collet <remi@remirepo.net> - 3.0.2-1
- initial package, version 3.0.2
- add upstream patch for Symfony4
|