diff options
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | composer.json | 33 | ||||
-rw-r--r-- | php-maennchen-zipstream-php.spec | 29 |
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. |