summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2017-02-22 17:15:46 +0100
committerRemi Collet <fedora@famillecollet.com>2017-02-22 17:15:46 +0100
commitff4a1ef77c18eece50385b50efa594e6f55f29a3 (patch)
tree126acd812f47b3288fc283e86b89849617549c2f
parent02aba8acf44c4e72bc21246361ca9936754f11e5 (diff)
php-maennchen-zipstream-php: backport
-rw-r--r--Makefile4
-rw-r--r--composer.json33
-rw-r--r--php-maennchen-zipstream-php.spec29
3 files changed, 65 insertions, 1 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..91b0fd5
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,4 @@
+SRCDIR := $(shell pwd)
+NAME := $(shell basename $(SRCDIR))
+include ../../common/Makefile
+
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..861ff74
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,33 @@
+{
+ "name": "maennchen/zipstream-php",
+ "description": "ZipStream is a library for dynamically streaming dynamic zip files from PHP without writing to the disk at all on the server.",
+ "keywords": ["zip", "stream"],
+ "type": "library",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Paul Duncan",
+ "email": "pabs@pablotron.org"
+ },
+ {
+ "name": "Jonatan Männchen",
+ "email": "jonatan@maennchen.ch"
+ },
+ {
+ "name": "Jesse Donat",
+ "email": "donatj@gmail.com"
+ }
+ ],
+ "require": {
+ "php": ">= 5.6",
+ "ext-mbstring": "*"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "4.3.*"
+ },
+ "autoload": {
+ "psr-4": {
+ "ZipStream\\": "src/"
+ }
+ }
+}
diff --git a/php-maennchen-zipstream-php.spec b/php-maennchen-zipstream-php.spec
index 264c445..51b1332 100644
--- a/php-maennchen-zipstream-php.spec
+++ b/php-maennchen-zipstream-php.spec
@@ -1,13 +1,24 @@
+# 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.4.1
Release: 2%{?dist}
BuildArch: noarch
License: MIT
+Group: Development/Libraries
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
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: php-composer(fedora/autoloader)
BuildRequires: php-fedora-autoloader-devel
BuildRequires: php-zip
@@ -41,6 +52,8 @@ zip file downloader for PHP.
%install
+rm -rf %{buildroot}
+
install -d -p -m 0755 %{buildroot}/%{_datadir}/php
install -d -p -m 0755 %{buildroot}/%{_datadir}/php/ZipStream
@@ -50,10 +63,21 @@ cp -ar src/* %{buildroot}/%{_datadir}/php/ZipStream
%check
sed -i "s:require.*:require('%{buildroot}/%{_datadir}/php/ZipStream/autoload.php');:" test/bootstrap.php
-phpunit --no-coverage
+ret=0
+for cmd in php56 php70 php71 php; do
+ if which $cmd; then
+ $cmd %{_bindir}/phpunit --no-coverage
+ fi
+done
+
+
+%clean
+rm -rf %{buildroot}
%files
+%defattr(-,root,root,-)
+%{!?_licensedir:%global license %%doc}
%license LICENSE.md
%doc composer.json
%doc README.md
@@ -61,6 +85,9 @@ phpunit --no-coverage
%changelog
+* 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.