From 149af07616805d593bb5a2920f89fdda06a96dbe Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 19 Oct 2017 05:50:54 +0200 Subject: v4.1.3 --- .gitignore | 8 ++++++ composer.json | 2 +- php-sabre-vobject4-bin.patch | 66 ++++++++++++++++++++++++++++++++++++++++++++ php-sabre-vobject4.spec | 41 ++++++++++++--------------- sabre-vobject-bin.patch | 66 -------------------------------------------- 5 files changed, 92 insertions(+), 91 deletions(-) create mode 100644 .gitignore create mode 100644 php-sabre-vobject4-bin.patch delete mode 100644 sabre-vobject-bin.patch diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fc9aa8c --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +clog +package-*.xml +*.tgz +*.tar.gz +*.tar.xz +*.tar.xz.asc +*.src.rpm +*/*rpm diff --git a/composer.json b/composer.json index cfa4a71..1f22f6d 100644 --- a/composer.json +++ b/composer.json @@ -37,7 +37,7 @@ "sabre/xml" : ">=1.5 <3.0" }, "require-dev" : { - "phpunit/phpunit" : "*", + "phpunit/phpunit" : "> 4.8, <6.0.0", "sabre/cs" : "^1.0.0" }, diff --git a/php-sabre-vobject4-bin.patch b/php-sabre-vobject4-bin.patch new file mode 100644 index 0000000..79ed1a5 --- /dev/null +++ b/php-sabre-vobject4-bin.patch @@ -0,0 +1,66 @@ +diff -up ./bin/generate_vcards.rpm ./bin/generate_vcards +--- ./bin/generate_vcards.rpm 2017-01-17 14:09:13.368837753 +0100 ++++ ./bin/generate_vcards 2017-01-17 14:12:49.417890498 +0100 +@@ -6,8 +6,7 @@ namespace Sabre\VObject; + // This sucks.. we have to try to find the composer autoloader. But chances + // are, we can't find it this way. So we'll do our bestest + $paths = [ +- __DIR__ . '/../vendor/autoload.php', // In case vobject is cloned directly +- __DIR__ . '/../../../autoload.php', // In case vobject is a composer dependency. ++ '/usr/share/php/Sabre/VObject4/autoload.php', // RPM installation + ]; + + foreach($paths as $path) { +@@ -18,7 +17,7 @@ foreach($paths as $path) { + } + + if (!class_exists('Sabre\\VObject\\Version')) { +- fwrite(STDERR, "Composer autoloader could not be properly loaded.\n"); ++ fwrite(STDERR, "Autoloader could not be properly loaded.\n"); + die(1); + } + +diff -up ./bin/vobject.rpm ./bin/vobject +--- ./bin/vobject.rpm 2017-01-17 14:12:09.586696412 +0100 ++++ ./bin/vobject 2017-01-17 14:12:40.301846078 +0100 +@@ -6,8 +6,7 @@ namespace Sabre\VObject; + // This sucks.. we have to try to find the composer autoloader. But chances + // are, we can't find it this way. So we'll do our bestest + $paths = [ +- __DIR__ . '/../vendor/autoload.php', // In case vobject is cloned directly +- __DIR__ . '/../../../autoload.php', // In case vobject is a composer dependency. ++ '/usr/share/php/Sabre/VObject4/autoload.php', // RPM installation + ]; + + foreach($paths as $path) { +@@ -18,7 +17,7 @@ foreach($paths as $path) { + } + + if (!class_exists('Sabre\\VObject\\Version')) { +- fwrite(STDERR, "Composer autoloader could not be loaded.\n"); ++ fwrite(STDERR, "Autoloader could not be loaded.\n"); + die(1); + } + +diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php +--- ./tests/bootstrap.php.rpm 2016-12-06 05:14:09.000000000 +0100 ++++ ./tests/bootstrap.php 2017-01-17 14:14:50.960482740 +0100 +@@ -3,8 +3,7 @@ + date_default_timezone_set('UTC'); + + $try = [ +- __DIR__ . '/../vendor/autoload.php', +- __DIR__ . '/../../../autoload.php', ++ '@BUILDROOT@/usr/share/php/Sabre/VObject4/autoload.php', // RPM installation + ]; + + foreach ($try as $path) { +@@ -14,7 +13,7 @@ foreach ($try as $path) { + } + } + +-$autoLoader->addPsr4('Sabre\\VObject\\', __DIR__ . '/VObject'); ++\Fedora\Autoloader\Autoload::addPsr4('Sabre\\VObject\\', __DIR__ . '/VObject'); + + if (!defined('SABRE_TEMPDIR')) { + define('SABRE_TEMPDIR', __DIR__ . '/temp/'); diff --git a/php-sabre-vobject4.spec b/php-sabre-vobject4.spec index 08db086..09b4b4c 100644 --- a/php-sabre-vobject4.spec +++ b/php-sabre-vobject4.spec @@ -6,10 +6,10 @@ # # Please, preserve the changelog entries # -%global gh_commit d0fde2fafa2a3dad1f559c2d1c2591d4fd75ae3c +%global gh_commit df9916813d1d83e4f761c4cba13361ee74196fac %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) -%global gh_owner fruux -%global gh_project sabre-vobject +%global gh_owner sabre-io +%global gh_project vobject %global with_tests %{?_without_tests:0}%{!?_without_tests:1} %if 0%{?fedora} > 25 @@ -18,9 +18,9 @@ %global with_cmd 0 %endif -Name: php-%{gh_project}4 +Name: php-sabre-vobject4 Summary: Library to parse and manipulate iCalendar and vCard objects -Version: 4.1.2 +Version: 4.1.3 Release: 1%{?dist} URL: http://sabre.io/vobject/ @@ -30,9 +30,8 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit Source1: %{name}-autoload.php # replace composer autloader -Patch0: %{gh_project}-bin.patch +Patch0: %{name}-bin.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch %if %{with_tests} BuildRequires: php(language) >= 5.5 @@ -45,10 +44,10 @@ BuildRequires: php-pcre BuildRequires: php-spl BuildRequires: php-xml # From composer.json, "require-dev" -# "phpunit/phpunit" : "*", +# "phpunit/phpunit" : "> 4.8, <6.0.0", # "squizlabs/php_codesniffer": "*" # "sabre/cs" : "^1.0.0" -BuildRequires: php-composer(phpunit/phpunit) +BuildRequires: php-composer(phpunit/phpunit) > 4.8 # Autoloader BuildRequires: php-composer(fedora/autoloader) %endif @@ -119,21 +118,12 @@ cd tests sed -e 's:@BUILDROOT@:%{buildroot}:' -i bootstrap.php : Run upstream test suite against installed library -# remirepo:11 -run=0 ret=0 -if which php56; then - php56 %{_bindir}/phpunit || ret=1 - run=1 -fi -if which php71; then - php71 %{_bindir}/phpunit || ret=1 - run=1 -fi -if [ $run -eq 0 ]; then -%{_bindir}/phpunit --verbose -# remirepo:2 -fi +for cmd in php php56 php70 php71 php72; do + if which $cmd; then + $cmd %{_bindir}/phpunit --verbose || ret=1 + fi +done exit $ret %else : Skip upstream test suite @@ -141,7 +131,6 @@ exit $ret %files -%defattr(-,root,root,-) %{!?_licensedir:%global license %%doc} %license LICENSE %doc *md @@ -153,6 +142,10 @@ exit $ret %endif %changelog +* Thu Oct 19 2017 Remi Collet - 4.1.3-1 +- Update to 4.1.3 +- sources from https://github.com/sabre-io/vobject + * Tue Jan 17 2017 Remi Collet - 4.1.2-1 - rename to php-sabre-vobject4 - raise dependency on PHP version 5.5 diff --git a/sabre-vobject-bin.patch b/sabre-vobject-bin.patch deleted file mode 100644 index 79ed1a5..0000000 --- a/sabre-vobject-bin.patch +++ /dev/null @@ -1,66 +0,0 @@ -diff -up ./bin/generate_vcards.rpm ./bin/generate_vcards ---- ./bin/generate_vcards.rpm 2017-01-17 14:09:13.368837753 +0100 -+++ ./bin/generate_vcards 2017-01-17 14:12:49.417890498 +0100 -@@ -6,8 +6,7 @@ namespace Sabre\VObject; - // This sucks.. we have to try to find the composer autoloader. But chances - // are, we can't find it this way. So we'll do our bestest - $paths = [ -- __DIR__ . '/../vendor/autoload.php', // In case vobject is cloned directly -- __DIR__ . '/../../../autoload.php', // In case vobject is a composer dependency. -+ '/usr/share/php/Sabre/VObject4/autoload.php', // RPM installation - ]; - - foreach($paths as $path) { -@@ -18,7 +17,7 @@ foreach($paths as $path) { - } - - if (!class_exists('Sabre\\VObject\\Version')) { -- fwrite(STDERR, "Composer autoloader could not be properly loaded.\n"); -+ fwrite(STDERR, "Autoloader could not be properly loaded.\n"); - die(1); - } - -diff -up ./bin/vobject.rpm ./bin/vobject ---- ./bin/vobject.rpm 2017-01-17 14:12:09.586696412 +0100 -+++ ./bin/vobject 2017-01-17 14:12:40.301846078 +0100 -@@ -6,8 +6,7 @@ namespace Sabre\VObject; - // This sucks.. we have to try to find the composer autoloader. But chances - // are, we can't find it this way. So we'll do our bestest - $paths = [ -- __DIR__ . '/../vendor/autoload.php', // In case vobject is cloned directly -- __DIR__ . '/../../../autoload.php', // In case vobject is a composer dependency. -+ '/usr/share/php/Sabre/VObject4/autoload.php', // RPM installation - ]; - - foreach($paths as $path) { -@@ -18,7 +17,7 @@ foreach($paths as $path) { - } - - if (!class_exists('Sabre\\VObject\\Version')) { -- fwrite(STDERR, "Composer autoloader could not be loaded.\n"); -+ fwrite(STDERR, "Autoloader could not be loaded.\n"); - die(1); - } - -diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php ---- ./tests/bootstrap.php.rpm 2016-12-06 05:14:09.000000000 +0100 -+++ ./tests/bootstrap.php 2017-01-17 14:14:50.960482740 +0100 -@@ -3,8 +3,7 @@ - date_default_timezone_set('UTC'); - - $try = [ -- __DIR__ . '/../vendor/autoload.php', -- __DIR__ . '/../../../autoload.php', -+ '@BUILDROOT@/usr/share/php/Sabre/VObject4/autoload.php', // RPM installation - ]; - - foreach ($try as $path) { -@@ -14,7 +13,7 @@ foreach ($try as $path) { - } - } - --$autoLoader->addPsr4('Sabre\\VObject\\', __DIR__ . '/VObject'); -+\Fedora\Autoloader\Autoload::addPsr4('Sabre\\VObject\\', __DIR__ . '/VObject'); - - if (!defined('SABRE_TEMPDIR')) { - define('SABRE_TEMPDIR', __DIR__ . '/temp/'); -- cgit