From 058100a882d90fb25b6f0bc527813946ff3b7d2a Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sun, 4 May 2014 17:09:40 +0200 Subject: php-phpunit-bytekit: sources from github --- bytekit-cli-rpm.patch | 9 ++++++ php-phpunit-bytekit.spec | 84 +++++++++++++++++++++++++----------------------- symfony_2.2.patch | 28 +++------------- 3 files changed, 57 insertions(+), 64 deletions(-) create mode 100644 bytekit-cli-rpm.patch diff --git a/bytekit-cli-rpm.patch b/bytekit-cli-rpm.patch new file mode 100644 index 0000000..159c5ae --- /dev/null +++ b/bytekit-cli-rpm.patch @@ -0,0 +1,9 @@ +diff -up ./bytekit.php.rpm ./bytekit.php +--- ./bytekit.php.rpm 2014-05-04 16:59:19.000000000 +0200 ++++ ./bytekit.php 2014-05-04 16:59:32.000000000 +0200 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env php ++#!/usr/bin/php + = 5.3.3 -BuildRequires: php-pear(PEAR) >= 1.9.4 -BuildRequires: php-channel(%{channel}) +# From package.xml Requires: php(language) >= 5.3.3 -Requires: php-pear(PEAR) >= 1.9.4 -Requires: php-channel(%{channel}) -Requires: php-pear(pear.symfony.com/Finder) >= 2.1.0 +Requires: php-symfony-finder >= 2.1.0 Requires: php-pear(components.ez.no/ConsoleTools) >= 1.6 -Requires(post): %{__pear} -Requires(postun): %{__pear} +# From phpcomaptinfo report for version 1.1.3 +Requires: php-dom +Requires: php-pcre +Requires: php-spl -Provides: php-pear(%{channel}/%{pear_name}) = %{version} +# For compatibility with pear mode +Provides: php-pear(%{pear_channel}/%{pear_name}) = %{version} %description @@ -39,29 +47,27 @@ analysis tasks. %prep -%setup -q -c -%patch0 -p1 -b .orig -[ -f package2.xml ] || mv package.xml package2.xml -mv package2.xml %{pear_name}-%{version}/%{name}.xml -cd %{pear_name}-%{version} +%setup -q -n %{gh_project}-%{gh_commit} + +%patch0 -p1 -b .rpm +%patch1 -p1 -b .orig + +rm Bytekit/Autoload.php.* %build -cd %{pear_name}-%{version} -# Empty build section, most likely nothing required. +#phpab \ +# --output Bytekit/Autoload.php \ +# --template Bytekit/Autoload.php.in \ +# Bytekit %install -cd %{pear_name}-%{version} -rm -rf %{buildroot} docdir -%{__pear} install --nodeps --packagingroot %{buildroot} %{name}.xml - -# Clean up unnecessary files -rm -rf %{buildroot}%{pear_metadir}/.??* +rm -rf %{buildroot} +mkdir -p %{buildroot}%{php_home} +cp -pr Bytekit %{buildroot}%{php_home}/Bytekit -# Install XML package description -mkdir -p %{buildroot}%{pear_xmldir} -install -pm 644 %{name}.xml %{buildroot}%{pear_xmldir} +install -D -p -m 755 bytekit.php %{buildroot}%{_bindir}/bytekit %clean @@ -69,25 +75,23 @@ rm -rf %{buildroot} %post -%{__pear} install --nodeps --soft --force --register-only \ - %{pear_xmldir}/%{name}.xml >/dev/null || : - - -%postun -if [ $1 -eq 0 ] ; then - %{__pear} uninstall --nodeps --ignore-errors --register-only \ - pear.phpunit.de/%{pear_name} >/dev/null || : +if [ -x %{_bindir}/pear ]; then + %{_bindir}/pear uninstall --nodeps --ignore-errors --register-only \ + %{pear_channel}/%{pear_name} >/dev/null || : fi %files %defattr(-,root,root,-) -%{pear_xmldir}/%{name}.xml -%{pear_phpdir}/Bytekit +%doc README.markdown LICENSE +%{php_home}/Bytekit %{_bindir}/bytekit %changelog +* Sun May 4 2014 Remi Collet - 1.1.3-3 +- sources from github + * Tue Apr 9 2013 Remi Collet - 1.1.3-2 - pull symfony 2.2 patch from rawhide diff --git a/symfony_2.2.patch b/symfony_2.2.patch index 818e5db..1ec1eb0 100644 --- a/symfony_2.2.patch +++ b/symfony_2.2.patch @@ -1,6 +1,7 @@ -diff -up bytekit-1.1.3/bytekit-1.1.3/Bytekit/Autoload.php.orig bytekit-1.1.3/bytekit-1.1.3/Bytekit/Autoload.php ---- bytekit-1.1.3/bytekit-1.1.3/Bytekit/Autoload.php.orig 2012-08-27 07:04:15.000000000 +0200 -+++ bytekit-1.1.3/bytekit-1.1.3/Bytekit/Autoload.php 2013-04-09 07:32:47.944781836 +0200 +https://github.com/sebastianbergmann/bytekit-cli/commit/c40f2a23a9e5acab889621c94aa1bb434ef379f4 + +--- a/Bytekit/Autoload.php.orig 2012-08-27 07:04:15.000000000 +0200 ++++ b/Bytekit/Autoload.php 2013-04-09 07:32:47.944781836 +0200 @@ -41,15 +41,7 @@ * @since File available since Release 1.0.0 */ @@ -18,24 +19,3 @@ diff -up bytekit-1.1.3/bytekit-1.1.3/Bytekit/Autoload.php.orig bytekit-1.1.3/byt require_once 'ezc/Base/base.php'; spl_autoload_register( -diff -up bytekit-1.1.3/package.xml.orig bytekit-1.1.3/package.xml ---- bytekit-1.1.3/package.xml.orig 2012-08-27 07:04:15.000000000 +0200 -+++ bytekit-1.1.3/package.xml 2013-04-09 08:11:48.982117569 +0200 -@@ -56,7 +56,7 @@ http://github.com/sebastianbergmann/byte - - - -- -+ - - - -@@ -91,7 +91,7 @@ http://github.com/sebastianbergmann/byte - - Finder - pear.symfony.com -- 2.1.0RC1 -+ 2.2.0 - - - ConsoleTools -- cgit