summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2014-05-04 17:09:40 +0200
committerRemi Collet <fedora@famillecollet.com>2014-05-04 17:09:40 +0200
commit058100a882d90fb25b6f0bc527813946ff3b7d2a (patch)
tree5ab016a31ded017607b3a7a248477bfe769c47a2
parent3cea2cd1d4817f0d453ffb65319572c272ba6863 (diff)
php-phpunit-bytekit: sources from github
-rw-r--r--bytekit-cli-rpm.patch9
-rw-r--r--php-phpunit-bytekit.spec84
-rw-r--r--symfony_2.2.patch28
3 files changed, 57 insertions, 64 deletions
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
+ <?php
+ /**
+ * bytekit-cli
diff --git a/php-phpunit-bytekit.spec b/php-phpunit-bytekit.spec
index 4f43b55..6164136 100644
--- a/php-phpunit-bytekit.spec
+++ b/php-phpunit-bytekit.spec
@@ -1,33 +1,41 @@
-%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
-%global pear_name bytekit
+%global gh_commit ef4020bf0b2b233ffb4e85898d9ab563dda024b2
+%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
+%global gh_owner sebastianbergmann
+%global gh_project bytekit-cli
+%global php_home %{_datadir}/php
+%global pear_name bytekit
+%global pear_channel pear.phpunit.de
+%global with_tests %{?_without_tests:0}%{!?_without_tests:1}
%global channel pear.phpunit.de
Name: php-phpunit-bytekit
Version: 1.1.3
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: A command-line tool built on the PHP Bytekit extension
Group: Development/Libraries
License: BSD
-URL: http://github.com/sebastianbergmann/bytekit-cli
-Source0: http://pear.phpunit.de/get/%{pear_name}-%{version}.tgz
-Patch0: symfony_2.2.patch
+URL: https://github.com/%{gh_owner}/%{gh_project}
+Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}.tar.gz
+
+Patch0: %{gh_project}-rpm.patch
+Patch1: symfony_2.2.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: php(language) >= 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 <remi@fedoraproject.org> - 1.1.3-3
+- sources from github
+
* Tue Apr 9 2013 Remi Collet <RPMS@FamilleCollet.com> - 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
- <file baseinstalldir="/" md5sum="4482032bc64a2715b7ef8dbbdf9be56a" name="Bytekit/TextUI/Command.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
-- <file baseinstalldir="/" md5sum="0248192f65a86746e785c95a30f7887d" name="Bytekit/Autoload.php" role="php">
-+ <file baseinstalldir="/" md5sum="92313ea99166d30f5b5545c5d30f427f" name="Bytekit/Autoload.php" role="php">
- <tasks:replace from="@package_version@" to="version" type="package-info" />
- </file>
- <file baseinstalldir="/" md5sum="9681ac8f4ff75b8abd6b523a27bb3156" name="Bytekit/Disassembler.php" role="php">
-@@ -91,7 +91,7 @@ http://github.com/sebastianbergmann/byte
- <package>
- <name>Finder</name>
- <channel>pear.symfony.com</channel>
-- <min>2.1.0RC1</min>
-+ <min>2.2.0</min>
- </package>
- <package>
- <name>ConsoleTools</name>