blob: b57b9db35d720c188ec9a508bf3bc53c6904d04e (
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
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
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
|
# remirepo spec file for php-twig
#
# Fedora spec file for php-twig
#
# Copyright (c) 2014-2021 Shawn Iwinski <shawn.iwinski@gmail.com>
# Remi Collet <remi@fedoraproject.org>
#
# License: MIT
# http://opensource.org/licenses/MIT
#
# Please preserve changelog entries
#
# Build using "--without tests" to disable tests
%bcond_without tests
%global github_owner twigphp
%global github_name Twig
%global github_version 1.44.4
%global github_commit 4d400421528e9fa40caaffcf7824c172526dd99d
%global github_short %(c=%{github_commit}; echo ${c:0:7})
# Lib
%global composer_vendor twig
%global composer_project twig
# "php": ">=7.2.5"
%global php_min_ver 7.2.5
%{!?phpdir: %global phpdir %{_datadir}/php}
%{!?php_inidir: %global php_inidir %{_sysconfdir}/php.d}
Name: php-%{composer_project}
Version: %{github_version}
Release: 1%{?dist}
Summary: The flexible, fast, and secure template engine for PHP
License: BSD
URL: http://twig.sensiolabs.org
Source0: %{name}-%{github_version}-%{github_short}.tgz
Source1: makesrc.sh
BuildArch: noarch
# as we use phpunit9 (for assertFileDoesNotExist)
BuildRequires: php-devel >= 7.3
# Tests
%if %{with tests}
# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
BuildRequires: (php-composer(symfony/debug) >= 3.4 with php-composer(symfony/debug) < 4)
BuildRequires: (php-composer(psr/container) >= 1.0 with php-composer(psr/container) < 2)
# remirepo:5
%else
BuildRequires: php-symfony3-debug >= 3.4
BuildRequires: php-psr-container < 2
BuildRequires: php-psr-container >= 1.0
%endif
%global phpunit %{_bindir}/phpunit9
BuildRequires: %{phpunit}
## phpcompatinfo (computed from version 1.42.2)
BuildRequires: php-ctype
BuildRequires: php-date
BuildRequires: php-dom
BuildRequires: php-hash
BuildRequires: php-iconv
BuildRequires: php-json
BuildRequires: php-mbstring
BuildRequires: php-pcre
BuildRequires: php-reflection
BuildRequires: php-simplexml
BuildRequires: php-spl
%endif
# Autoloader
BuildRequires: php-fedora-autoloader-devel
# Lib
## composer.json
Requires: php(language) >= %{php_min_ver}
## phpcompatinfo (computed from version 1.42.2)
Requires: php-ctype
Requires: php-date
Requires: php-dom
Requires: php-hash
Requires: php-iconv
Requires: php-json
Requires: php-mbstring
Requires: php-pcre
Requires: php-reflection
Requires: php-simplexml
Requires: php-spl
# Autoloader
Requires: php-composer(fedora/autoloader)
# Lib
## Composer
Provides: php-composer(%{composer_vendor}/%{composer_project}) = %{version}
## Rename
Obsoletes: php-twig-Twig < %{version}-%{release}
Provides: php-twig-Twig = %{version}-%{release}
## PEAR
Provides: php-pear(pear.twig-project.org/Twig) = %{version}
# This pkg was the only one in this channel so the channel is no longer needed
Obsoletes: php-channel-twig < 1.4
%description
%{summary}.
* Fast: Twig compiles templates down to plain optimized PHP code. The
overhead compared to regular PHP code was reduced to the very minimum.
* Secure: Twig has a sandbox mode to evaluate untrusted template code. This
allows Twig to be used as a template language for applications where users
may modify the template design.
* Flexible: Twig is powered by a flexible lexer and parser. This allows the
developer to define its own custom tags and filters, and create its own
DSL.
Autoloader: %{phpdir}/Twig/autoload.php
%prep
%setup -qn %{github_name}-%{github_commit}
: Move the PSR-4 compat library
mv src lib/Twig/psr4
: Create lib autoloader
phpab --template fedora --output lib/Twig/autoload.php lib
%build
: nothing
%install
: PSR-0 and PSR-4 Libraries
mkdir -p %{buildroot}%{phpdir}
cp -rp lib/* %{buildroot}%{phpdir}/
%check
: Library version check
%{_bindir}/php -r 'require_once "%{buildroot}%{phpdir}/Twig/autoload.php";
exit(version_compare("%{version}", Twig_Environment::VERSION, "=") ? 0 : 1);'
%{_bindir}/php -r 'require_once "%{buildroot}%{phpdir}/Twig/autoload.php";
exit(version_compare("%{version}", Twig\Environment::VERSION, "=") ? 0 : 1);'
%if %{with tests}
: Generate autoloader
mkdir vendor
cat << 'EOF' | tee vendor/autoload.php
<?php
require_once '%{buildroot}%{phpdir}/Twig/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('Twig\\Tests\\', dirname(__DIR__) . '/tests');
\Fedora\Autoloader\Dependencies::required(array(
'%{phpdir}/Symfony3/Component/Debug/autoload.php',
'%{phpdir}/Psr/Container/autoload.php',
));
EOF
: Disable listener from symfony/phpunit-bridge # ^4.4.9|^5.0.9
sed -e '/listener/d' phpunit.xml.dist > phpunit.xml
: Test suite without extension
ret=0
for SCL in "php %{phpunit}" php73 php74 php80; do
if which $SCL; then
set $SCL
$1 ${2:-%{_bindir}/phpunit9} $SKIP \
--verbose || RETURN_CODE=1
fi
done
exit $RETURN_CODE
%else
: Tests skipped
%endif
%files
# remirepo:1
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc CHANGELOG README.rst composer.json
# Lib
%{phpdir}/Twig
%changelog
* Mon May 17 2021 Remi Collet <remi@remirepo.net> - 1.44.4-1
- update to 1.44.4
* Wed May 12 2021 Remi Collet <remi@remirepo.net> - 1.44.3-1
- update to 1.44.3
* Wed Jan 6 2021 Remi Collet <remi@remirepo.net> - 1.44.2-1
- update to 1.44.2
* Wed Oct 28 2020 Remi Collet <remi@remirepo.net> - 1.44.1-1
- update to 1.44.1
* Wed Oct 21 2020 Remi Collet <remi@remirepo.net> - 1.44.0-1
- update to 1.44.0
- raise dependency on PHP 7.2.5
* Tue Aug 11 2020 Remi Collet <remi@remirepo.net> - 1.43.1-1
- update to 1.43.1
- switch to phpunit9
- skip 1 more test with PHP 8.0
* Mon Jul 6 2020 Remi Collet <remi@remirepo.net> - 1.43.0-1
- update to 1.43.0
- raise dependency on PHP 7.1.3
- switch to phpunit8
* Wed Feb 12 2020 Remi Collet <remi@remirepo.net> - 1.42.5-1
- update to 1.42.5
* Tue Nov 12 2019 Remi Collet <remi@remirepo.net> - 1.42.4-1
- update to 1.42.4
- sources from git snapshot
* Tue Aug 27 2019 Remi Collet <remi@remirepo.net> - 1.42.3-1
- update to 1.42.3
- use symfony/debug v3
- use phpunit v7
- raise dependency on PHP 5.5
- drop support of the C extension
* Tue Jun 18 2019 Shawn Iwinski <shawn@iwin.ski> - 1.42.2-1
- Update to 1.42.2
* Tue Jun 4 2019 Remi Collet <remi@remirepo.net> - 1.42.1-1
- update to 1.42.1
* Mon Jun 3 2019 Remi Collet <remi@remirepo.net> - 1.42.0-1
- update to 1.42.0
* Wed May 15 2019 Remi Collet <remi@remirepo.net> - 1.41.0-1
- update to 1.41.0
* Tue Apr 30 2019 Remi Collet <remi@remirepo.net> - 1.40.1-1
- update to 1.40.1
* Mon Apr 29 2019 Remi Collet <remi@remirepo.net> - 1.40.0-1
- update to 1.40.0
* Wed Apr 17 2019 Remi Collet <remi@remirepo.net> - 1.39.1-1
- update to 1.39.1
* Mon Mar 25 2019 Remi Collet <remi@remirepo.net> - 1.38.4-1
- update to 1.38.4
* Fri Mar 22 2019 Remi Collet <remi@remirepo.net> - 1.38.3-1
- update to 1.38.3
* Wed Mar 13 2019 Remi Collet <remi@remirepo.net> - 1.38.2-1
- update to 1.38.2
* Tue Mar 12 2019 Remi Collet <remi@remirepo.net> - 1.38.0-1
- update to 1.38.0
* Mon Jan 14 2019 Remi Collet <remi@remirepo.net> - 1.37.1-1
- update to 1.37.1
- bump dependency on PHP 5.4
* Tue Dec 18 2018 Remi Collet <remi@remirepo.net> - 1.36.0-1
- update to 1.36.0
* Fri Jul 13 2018 Remi Collet <remi@remirepo.net> - 1.35.4-1
- update to 1.35.4
* Tue Mar 20 2018 Remi Collet <remi@remirepo.net> - 1.35.3-1
- update to 1.35.3
* Sun Mar 4 2018 Remi Collet <remi@remirepo.net> - 1.35.2-1
- Update to 1.35.2
* Sat Mar 3 2018 Remi Collet <remi@remirepo.net> - 1.35.1-1
- Update to 1.35.1
- use range dependencies on F27+
* Thu Sep 28 2017 Remi Collet <remi@remirepo.net> - 1.35.0-1
- Update to 1.35.0
* Wed Jul 5 2017 Remi Collet <remi@remirepo.net> - 1.34.4-1
- Update to 1.34.4
* Thu Jun 8 2017 Remi Collet <remi@remirepo.net> - 1.34.3-1
- Update to 1.34.3
* Tue Jun 6 2017 Remi Collet <remi@remirepo.net> - 1.34.2-1
- Update to 1.34.2
- raise dependency on PHP 5.3.3
- add namespaced compat library
- switch to fedora/autoloader
* Fri Apr 21 2017 Remi Collet <remi@remirepo.net> - 1.33.2-1
- Update to 1.33.2
* Thu Mar 23 2017 Remi Collet <remi@remirepo.net> - 1.33.0-1
- Update to 1.33.0
* Mon Feb 27 2017 Remi Collet <remi@fedoraproject.org> - 1.32.0-1
- Update to 1.32.0
* Thu Jan 12 2017 Remi Collet <remi@fedoraproject.org> - 1.31.0-1
- Update to 1.31.0
* Fri Dec 23 2016 Remi Collet <remi@fedoraproject.org> - 1.30.0-1
- Update to 1.30.0
* Wed Dec 14 2016 Remi Collet <remi@fedoraproject.org> - 1.29.0-1
- Update to 1.29.0
* Thu Nov 24 2016 Remi Collet <remi@fedoraproject.org> - 1.28.2-1
- Update to 1.28.2
* Tue Nov 22 2016 Remi Collet <remi@fedoraproject.org> - 1.28.1-1
- Update to 1.28.1
* Fri Nov 18 2016 Remi Collet <remi@fedoraproject.org> - 1.28.0-1
- Update to 1.28.0
* Wed Oct 26 2016 Remi Collet <remi@fedoraproject.org> - 1.27.0-1
- Update to 1.27.0
* Thu Oct 6 2016 Remi Collet <remi@fedoraproject.org> - 1.26.1-1
- Update to 1.26.1
* Mon Oct 3 2016 Remi Collet <remi@fedoraproject.org> - 1.26.0-1
- Update to 1.26.0
* Thu Sep 22 2016 Remi Collet <remi@fedoraproject.org> - 1.25.0-1
- Update to 1.25.0
* Fri Sep 2 2016 Remi Collet <remi@fedoraproject.org> - 1.24.2-1
- Update to 1.24.2
* Mon Jun 27 2016 Remi Collet <remi@fedoraproject.org> - 1.24.1-2
- fix dependency with PHP-7
* Mon May 30 2016 Remi Collet <remi@fedoraproject.org> - 1.24.1-1
- Update to 1.24.1
- disable deprecation warning
- disable extension build with PHP 7
* Tue Jan 26 2016 Remi Collet <remi@fedoraproject.org> - 1.24.0-1
- Update to 1.24.0
* Mon Jan 11 2016 Remi Collet <remi@fedoraproject.org> - 1.23.3-1
- Update to 1.23.3
- run test suite with both PHP 5 and 7 when available
* Thu Nov 05 2015 Remi Collet <remi@fedoraproject.org> - 1.23.1-1
- Update to 1.23.1
* Fri Oct 30 2015 Remi Collet <remi@fedoraproject.org> - 1.23.0-1
- Update to 1.23.0
* Tue Oct 13 2015 Remi Collet <remi@fedoraproject.org> - 1.22.3-1
- Update to 1.22.3
* Sun Oct 11 2015 Shawn Iwinski <shawn.iwinski@gmail.com> - 1.22.2-1
- Updated to 1.22.2 (RHBZ #1262655)
- Added lib and ext version checks
* Wed Sep 23 2015 Remi Collet <remi@fedoraproject.org> - 1.22.2-1
- Update to 1.22.2
* Tue Sep 15 2015 Remi Collet <remi@fedoraproject.org> - 1.22.1-1
- Update to 1.22.1
* Sun Sep 13 2015 Remi Collet <remi@fedoraproject.org> - 1.22.0-1
- Update to 1.22.0
* Sat Sep 12 2015 Shawn Iwinski <shawn.iwinski@gmail.com> - 1.21.2-1
- Updated to 1.21.2 (BZ #1256767)
* Wed Sep 9 2015 Remi Collet <remi@fedoraproject.org> - 1.21.2-1
- Update to 1.21.2
* Wed Aug 26 2015 Remi Collet <remi@fedoraproject.org> - 1.21.1-1
- Update to 1.21.1
* Tue Aug 25 2015 Remi Collet <remi@fedoraproject.org> - 1.21.0-1
- Update to 1.21.0
* Wed Aug 12 2015 Shawn Iwinski <shawn.iwinski@gmail.com> - 1.20.0-1
- Updated to 1.20.0 (BZ #1249259)
* Wed Aug 12 2015 Remi Collet <remi@fedoraproject.org> - 1.20.0-1
- Update to 1.20.0
* Fri Jul 31 2015 Remi Collet <remi@fedoraproject.org> - 1.19.0-1
- Update to 1.19.0
* Mon Jun 22 2015 Remi Collet <rcollet@redhat.com> - 1.18.2-4
- add virtual "rh-php56" provides
* Fri Jun 19 2015 Remi Collet <remi@fedoraproject.org> - 1.18.2-3
- allow build against rh-php56 (as more-php56)
* Mon Jun 15 2015 Remi Collet <remi@fedoraproject.org> - 1.18.2-2
- rebuild for remirepo with rawhide changes (autoloader)
* Thu Jun 11 2015 Shawn Iwinski <shawn.iwinski@gmail.com> - 1.18.2-1
- Updated to 1.18.2 (BZ #1183601)
- Added autoloader
* Sun Jun 7 2015 Remi Collet <remi@fedoraproject.org> - 1.18.2-1
- Update to 1.18.2
* Sun Apr 19 2015 Remi Collet <remi@fedoraproject.org> - 1.18.1-1
- Update to 1.18.1
* Mon Jan 26 2015 Remi Collet <remi@fedoraproject.org> - 1.18.0-1
- Update to 1.18.0
* Wed Jan 14 2015 Remi Collet <remi@fedoraproject.org> - 1.17.0-1
- Update to 1.17.0
* Fri Dec 26 2014 Remi Collet <remi@fedoraproject.org> - 1.16.3-1
- Update to 1.16.3
* Wed Dec 24 2014 Remi Collet <remi@fedoraproject.org> - 1.16.2-1.1
- Fedora 21 SCL mass rebuild
* Fri Oct 17 2014 Remi Collet <remi@fedoraproject.org> - 1.16.2-1
- Update to 1.16.2
* Sat Oct 11 2014 Remi Collet <remi@fedoraproject.org> - 1.16.1-1
- Update to 1.16.1
* Thu Aug 28 2014 Remi Collet <remi@fedoraproject.org> - 1.16.0-2
- allow SCL build
- add backport stuff for EL-5
* Mon Aug 25 2014 Shawn Iwinski <shawn.iwinski@gmail.com> - 1.16.0-2
- Removed obsolete and provide of php-twig-CTwig (never imported into Fedora/EPEL)
- Obsolete php-channel-twig
- Removed comment about optional Xdebug in description (does not provide any new feature)
- Always run extension minimal load test
* Tue Jul 29 2014 Shawn Iwinski <shawn.iwinski@gmail.com> - 1.16.0-1
- Initial package
|