[php-phpunit-PHPUnit-Selenium/epel7] sources from github

Remi Collet remi at fedoraproject.org
Tue Apr 29 11:55:19 UTC 2014


commit 5558725488a217de2aeadac8b4f76398f2b13d40
Author: Remi Collet <remi at fedoraproject.org>
Date:   Tue Apr 29 13:44:26 2014 +0200

    sources from github
    
    (cherry picked from commit 4a4bf362268c1c3a7f4c1c0782e501b4aad89213)

 .gitignore                        |    1 +
 php-phpunit-PHPUnit-Selenium.spec |   78 +++++++++++++++----------------------
 sources                           |    2 +-
 3 files changed, 33 insertions(+), 48 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 0a539e7..af02baf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,3 +22,4 @@ package*.xml
 /PHPUnit_Selenium-1.3.1.tgz
 /PHPUnit_Selenium-1.3.2.tgz
 /PHPUnit_Selenium-1.3.3.tgz
+/phpunit-selenium-1.3.3.tar.gz
diff --git a/php-phpunit-PHPUnit-Selenium.spec b/php-phpunit-PHPUnit-Selenium.spec
index 3f76587..d7a250b 100644
--- a/php-phpunit-PHPUnit-Selenium.spec
+++ b/php-phpunit-PHPUnit-Selenium.spec
@@ -1,37 +1,36 @@
 # spec file for php-phpunit-PHPUnit-Selenium
 #
-# Copyright (c) 2010-2013 Remi Collet
+# Copyright (c) 2010-2014 Remi Collet
 # License: CC-BY-SA
 # http://creativecommons.org/licenses/by-sa/3.0/
 #
 # Please, preserve the changelog entries
 #
-%{!?__pear: %global __pear %{_bindir}/pear}
-%{!?pear_metadir: %global pear_metadir %{pear_phpdir}}
+%global gh_commit    e89bfa1080dce9617c9b3e7760d50752974bfbd2
+%global gh_short     %(c=%{gh_commit}; echo ${c:0:7})
+%global gh_owner     sebastianbergmann
+%global gh_project   phpunit-selenium
+%global php_home     %{_datadir}/php
 %global pear_name    PHPUnit_Selenium
 %global pear_channel pear.phpunit.de
+# No test, as test suite requires a Selenium server
 
 Name:           php-phpunit-PHPUnit-Selenium
 Version:        1.3.3
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Selenium RC integration for PHPUnit
 
 Group:          Development/Libraries
 License:        BSD
-URL:            https://github.com/sebastianbergmann/phpunit-selenium
-Source0:        http://pear.phpunit.de/get/%{pear_name}-%{version}.tgz
+URL:            https://github.com/%{gh_owner}/%{gh_project}
+Source0:        https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}.tar.gz
 
 BuildArch:      noarch
-BuildRequires:  php-pear(PEAR) >= 1.9.4
-BuildRequires:  php-channel(%{pear_channel})
+BuildRequires:  php(language) >= 5.3.3
 
-Requires(post): %{__pear}
-Requires(postun): %{__pear}
-# From package.xml
+# From composer.json
 Requires:       php(language) >= 5.3.3
-Requires:       php-pear(PEAR) >= 1.9.4
-Requires:       php-channel(%{pear_channel})
-Requires:       php-pear(%{pear_channel}/PHPUnit) >= 3.7.0
+Requires:       php-pear-PHPUnit >= 3.7.0
 Requires:       php-curl
 Requires:       php-dom
 # From phpcompatinfo report for version 1.3.3
@@ -42,6 +41,7 @@ Requires:       php-reflection
 Requires:       php-spl
 Requires:       php-zip
 
+# For compatibility with PEAR mode
 Provides:       php-pear(%{pear_channel}/%{pear_name}) = %{version}
 
 
@@ -55,53 +55,37 @@ Optional dependency: XDebug (php-pecl-xdebug)
 
 
 %prep
-%setup -q -c
-cd %{pear_name}-%{version}
-# package.xml is V2
-mv ../package.xml %{name}.xml
+%setup -q -n %{gh_project}-%{gh_commit}
+
+rm PHPUnit/Extensions/SeleniumCommon/Autoload.php.in
 
 
 %build
-cd %{pear_name}-%{version}
 # Empty build section, most likely nothing required.
 
+# If upstream drop Autoload.php, command to generate it.
+# Also remember to fix the command to use it.
 
-%install
-cd %{pear_name}-%{version}
-%{__pear} install --nodeps --packagingroot %{buildroot} %{name}.xml
-
-# Clean up unnecessary files
-rm -rf %{buildroot}%{pear_metadir}/.??*
-
-# Install XML package description
-mkdir -p %{buildroot}%{pear_xmldir}
-install -pm 644 %{name}.xml %{buildroot}%{pear_xmldir}
+#phpab \
+#  --output   PHPUnit/Extensions/SeleniumCommon/Autoload.php2 \
+#  --template PHPUnit/Extensions/SeleniumCommon/Autoload.php.in \
+#  PHPUnit
 
 
-%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_channel}/%{pear_name} >/dev/null || :
-fi
+%install
+mkdir -p       %{buildroot}%{php_home}
+cp -pr PHPUnit %{buildroot}%{php_home}/PHPUnit
 
 
 %files
-%doc %{pear_docdir}/%{pear_name}
-%{pear_xmldir}/%{name}.xml
-%{pear_phpdir}/PHPUnit/Extensions/SeleniumCommon
-%{pear_phpdir}/PHPUnit/Extensions/SeleniumTestCase
-%{pear_phpdir}/PHPUnit/Extensions/SeleniumTestCase.php
-%{pear_phpdir}/PHPUnit/Extensions/Selenium2TestCase
-%{pear_phpdir}/PHPUnit/Extensions/Selenium2TestCase.php
-%{pear_phpdir}/PHPUnit/Extensions/SeleniumTestSuite.php
-%{pear_phpdir}/PHPUnit/Extensions/SeleniumBrowserSuite.php
+%doc ChangeLog.markdown LICENSE README.md
+%{php_home}/PHPUnit/Extensions/Selenium*
 
 
 %changelog
+* Tue Apr 29 2014 Remi Collet <remi at fedoraproject.org> - 1.3.3-2
+- sources from github
+
 * Fri Nov 22 2013 Remi Collet <remi at fedoraproject.org> - 1.3.3-1
 - Update to 1.3.3 (stable)
 - improve description
diff --git a/sources b/sources
index 2482dde..1bf7c00 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-33ee2caf975d6e657ee63f24d4224956  PHPUnit_Selenium-1.3.3.tgz
+bf6aea05f918080cfe16558abf14a325  phpunit-selenium-1.3.3.tar.gz


More information about the scm-commits mailing list