blob: 3017e1c421a76d453247a0dbaf466f1d855e5a07 (
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
|
# remirepo/fedora spec file for php-sebastian-finder-facade2
#
# Copyright (c) 2012-2020 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
%global gh_commit 9d3e74b845a2ce50e19b25b5f0c2718e153bee6c
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner sebastianbergmann
%global gh_project finder-facade
# Packagist
%global pk_vendor sebastian
%global pk_project %{gh_project}
# Namespace
%global ns_vendor SebastianBergmann
%global ns_project FinderFacade
%global major 2
%global php_home %{_datadir}/php
%global with_tests %{?_without_tests:0}%{!?_without_tests:1}
Name: php-%{pk_vendor}-%{pk_project}%{major}
Version: 2.0.0
Release: 1%{?dist}
Summary: Wrapper for Symfony Finder component version %{major}
License: BSD
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
BuildRequires: php(language) >= 7.3
BuildRequires: php-ctype
BuildRequires: php-fedora-autoloader-devel
%if %{with_tests}
BuildRequires: phpunit9
# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
BuildRequires: (php-composer(theseer/fdomdocument) >= 1.6 with php-composer(theseer/fdomdocument) < 2)
BuildRequires: (php-composer(symfony/finder) >= 4.1 with php-composer(symfony/finder) < 6)
# remirepo:4
%else
BuildRequires: php-theseer-fDOMDocument
BuildRequires: php-symfony4-finder
%endif
%endif
# From composer.json "require": {
# "php": "^7.3",
# "ext-ctype": "*",
# "theseer/fdomdocument": "^1.6",
# "symfony/finder": "^4.1|^5.0"
Requires: php(language) >= 7.3
Requires: php-ctype
# remirepo:1
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
Requires: (php-composer(theseer/fdomdocument) >= 1.6 with php-composer(theseer/fdomdocument) < 2)
Requires: (php-composer(symfony/finder) >= 4.1 with php-composer(symfony/finder) < 6)
# remirepo:4
%else
Requires: php-theseer-fDOMDocument
Requires: php-symfony4-finder
%endif
# From phpcompatinfo report for version 2.0.0
# none
# For our autoloader
Requires: php-composer(fedora/autoloader)
Provides: php-composer(sebastian/finder-facade) = %{version}
%description
Convenience wrapper for Symfony's Finder component.
%prep
%setup -q -n %{gh_project}-%{gh_commit}
%build
phpab \
--output src/autoload.php \
--template fedora \
src
cat << 'EOF' | tee -a src/autoload.php
\Fedora\Autoloader\Dependencies::required([
'%{php_home}/TheSeer/fDOMDocument/autoload.php',
[
'%{php_home}/Symfony5/Component/Finder/autoload.php',
'%{php_home}/Symfony4/Component/Finder/autoload.php',
],
]);
EOF
%install
mkdir -p %{buildroot}%{php_home}/%{ns_vendor}
cp -pr src %{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{major}
%if %{with_tests}
%check
php -r '
require "%{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{major}/autoload.php";
exit (class_exists("%{ns_vendor}\\%{ns_project}\\%{ns_project}") ? 0 : 1);
'
mkdir vendor
touch vendor/autoload.php
ret=0
for cmd in php php73 php74; do
if which $cmd; then
$cmd -d auto_prepend_file=%{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{major}/autoload.php \
%{_bindir}/phpunit9 --verbose tests || ret=1
fi
done
exit $ret
%endif
%files
# remirepo:1
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc README.md
%doc composer.json
%dir %{php_home}/%{ns_vendor}
%{php_home}/%{ns_vendor}/%{ns_project}%{major}
%changelog
* Mon Feb 10 2020 Remi Collet <remi@remirepo.net> - 2.0.0-1
- update to 2.0.0
- raise dependency on PHP 7.3
- raise dependency on Symfony 4.1
- rename to php-sebastian-finder-facade2
- move to /usr/share/php/SebastianBergmann/FinderFacade2
* Thu Jan 16 2020 Remi Collet <remi@remirepo.net> - 1.2.3-1
- update to 1.2.3 (no change)
- raise dependency on PHP 7.1
- raise dependency on theseer/fdomdocument 1.6
- allow symfony/finder v5
* Wed Feb 20 2019 Remi Collet <remi@remirepo.net> - 1.2.2-5
- cleanup for EL-8
* Tue Feb 6 2018 Remi Collet <remi@fedoraproject.org> - 1.2.2-2
- use range dependencies on F27+
* Sun Nov 19 2017 Remi Collet <remi@remirepo.net> - 1.2.2-1
- Update to 1.2.2
- allow Symfony 4
* Tue May 9 2017 Remi Collet <remi@fedoraproject.org> - 1.2.1-3
- switch to fedora/autoloader
* Wed Feb 17 2016 Remi Collet <remi@fedoraproject.org> - 1.2.1-1
- update to 1.2.1
- run test suite with both PHP 5 and 7 when available
* Mon Jun 29 2015 Remi Collet <remi@fedoraproject.org> - 1.2.0-3
- switch to $fedoraClassLoader autoloader
* Thu Jun 4 2015 Remi Collet <remi@fedoraproject.org> - 1.2.0-2
- use $sfuloader
* Thu Jun 4 2015 Remi Collet <remi@fedoraproject.org> - 1.2.0-1
- upgrade to 1.2.0
- raise dependency on symfony/finder 2.3
- generate autoloader (dropped upstream)
- fix license handling
* Wed Jun 25 2014 Remi Collet <remi@fedoraproject.org> - 1.1.0-6
- composer dependencies
* Wed Apr 30 2014 Remi Collet <remi@fedoraproject.org> - 1.1.0-4
- cleanup pear registry
* Tue Apr 29 2014 Remi Collet <remi@fedoraproject.org> - 1.1.0-3
- sources from github
- run tests during build
* Thu May 30 2013 Remi Collet <remi@fedoraproject.org> - 1.1.0-1
- Update to 1.1.0
* Mon May 27 2013 Remi Collet <remi@fedoraproject.org> - 1.0.7-1
- Update to 1.0.7 (no change)
* Wed Mar 6 2013 Remi Collet <remi@fedoraproject.org> - 1.0.6-2
- upstream patch for Finder 2.2.0 compatibility
* Thu Jan 10 2013 Remi Collet <remi@fedoraproject.org> - 1.0.6-1
- Version 1.0.6 (stable) - API 1.0.1 (stable)
* Thu Oct 11 2012 Remi Collet <remi@fedoraproject.org> - 1.0.5-1
- Version 1.0.5 (stable) - API 1.0.1 (stable)
- Initial packaging
|