[php-phpunit-bytekit] sources from github

Remi Collet remi at fedoraproject.org
Mon May 5 11:35:26 UTC 2014


commit 5de40ebefed2f0e7e2e41827b1f4930cc0491084
Author: Remi Collet <remi at fedoraproject.org>
Date:   Mon May 5 13:35:44 2014 +0200

    sources from github

 .gitignore               |    1 +
 bytekit-cli-rpm.patch    |    9 +++++
 php-phpunit-bytekit.spec |   90 +++++++++++++++++++++++-----------------------
 sources                  |    2 +-
 symfony_2.2.patch        |   28 ++------------
 5 files changed, 60 insertions(+), 70 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index d6e3117..b75b5b8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
 bytekit-1.1.1.tgz
 /bytekit-1.1.2.tgz
 /bytekit-1.1.3.tgz
+/bytekit-cli-1.1.3.tar.gz
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 5ea60c1..4555142 100644
--- a/php-phpunit-bytekit.spec
+++ b/php-phpunit-bytekit.spec
@@ -1,30 +1,40 @@
-%{!?__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-pear >= 1:1.9.4
-BuildRequires:  php-channel(%{channel})
+BuildRequires:  php(language) >= 5.3.3
 
-Requires:       php-channel(%{channel})
-Requires:       php-pear(pear.symfony.com/Finder) >= 2.1.0
+# From package.xml
+Requires:       php(language) >= 5.3.3
+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
@@ -36,55 +46,45 @@ 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
 
-%build
-cd %{pear_name}-%{version}
-# Empty build section, most likely nothing required.
+rm Bytekit/Autoload.php.*
 
 
-%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}/.??*
+%build
+#phpab \
+#  --output   Bytekit/Autoload.php \
+#  --template Bytekit/Autoload.php.in \
+#  Bytekit
 
-# Install XML package description
-mkdir -p %{buildroot}%{pear_xmldir}
-install -pm 644 %{name}.xml %{buildroot}%{pear_xmldir}
 
+%install
+mkdir -p       %{buildroot}%{php_home}
+cp -pr Bytekit %{buildroot}%{php_home}/Bytekit
 
-%clean
-rm -rf %{buildroot}
+install -D -p -m 755 bytekit.php %{buildroot}%{_bindir}/bytekit
 
 
 %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 at fedoraproject.org> - 1.1.3-3
+- sources from github
+
 * Sun Aug 04 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.1.3-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 
diff --git a/sources b/sources
index f954a88..ec99d7c 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-02c5a1a5cfe14ddb166ad8ed56bebcd5  bytekit-1.1.3.tgz
+5d5cec0cd2c871ad8a306ae85395b05e  bytekit-cli-1.1.3.tar.gz
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>


More information about the scm-commits mailing list