summaryrefslogtreecommitdiffstats
path: root/php-maennchen-zipstream-php.spec
blob: 62e8cf068ec4a8383840d2a636c1f331e3f3a53b (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
# remirepo spec file for php-maennchen-zipstream-php, from
#
# Fedora spec file for php-maennchen-zipstream-php
#
# License: MIT
# http://opensource.org/licenses/MIT
#
# Please preserve changelog entries
#
Name:       php-maennchen-zipstream-php
Version:    0.5.2
Release:    1%{?dist}
BuildArch:  noarch

License:    MIT
Summary:    A fast and simple streaming zip file downloader for PHP
URL:        https://github.com/maennchen/ZipStream-PHP
Source0:    %{url}/archive/v%{version}/%{name}-%{version}.tar.gz

BuildRequires: php-composer(fedora/autoloader)
BuildRequires: php-fedora-autoloader-devel
BuildRequires: php-zip
BuildRequires: phpunit6 >= 6.3

Requires:   php(language) >= 7.0
Requires:   php-date
Requires:   php-hash
Requires:   php-mbstring
Requires:   php-pcre
Requires:   php-reflection
Requires:   php-spl
Requires:   php-zip
Requires:   php-zlib

Requires:   php-composer(fedora/autoloader)
Provides:   php-composer(maennchen/zipstream-php) = %{version}


%description
A fork of pablotron's zip streaming library, a fast and simple streaming
zip file downloader for PHP.


%prep
%setup -n ZipStream-PHP-%{version}


%build
%{_bindir}/phpab --format fedora --output src/autoload.php src


%install
install -d -p -m 0755 %{buildroot}/%{_datadir}/php
install -d -p -m 0755 %{buildroot}/%{_datadir}/php/ZipStream

cp -ar src/* %{buildroot}/%{_datadir}/php/ZipStream


%check
sed -i "s:require.*:require('%{buildroot}/%{_datadir}/php/ZipStream/autoload.php');:" test/bootstrap.php

ret=0
for cmd in php php70 php71 php72 php73; do
  if which $cmd; then
    $cmd %{_bindir}/phpunit6 --no-coverage
  fi
done


%files
%{!?_licensedir:%global license %%doc}
%license LICENSE.md
%doc composer.json
%doc doc
%doc README.md
%{_datadir}/php/ZipStream


%changelog
* Thu Sep 13 2018 Remi Collet <remi@remirepo.net> - 0.5.2-2
- switch to phpunit6

* Sun Sep 09 2018 Randy Barlow <bowlofeggs@fedoraproject.org> - 0.5.2-1
- Update to 0.5.2 (#1486085).
- https://github.com/maennchen/ZipStream-PHP/compare/v0.4.1...v0.5.2

* Wed Feb 22 2017 Remi Collet <remi@remirepo.net> - 0.4.1-2
- backport for remi repository

* Mon Feb 20 2017 Randy Barlow <bowlofeggs@fedoraproject.org> - 0.4.1-2
- Use ZipStream instead of maennchen/zipstream-php for the package location.
- Use --no-coverage on phpunit and drop --bootstrap.

* Sat Feb 18 2017 Randy Barlow <bowlofeggs@fedoraproject.org> - 0.4.1-1
- Initial release.