summaryrefslogtreecommitdiffstats
path: root/php-pdepend-PHP-Depend.spec
blob: 356e4789330c82f4614a6cc0e0f315ba12756541 (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
# remirepo spec file for php-pdepend-PHP-Depend, from:
#
# Fedora spec file for php-pdepend-PHP-Depend
#
# License: MIT
# http://opensource.org/licenses/MIT
#
# Please, preserve the changelog entries
#
%global gh_commit    7a892d56ceafd804b4a2ecc85184640937ce9e84
%global gh_short     %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner     pdepend
%global gh_project   pdepend
%{!?__pear: %global __pear %{_bindir}/pear}
%global pear_name    PHP_Depend
%global pear_channel pear.pdepend.org
%global php_home     %{_datadir}/php/PDepend
%global with_tests   0%{!?_without_tests:1}

%global sym_pref php-symfony4
%global sym_path %{_datadir}/php/Symfony4

Name:           php-pdepend-PHP-Depend
Version:        2.12.1
Release:        1%{?dist}
Summary:        PHP_Depend design quality metrics for PHP package

License:        BSD
URL:            http://pdepend.org/
# git snashop to get upstream test suite
Source0:        %{name}-%{version}-%{gh_short}.tgz
Source1:        makesrc.sh

# Autoloader
Patch0:         %{name}-rpm.patch

BuildArch:      noarch
%if %{with_tests}
# From composer/json, "require-dev": {
#        "phpunit/phpunit": "^4.8.36|^5.7.27",
#        "squizlabs/php_codesniffer": "^2.0.0"
BuildRequires:  php-composer(phpunit/phpunit) >= 5.7.27
BuildRequires:  php(language) >= 5.3.7
BuildRequires:  %{sym_pref}-dependency-injection
BuildRequires:  %{sym_pref}-filesystem
BuildRequires:  %{sym_pref}-config
BuildRequires:  php-bcmath
BuildRequires:  php-date
BuildRequires:  php-dom
BuildRequires:  php-iconv
BuildRequires:  php-libxml
BuildRequires:  php-mbstring
BuildRequires:  php-pcre
BuildRequires:  php-reflection
BuildRequires:  php-simplexml
BuildRequires:  php-spl
BuildRequires:  php-tokenizer
BuildRequires:  php-xml
# Autoloader
BuildRequires:  php-composer(fedora/autoloader)
%endif

# From composer.json, "require": {
#        "php": ">=5.3.7"
#        "symfony/dependency-injection": "^2.3.0|^3|^4|^5|^6.0",
#        "symfony/filesystem": "^2.3.0|^3|^4|^5|^6.0",
#        "symfony/config": "^2.3.0|^3|^4|^5|^6.0",
Requires:       php(language) >= 5.3.7
Requires:       %{sym_pref}-dependency-injection
Requires:       %{sym_pref}-filesystem
Requires:       %{sym_pref}-config
# From phpcompatinfo report for version 2.3.0
Requires:       php-bcmath
Requires:       php-date
Requires:       php-dom
Requires:       php-iconv
Requires:       php-libxml
Requires:       php-mbstring
Requires:       php-pcre
Requires:       php-reflection
Requires:       php-simplexml
Requires:       php-spl
Requires:       php-tokenizer
Requires:       php-xml
# Autoloader
Requires:       php-composer(fedora/autoloader)

# Single package in this channel
Obsoletes:      php-channel-pdepend <= 1.3

Provides:       php-pear(%{pear_channel}/%{pear_name}) = %{version}
Provides:       php-composer(%{gh_owner}/%{gh_project}) = %{version}
Provides:       pdepend = %{version}


%description
PHP_Depend is an adaption of the established Java development tool JDepend.
This tool shows you the quality of your design in the terms of extensibility,
reusability and maintainability.


%prep
%setup -q -n %{gh_project}-%{gh_commit}

%patch0 -p0
cat << 'EOF' | tee src/main/php/PDepend/autoload.php
<?php
/* Autoloader for %{name} and its dependencies */

require_once '%{_datadir}/php/Fedora/Autoloader/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('PDepend\\', __DIR__);
\Fedora\Autoloader\Dependencies::required([
    '%{sym_path}/Component/DependencyInjection/autoload.php',
    '%{sym_path}/Component/Filesystem/autoload.php',
    '%{sym_path}/Component/Config/autoload.php',
]);
EOF

find src/main/php -name \*php -exec sed -e 's:@package_version@:%{version}:' -i {} \;
find src/test/php -name \*xml -exec sed -e 's:@package_version@:%{version}:' -i {} \;


%build
# Empty build section, most likely nothing required.


%install
: Library
mkdir -p $(dirname %{buildroot}%{php_home})
cp -pr src/main/php/PDepend %{buildroot}%{php_home}

: Resources
mkdir -p %{buildroot}%{_datadir}/%{name}
cp -pr src/main/resources %{buildroot}%{_datadir}/%{name}/resources

: Command
install -Dpm 0755 src/bin/pdepend %{buildroot}%{_bindir}/pdepend


%check
%if %{with_tests}
cat << 'EOF' | tee src/test/php/PDepend/bootstrap.php
<?php
require '%{buildroot}%{php_home}/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('PDepend\\', __DIR__);
EOF

# testBinCanReadInput rely on git layout
ret=0
for cmd in php php74 php80 php81 php82; do
  if which $cmd; then
    $cmd %{_bindir}/phpunit -d memory_limit=1G \
      --no-coverage \
      --filter '^((?!(testBinCanReadInput)).)*$' \
      --verbose || ret=1
  fi
done
exit $ret
%else
: Test suite disabled
%endif


%pre
if [ -x %{_bindir}/pear ]; then
   %{_bindir}/pear uninstall --nodeps --ignore-errors --register-only \
      %{pear_channel}/%{pear_name} >/dev/null || :
fi


%files
# remirepo:1
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc composer.json
%doc CHANGELOG.md
%{php_home}
%{_datadir}/%{name}
%{_bindir}/pdepend


%changelog
* Mon Sep 12 2022 Remi Collet <remi@remirepo.net> - 2.12.1-1
- update to 2.12.1

* Wed Feb 23 2022 Remi Collet <remi@remirepo.net> - 2.10.3-1
- update to 2.10.3

* Wed Nov 17 2021 Remi Collet <remi@remirepo.net> - 2.10.2-1
- update to 2.10.2

* Mon Oct 11 2021 Remi Collet <remi@remirepo.net> - 2.10.1-1
- update to 2.10.1

* Thu Jul 22 2021 Remi Collet <remi@remirepo.net> - 2.10.0-1
- update to 2.10.0

* Fri Apr 16 2021 Remi Collet <remi@remirepo.net> - 2.9.1-1
- update to 2.9.1

* Thu Mar 11 2021 Remi Collet <remi@remirepo.net> - 2.9.0-1
- update to 2.9.0

* Tue Jun 23 2020 Remi Collet <remi@remirepo.net> - 2.8.0-1
- update to 2.8.0

* Thu Feb 13 2020 Remi Collet <remi@remirepo.net> - 2.7.1-1
- update to 2.7.1

* Mon Jan 27 2020 Remi Collet <remi@remirepo.net> - 2.7.0-1
- update to 2.7.0

* Fri Jan  3 2020 Remi Collet <remi@remirepo.net> - 2.6.1-1
- update to 2.6.1

* Wed Dec 13 2017 Remi Collet <remi@remirepo.net> - 2.5.2-2
- Update to 2.5.2 (new sources)

* Wed Dec 13 2017 Remi Collet <remi@remirepo.net> - 2.5.2-1
- Update to 2.5.2
- switch to symfony package names
- open https://github.com/pdepend/pdepend/issues/357 missing changelog

* Tue Nov 21 2017 Remi Collet <remi@remirepo.net> - 2.5.1-1
- Update to 2.5.1
- open https://github.com/pdepend/pdepend/issues/337 missing changelog

* Wed Nov  1 2017 Remi Collet <remi@fedoraproject.org> - 2.5.0-5
- fix FTBFS from Koschei, add patch for PHP 7.2 from
  https://github.com/pdepend/pdepend/pull/303
- provide pdepend
- allow only a symfony version

* Wed May 10 2017 Remi Collet <remi@fedoraproject.org> - 2.5.0-3
- adapt for Symfony v3

* Thu Jan 19 2017 Remi Collet <remi@fedoraproject.org> - 2.5.0-1
- update to 2.5.0

* Wed Jan 11 2017 Remi Collet <remi@fedoraproject.org> - 2.4.1-1
- update to 2.4.1

* Tue Jan 10 2017 Remi Collet <remi@fedoraproject.org> - 2.4.0-1
- update to 2.4.0

* Thu Nov 24 2016 Remi Collet <remi@fedoraproject.org> - 2.3.2-1
- update to 2.3.2

* Wed Nov 23 2016 Remi Collet <remi@fedoraproject.org> - 2.3.0-1
- update to 2.3.0
- add dependency on iconv, mbstring and xml

* Tue Nov 22 2016 Remi Collet <remi@fedoraproject.org> - 2.2.6-1
- update to 2.2.6
- switch to fedora/autoloader

* Thu Mar 10 2016 Remi Collet <remi@fedoraproject.org> - 2.2.4-1
- update to 2.2.4

* Tue Feb 23 2016 Remi Collet <remi@fedoraproject.org> - 2.2.3-1
- update to 2.2.3

* Fri Oct 16 2015 Remi Collet <remi@fedoraproject.org> - 2.2.2-1
- update to 2.2.2

* Fri Sep 25 2015 Remi Collet <remi@fedoraproject.org> - 2.2.1-1
- update to 2.2.1

* Mon Sep 21 2015 Remi Collet <remi@fedoraproject.org> - 2.2.0-1
- update to 2.2.0

* Thu Jul  2 2015 Remi Collet <remi@fedoraproject.org> - 2.1.0-1
- update to 2.1.0
- switch from pear channel to git snapshot sources
- run upstream test suite during build

* Sun May 04 2014 Remi Collet <remi@fedoraproject.org> - 1.1.4-1
- Update to 1.1.4

* Fri Jul 26 2013 Remi Collet <remi@fedoraproject.org> - 1.1.1-1
- Update to 1.1.1
- explicit dependencies
- cleanups

* Wed Sep 12 2012 Remi Collet <RPMS@FamilleCollet.com> - 1.1.0-1
- upstream 1.0.7, backport for remi repo

* Wed Sep 12 2012 Christof Damian <christof@damian.net> - 1.1.0-1
- upstream 1.1.0

* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.7-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Tue May  1 2012 Remi Collet <RPMS@FamilleCollet.com> - 1.0.7-1
- upstream 1.0.7, backport for remi repo

* Tue May  1 2012 Christof Damian <christof@damian.net> - 1.0.7-1
- upstream 1.0.7

* Thu Apr 12 2012 Remi Collet <RPMS@FamilleCollet.com> - 1.0.5-1
- upstream 1.0.5

* Wed Apr 11 2012 Christof Damian <christof@damian.net> - 1.0.5-1
- upstream 1.0.5

* Sat Mar 03 2012 Remi Collet <RPMS@FamilleCollet.com> - 1.0.4-1
- upstream 1.0.4

* Tue Feb 28 2012 Remi Collet <RPMS@FamilleCollet.com> - 1.0.3-1
- upstream 1.0.3

* Thu Feb 23 2012 Remi Collet <RPMS@FamilleCollet.com> - 1.0.2-1
- upstream 1.0.2

* Sat Feb 11 2012 Remi Collet <RPMS@FamilleCollet.com> - 1.0.1-1
- upstream 1.0.1, rebuild for remi repository

* Thu Feb  9 2012 Christof Damian <christof@damian.net> - 1.0.1-1
- upstream 1.0.1

* Tue Nov 01 2011 Remi Collet <RPMS@FamilleCollet.com> - 0.10.6-1
- upstream 0.10.6, rebuild for remi repository

* Sun Oct 30 2011 Christof Damian <christof@damian.net> - 0.10.6-1
- upstream 0.10.6

* Fri May 27 2011 Remi Collet <RPMS@FamilleCollet.com> - 0.10.5-1
- upstream 0.10.5
- rebuild for remi repository

* Fri May 20 2011 Christof Damian <christof@damian.net> - 0.10.5-1
- upstream 0.10.5

* Fri Mar  4 2011 Remi Collet <RPMS@FamilleCollet.com> - 0.10.3-1
- upstream 0.10.3
- rebuild for remi repository

* Fri Mar  4 2011 Christof Damian <christof@damian.net> - 0.10.3-1
- upstream 0.10.3

* Mon Feb 28 2011 Remi Collet <RPMS@FamilleCollet.com> - 0.10.2-1
- upstream 0.10.2
- rebuild for remi repository

* Mon Feb 28 2011 Christof Damian <cdamian@robin.gotham.krass.com> - 0.10.2-1
- upstream 0.10.2

* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Mon Feb 07 2011 Remi Collet <RPMS@FamilleCollet.com> - 0.10.1-1
- upstream stable release 0.10.1 
- rebuild for remi repository

* Sun Feb  6 2011 Christof Damian <christof@damian.net> - 0.10.1-1
- upstream stable release 0.10.1 

* Sat Sep 18 2010 Remi Collet <RPMS@FamilleCollet.com> - 0.9.19-1
- upstream 0.9.19
- rebuild for remi repository

* Fri Sep 17 2010 Christof Damian <christof@damian.net> - 0.9.19-1
- upstream 0.9.19

* Sat Sep 04 2010 Remi Collet <RPMS@FamilleCollet.com> - 0.9.18-1
- rebuild for remi repository

* Fri Sep  3 2010 Christof Damian <christof@damian.net> - 0.9.18-1
- upstream 0.9.18

* Fri Jul 30 2010 Remi Collet <RPMS@FamilleCollet.com> - 0.9.17-1
- rebuild for remi repository

* Fri Jul 30 2010 Christof Damian <christof@damian.net> - 0.9.17-1
- upstream 0.9.17

* Mon Jun 21 2010 Remi Collet <RPMS@FamilleCollet.com> - 0.9.16-1
- rebuild for remi repository

* Sun Jun 20 2010 Christof Damian <christof@damian.net> - 0.9.16-1
- upstream 0.9.16: bugfixes

* Sun May 23 2010 Remi Collet <RPMS@FamilleCollet.com> - 0.9.14-1
- rebuild for remi repository

* Sat May 22 2010 Christof Damian <christof@damian.net> - 0.9.14-1
- upstream 0.9.14

* Mon May 10 2010 Remi Collet <RPMS@FamilleCollet.com> - 0.9.13-1
- rebuild for remi repository

* Mon May 10 2010 Christof Damian <christof@damian.net> - 0.9.13-1
- upstream 0.9.13 important bugfixes

* Thu Apr 29 2010 Remi Collet <RPMS@FamilleCollet.com> - 0.9.12-1
- rebuild for remi repository

* Tue Apr 27 2010 Christof Damian <christof@damian.net> - 0.9.12-1
- upstream 0.9.12
- upstream removed all tests

* Thu Mar  4 2010 Remi Collet <RPMS@FamilleCollet.com> - 0.9.11-1
- rebuild for remi repository

* Wed Mar  3 2010 Christof Damian <christof@damian.net> - 0.9.11-1
- upstream 0.9.11

* Thu Feb 25 2010 Remi Collet <RPMS@FamilleCollet.com> - 0.9.10-1
- rebuild for remi repository

* Tue Feb 23 2010 Christof Damian <christof@damian.net> - 0.9.10-1
- upstream 0.9.10
- replaced define macro with global

* Mon Feb 01 2010 Remi Collet <RPMS@FamilleCollet.com> - 0.9.9-2
- rebuild for remi repository

* Tue Jan 26 2010 Christof Damian <christof@damian.net> 0.9.9-2
- require pecl imagick, which is an optional requirement
- require php-xml for dom
- change postun to use channel macro for consistency
- own /usr/share/pear/PHP
- include test files (which currently don't work)

* Fri Jan  1 2010 Christof Damian <christof@damian.net> 0.9.9-1
- initial release