blob: 6b9579c36d131c98a026a698a34b4a71f7ff552e (
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
|
# remirepo php-deepdiver-zipstreamer spec file, from
#
# php-deepdiver-zipstreamer spec file
# forked from remirepo/fedora/php-mcnetic-zipstreamer
#
# Copyright (c) 2018 Remi Collet, Christian Glombek
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
%global gh_commit c8e73ca3204bd0e06abdb0bc533f073b616d6e47
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner DeepDiver1975
%global gh_project PHPZipStreamer
%global with_tests 1
%global namespace ZipStreamer
Name: php-deepdiver-zipstreamer
Version: 1.1.1
Release: 2%{?dist}
Summary: Stream zip files without i/o overhead
License: GPLv3+
URL: https://github.com/%{gh_owner}/%{gh_project}
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz
BuildArch: noarch
BuildRequires: php-composer(theseer/autoload)
%if %{with_tests}
BuildRequires: php(language) >= 5.6.0
BuildRequires: php-date
BuildRequires: php-hash
BuildRequires: php-mbstring
BuildRequires: php-pcre
BuildRequires: php-spl
BuildRequires: php-composer(phpunit/phpunit)
BuildRequires: php-pecl(Xdebug)
BuildRequires: php-pecl(pecl_http)
%endif
# From composer.json
# "php": ">=5.6.0"
Requires: php(language) >= 5.6.0
# From phpcompatinfo report for version0.7
Requires: php-date
Requires: php-hash
Requires: php-mbstring
Requires: php-spl
%if 0%{?fedora} > 21
# For compression
Recommends: php-pecl(pecl_http)
%else
Requires: php-pecl(pecl_http)
%endif
Obsoletes: php-mcnetic-zipstreamer < 1:1.0-4
Provides: php-composer(mcnetic/zipstreamer) = %{version}
Provides: php-composer(deepdiver/zipstreamer) = %{version}
%description
Simple Class to create zip files on the fly and stream directly to the
HTTP client as the content is added (without using temporary files).
Autoloader: %{_datadir}/php/%{namespace}/autoload.php
%prep
%setup -q -n %{gh_project}-%{gh_commit}
%build
%{_bindir}/phpab -o src/autoload.php src
%install
mkdir -p %{buildroot}%{_datadir}/php
cp -pr src %{buildroot}%{_datadir}/php/%{namespace}
%check
%if %{with_tests}
: Ensure we use our autoloader
sed -e '/^ZipStreamer.php/d' -i test/*php
if [ $(php -r "echo PHP_INT_SIZE;") -eq 8 ]; then
: Run test suite
%{_bindir}/phpunit \
--bootstrap %{buildroot}%{_datadir}/php/%{namespace}/autoload.php test/lib
else
: Ignore test suite as Count64 do not support 32 bits overflow
fi
%else
: Test suite disabled
%endif
%files
%{!?_licensedir:%global license %%doc}
%license COPYING
%doc *.md
%doc composer.json
%{_datadir}/php/%{namespace}
%changelog
* Thu May 24 2018 Christian Glombek <lorbus@fedoraproject.org> - 1.1.1-2
- Remove epoch from virtual provides for mcnetic/zipstreamer
* Sun Apr 22 2018 Christian Glombek <lorbus@fedoraproject.org> - 1.1.1-1
- Update to version 1.1.1
* Fri Feb 9 2018 Christian Glombek <lorbus@fedoraproject.org> - 1.1.0-1
- Update to version 1.1.0
- Switch to DeepDiver1975's maintained fork
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Sat Apr 2 2016 Remi Collet <remi@fedoraproject.org> - 1:1.0.1
- update to 1.0
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Wed Jan 20 2016 Remi Collet <remi@fedoraproject.org> - 1:0.7.1
- fix version, from review #1296901
* Fri Jan 8 2016 Remi Collet <remi@fedoraproject.org> - 1.7.2
- ensure we use our autoloader during the test suite
- ignore test suite on 32bits build
* Fri Jan 8 2016 Remi Collet <remi@fedoraproject.org> - 1.7.1
- initial package
- add patch to workaround error raised by pecl_http
see https://github.com/McNetic/PHPZipStreamer/issues/29
|