diff options
author | Remi Collet <fedora@famillecollet.com> | 2015-01-08 17:06:42 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2015-01-08 17:06:42 +0100 |
commit | 135b082c753d94e6a0e5e5ecfd4279deb89ea5ff (patch) | |
tree | 8edc871d9892778912c85749c283be973c3ec11e | |
parent | 6385cb79496db782c83e4723cd75c14553654ccc (diff) |
php-horde-Horde-Css-Parser: 1.0.5
-rw-r--r-- | Horde_Css_Parser-rpm.patch | 15 | ||||
-rw-r--r-- | php-horde-Horde-Css-Parser.spec | 27 | ||||
-rw-r--r-- | test.php | 4 |
3 files changed, 36 insertions, 10 deletions
diff --git a/Horde_Css_Parser-rpm.patch b/Horde_Css_Parser-rpm.patch new file mode 100644 index 0000000..f4292ba --- /dev/null +++ b/Horde_Css_Parser-rpm.patch @@ -0,0 +1,15 @@ +diff -up Horde_Css_Parser-1.0.5/lib/Horde/Css/Parser.php.rpm Horde_Css_Parser-1.0.5/lib/Horde/Css/Parser.php +--- Horde_Css_Parser-1.0.5/lib/Horde/Css/Parser.php.rpm 2015-01-08 16:55:01.000000000 +0100 ++++ Horde_Css_Parser-1.0.5/lib/Horde/Css/Parser.php 2015-01-08 16:55:09.000000000 +0100 +@@ -11,11 +11,6 @@ + * @package Css_Parser + */ + +-if (file_exists(__DIR__ . '/Parser/vendor/autoload.php')) { +- require_once __DIR__ . '/Parser/vendor/autoload.php'; +-} else { +- require_once __DIR__ . '/../../../bundle/vendor/autoload.php'; +-} + + /** + * Horde interface to the Sabberworm CSS Parser library. diff --git a/php-horde-Horde-Css-Parser.spec b/php-horde-Horde-Css-Parser.spec index 4ca8302..3371558 100644 --- a/php-horde-Horde-Css-Parser.spec +++ b/php-horde-Horde-Css-Parser.spec @@ -11,9 +11,8 @@ %global pear_name Horde_Css_Parser %global pear_channel pear.horde.org - Name: php-horde-Horde-Css-Parser -Version: 1.0.4 +Version: 1.0.5 Release: 1%{?dist} Summary: Horde CSS Parser @@ -22,6 +21,10 @@ License: LGPLv2 URL: http://%{pear_channel} Source0: http://%{pear_channel}/get/%{pear_name}-%{version}.tgz +# Sabberworm/CSS is PSR-0 compliant +# Default Horde autoloader will find it +Patch0: %{pear_name}-rpm.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: php(language) >= 5.3.0 @@ -29,6 +32,7 @@ BuildRequires: php-pear(PEAR) >= 1.7.0 BuildRequires: php-channel(%{pear_channel}) # To run unit tests BuildRequires: php-pear(%{pear_channel}/Horde_Test) >= 2.1.0 +BuildRequires: php-PHP-CSS-Parser >= 5.0.8 Requires(post): %{__pear} Requires(postun): %{__pear} @@ -43,6 +47,7 @@ Requires: php-iconv Requires: php-pcre Provides: php-pear(%{pear_channel}/%{pear_name}) = %{version} +Provides: php-composer(horde/horde-css-parser) = %{version} %description @@ -54,11 +59,13 @@ Horde framework. %setup -q -c cd %{pear_name}-%{version} -mv ../package.xml %{name}.xml +%patch0 -p1 -b .rpm -sed -e '/Sabberworm\/CSS/d' \ +sed -e '/bundle/d' \ -e '/EXPAT_LICENSE/d' \ - -i %{name}.xml + -e '/Parser.php/s/md5sum="[^"]*"//' \ + ../package.xml >%{name}.xml +touch -r ../package.xml %{name}.xml %build @@ -80,12 +87,8 @@ install -pm 644 %{name}.xml %{buildroot}%{pear_xmldir} %check -src=$(pwd)/%{pear_name}-%{version} cd %{pear_name}-%{version}/test/$(echo %{pear_name} | sed -e s:_:/:g) -phpunit \ - --include-path=$src/lib \ - -d date.timezone=UTC \ - . +phpunit . %clean @@ -113,6 +116,10 @@ fi %changelog +* Thu Jan 08 2015 Remi Collet <remi@fedoraproject.org> - 1.0.5-1 +- Update to 1.0.5 +- add provides php-composer(horde/horde-css-parser) + * Thu Feb 20 2014 Remi Collet <remi@fedoraproject.org> - 1.0.4-1 - Update to 1.0.4 diff --git a/test.php b/test.php new file mode 100644 index 0000000..139b4c5 --- /dev/null +++ b/test.php @@ -0,0 +1,4 @@ +<?php +require '/usr/share/pear/Horde/Autoloader/Default.php'; + +var_dump(new Horde_Css_Parser()); |