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
|
# remirepo/fedora spec file for composer
#
# Copyright (c) 2015 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
%global gh_commit a9f74803275a64273b73d7398a907d1a0e32c9a9
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_branch 1.0-dev
%global gh_date 20151027
%global gh_owner composer
%global gh_project composer
%global with_tests %{?_without_tests:0}%{!?_without_tests:1}
%global api_version 1.0.0
Name: composer
Version: 1.0.0
Release: 0.13.%{gh_date}git%{gh_short}%{?dist}
Summary: Dependency Manager for PHP
Group: Development/Libraries
License: MIT
URL: https://getcomposer.org/
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz
Source1: %{name}-autoload.php
Source2: %{name}-bootstrap.php
# Use our autoloader, resources path, fix for tests
Patch0: %{name}-rpm.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: php-cli
%if %{with_tests}
BuildRequires: php-composer(justinrainbow/json-schema) >= 1.4.4
BuildRequires: php-composer(composer/spdx-licenses) >= 1.0
BuildRequires: php-composer(composer/semver) >= 1.0
BuildRequires: php-composer(seld/jsonlint) >= 1.0
BuildRequires: php-composer(seld/phar-utils) >= 1.0
BuildRequires: php-composer(seld/cli-prompt) >= 1.0
BuildRequires: php-composer(symfony/console) >= 2.5
BuildRequires: php-composer(symfony/finder) >= 2.2
BuildRequires: php-composer(symfony/filesystem) >= 2.5
BuildRequires: php-composer(symfony/process) >= 2.1
BuildRequires: php-zip
# From composer.json, "require-dev": {
# "phpunit/phpunit": "~4.5|^5.0.5",
# "phpunit/phpunit-mock-objects": "2.3.0|~3.0"
BuildRequires: php-composer(phpunit/phpunit) >= 4.5
# For autoloader
BuildRequires: php-composer(symfony/class-loader)
BuildRequires: php-seld-phar-utils >= 1.0.1
BuildRequires: php-seld-cli-prompt >= 1.0.0-3
BuildRequires: php-jsonlint >= 1.3.1-3
%endif
# From composer.json, "require": {
# "php": ">=5.3.2",
# "justinrainbow/json-schema": "^1.4.4",
# "composer/spdx-licenses": "^1.0",
# "composer/semver": "^1.0",
# "seld/jsonlint": "~1.0",
# "symfony/console": "~2.5",
# "symfony/finder": "~2.2",
# "symfony/process": "~2.1",
# "symfony/filesystem": "~2.5",
# "seld/phar-utils": "~1.0",
# "seld/cli-prompt": "~1.0"
Requires: php(language) >= 5.3.2
Requires: php-cli
Requires: php-composer(justinrainbow/json-schema) >= 1.4.4
Requires: php-composer(justinrainbow/json-schema) < 2
Requires: php-composer(composer/spdx-licenses) >= 1.0
Requires: php-composer(composer/spdx-licenses) < 2
Requires: php-composer(composer/semver) >= 1.0
Requires: php-composer(composer/semver) < 2
Requires: php-composer(seld/jsonlint) >= 1.0
Requires: php-composer(seld/jsonlint) < 2
Requires: php-composer(seld/phar-utils) >= 1.0
Requires: php-composer(seld/phar-utils) < 2
Requires: php-composer(seld/cli-prompt) >= 1.0
Requires: php-composer(seld/cli-prompt) < 2
Requires: php-composer(symfony/console) >= 2.5
Requires: php-composer(symfony/console) < 3
Requires: php-composer(symfony/finder) >= 2.2
Requires: php-composer(symfony/finder) < 3
Requires: php-composer(symfony/process) >= 2.1
Requires: php-composer(symfony/process) < 3
Requires: php-composer(symfony/filesystem) >= 2.5
Requires: php-composer(symfony/filesystem) < 3
# From composer.json, suggest
# "ext-zip": "Enabling the zip extension allows you to unzip archives, and allows gzip compression of all internet traffic",
# "ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages"
Requires: php-zip
Requires: php-openssl
# For our autoloader
Requires: php-composer(symfony/class-loader)
Requires: php-seld-phar-utils >= 1.0.1
Requires: php-seld-cli-prompt >= 1.0.0-3
Requires: php-jsonlint >= 1.3.1-3
# From phpcompatinfo
Requires: php-curl
Requires: php-date
Requires: php-dom
Requires: php-filter
Requires: php-hash
Requires: php-iconv
Requires: php-intl
Requires: php-json
Requires: php-libxml
Requires: php-mbstring
Requires: php-pcre
Requires: php-phar
Requires: php-reflection
Requires: php-simplexml
Requires: php-spl
Requires: php-tokenizer
Requires: php-xsl
Requires: php-zlib
# Composer library
Provides: php-composer(composer/composer) = %{version}
# Special internal for Plugin API
Provides: php-composer(composer-plugin-api) = %{api_version}
%description
Composer helps you declare, manage and install dependencies of PHP projects,
ensuring you have the right stack everywhere.
Documentation: https://getcomposer.org/doc/
%prep
%setup -q -n %{gh_project}-%{gh_commit}
%patch0 -p1
cp -p %{SOURCE1} src/Composer/autoload.php
cp -p %{SOURCE2} tests/bootstrap.php
rm src/bootstrap.php
: fix reported version
DATE=%{gh_date}
DATE=${DATE:0:4}-${DATE:4:2}-${DATE:6:2}
sed -e '/VERSION/s/@package_version@/%{gh_commit}/' \
-e '/BRANCH_ALIAS_VERSION/s/@package_branch_alias_version@/%{gh_branch}/' \
-e "/RELEASE_DATE/s/@release_date@/$DATE/" \
-i src/Composer/Composer.php
: check Plugin API version
php -r '
namespace Composer\Plugin;
include "src/Composer/Plugin/PluginInterface.php";
if (version_compare(PluginInterface::PLUGIN_API_VERSION, "%{api_version}")) {
printf("Plugin API version is %s, expected %s\n", PluginInterface::PLUGIN_API_VERSION, "%{api_version}");
exit(1);
}'
%build
# Nothing
%install
rm -rf %{buildroot}
: Library
mkdir -p %{buildroot}%{_datadir}/php
cp -pr src/* %{buildroot}%{_datadir}/php
: Resources
mkdir -p %{buildroot}%{_datadir}/%{name}
cp -pr res %{buildroot}%{_datadir}/%{name}/res
cp -p LICENSE %{buildroot}%{_datadir}/%{name}/LICENSE
ln -sf %{_datadir}/%{name}/LICENSE LICENSE
: Command
install -Dpm 755 bin/%{name} %{buildroot}%{_bindir}/%{name}
%check
%if %{with_tests}
: Run test suite
export BUILDROOT=%{buildroot}
%{_bindir}/phpunit --include-path %{buildroot}%{_datadir}/php --verbose
%else
: Test suite disabled
%endif
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc *.md doc
%doc composer.json
%{_bindir}/%{name}
%{_datadir}/php/Composer
%{_datadir}/%{name}
%changelog
* Tue Oct 27 2015 Remi Collet <remi@fedoraproject.org> - 1.0.0-0.13.20151027gita9f7480
- new snapshot
* Wed Oct 14 2015 Remi Collet <remi@fedoraproject.org> - 1.0.0-0.13.20151013gita54f84f
- new snapshot
- use autoloader from all dependencies
* Sun Oct 11 2015 Remi Collet <remi@fedoraproject.org> - 1.0.0-0.12.20151007git7a9eb02
- new snapshot
- provide php-composer(composer-plugin-api)
* Tue Oct 6 2015 Remi Collet <remi@fedoraproject.org> - 1.0.0-0.12.20151004gitfcce52b
- don't check version in diagnose command
* Sun Oct 4 2015 Remi Collet <remi@fedoraproject.org> - 1.0.0-0.11.20151004gitfcce52b
- new snapshot
- add dependency on composer/semver
* Mon Sep 21 2015 Remi Collet <remi@fedoraproject.org> - 1.0.0-0.10.20150920git9f2e562
- new snapshot
- add dependency on symfony/filesystem
* Tue Sep 8 2015 Remi Collet <remi@fedoraproject.org> - 1.0.0-0.9.20150907git9f6fdfd
- new snapshot
* Sun Aug 23 2015 Remi Collet <remi@fedoraproject.org> - 1.0.0-0.9.20150820gitf1aa655
- new snapshot
- add LICENSE in application data, as used by the code
* Fri Aug 7 2015 Remi Collet <remi@fedoraproject.org> - 1.0.0-0.8.20150804gitc83650f
- new snapshot
* Tue Jul 21 2015 Remi Collet <remi@fedoraproject.org> - 1.0.0-0.8.20150720git00c2679
- new snapshot
- add dependency on composer/spdx-licenses
* Thu Jul 16 2015 Remi Collet <remi@fedoraproject.org> - 1.0.0-0.7.20150714git92faf1c
- new snapshot
- raise dependency on justinrainbow/json-schema 1.4.4
* Mon Jun 29 2015 Remi Collet <remi@fedoraproject.org> - 1.0.0-0.6.20150626git943107c
- new snapshot
- review autoloader
* Sun Jun 21 2015 Remi Collet <remi@fedoraproject.org> - 1.0.0-0.5.20150620gitd0ff016
- new snapshot
- add missing BR on php-zip
- open https://github.com/composer/composer/pull/4169 for online test
* Mon Jun 15 2015 Remi Collet <remi@fedoraproject.org> - 1.0.0-0.5.20150614git8e9659b
- new snapshot
* Sun Jun 7 2015 Remi Collet <remi@fedoraproject.org> - 1.0.0-0.5.20150605git9fb2d4f
- new snapshot
* Tue Jun 2 2015 Remi Collet <remi@fedoraproject.org> - 1.0.0-0.5.20150531git0ec86be
- new snapshot
* Tue May 26 2015 Remi Collet <remi@fedoraproject.org> - 1.0.0-0.5.20150525git69210d5
- new snapshot
- ensure /usr/share/php is in include_path (for SCL)
* Wed May 13 2015 Remi Collet <remi@fedoraproject.org> - 1.0.0-0.4.20150511gitbc45d91
- new snapshot
* Mon May 4 2015 Remi Collet <remi@fedoraproject.org> - 1.0.0-0.4.20150503git42a9561
- new snapshot
- add dependencies on seld/phar-utils and seld/cli-prompt
* Mon Apr 27 2015 Remi Collet <remi@fedoraproject.org> - 1.0.0-0.3.20150426git1cb427f
- new snapshot
* Fri Apr 17 2015 Remi Collet <remi@fedoraproject.org> - 1.0.0-0.3.20150415git921b3a0
- new snapshot
- raise dependency on justinrainbow/json-schema ~1.4
- keep upstream shebang with /usr/bin/env (for SCL)
* Thu Apr 9 2015 Remi Collet <remi@fedoraproject.org> - 1.0.0-0.3.20150408git4d134ce
- new snapshot
- lower dependency on justinrainbow/json-schema ~1.3
* Tue Mar 24 2015 Remi Collet <remi@fedoraproject.org> - 1.0.0-0.3.20150324gitc5cd184
- new snapshot
- raise dependency on justinrainbow/json-schema ~1.4
* Thu Mar 19 2015 Remi Collet <remi@fedoraproject.org> - 1.0.0-0.2.20150316git829199c
- new snapshot
* Wed Mar 4 2015 Remi Collet <remi@fedoraproject.org> - 1.0.0-0.2.20150302giteadc167
- new snapshot
* Sat Feb 28 2015 Remi Collet <remi@fedoraproject.org> - 1.0.0-0.2.20150227git45b1f35
- new snapshot
* Thu Feb 26 2015 Remi Collet <remi@fedoraproject.org> - 1.0.0-0.1.20150225gite5985a9
- Initial package
|