Compare commits

...
Sign in to create a new pull request.

2 commits

Author SHA1 Message Date
Remi Collet
17700db246 fix changelog
(cherry picked from commit 01fad9df0c)
2023-01-25 10:56:38 +01:00
Remi Collet
9f5948b5ac update to 4.5.3
low dependency on PHP 7.1
low dependency on sabre/xml v2

(cherry picked from commit 962d2013d3)
2023-01-25 10:53:45 +01:00
4 changed files with 32 additions and 25 deletions

1
.gitignore vendored
View file

@ -21,3 +21,4 @@ clog
/php-sabre-vobject4-4.4.3-2a043b9.tgz
/php-sabre-vobject4-4.5.0-d1fdc0c.tgz
/php-sabre-vobject4-4.5.1-1f83674.tgz
/php-sabre-vobject4-4.5.3-fe6d918.tgz

View file

@ -1,10 +0,0 @@
<?php
/* Autoloader for sabre/vobject v4 and its dependencies */
require_once '/usr/share/php/Fedora/Autoloader/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('Sabre\\VObject\\', __DIR__);
\Fedora\Autoloader\Dependencies::required([
'/usr/share/php/Sabre/Xml2/autoload.php',
]);

View file

@ -1,7 +1,7 @@
# remirepo/fedora spec file for php-sabre-vobject4
#
# Copyright (c) 2013-2022 Remi Collet
# License: CC-BY-SA
# Copyright (c) 2013-2023 Remi Collet
# License: CC-BY-SA-4.0
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
@ -12,7 +12,7 @@
# For compatibility with SCL
%undefine __brp_mangle_shebangs
%global gh_commit 1f836740c88bac483f3b572a332eb8fd1cd04981
%global gh_commit fe6d9183154ed6f2f913f2b568d3d51d8ae9b308
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner sabre-io
%global gh_project vobject
@ -25,13 +25,12 @@
Name: php-sabre-vobject4
Summary: Library to parse and manipulate iCalendar and vCard objects
Version: 4.5.1
Version: 4.5.3
Release: 1%{?dist}
URL: http://sabre.io/vobject/
License: BSD
License: BSD-3-Clause
Source0: %{name}-%{version}-%{gh_short}.tgz
Source1: %{name}-autoload.php
Source2: makesrc.sh
# replace composer autloader
@ -41,31 +40,31 @@ BuildArch: noarch
%if %{with tests}
BuildRequires: php(language) >= 7.1
BuildRequires: php-mbstring
BuildRequires: (php-composer(sabre/xml) >= 2.1 with php-composer(sabre/xml) < 3)
BuildRequires: (php-composer(sabre/xml) >= 2.1 with php-composer(sabre/xml) < 5)
BuildRequires: php-date
BuildRequires: php-json
BuildRequires: php-pcre
BuildRequires: php-spl
BuildRequires: php-xml
# From composer.json, "require-dev"
# "friendsofphp/php-cs-fixer": "~2.17.1",
# "friendsofphp/php-cs-fixer": "^2.17.1",
# "phpunit/phpunit" : "^7.5 || ^8.5 || ^9.0",
# "phpunit/php-invoker" : "^2.0 || ^3.1",
# "phpstan/phpstan": "^0.12"
BuildRequires: phpunit9
%global phpunit %{_bindir}/phpunit9
# Autoloader
BuildRequires: php-composer(fedora/autoloader)
%endif
# Autoloader
BuildRequires: php-fedora-autoloader-devel
# From composer.json, "require"
# "php" : "^7.1 || ^8.0",
# "ext-mbstring" : "*",
# "sabre/xml" : "^2.1"
# "sabre/xml" : "^2.1 || ^3.0 || ^4.0"
Requires: php(language) >= 7.1
Requires: php-mbstring
#
Requires: (php-composer(sabre/xml) >= 2.1 with php-composer(sabre/xml) < 3)
Requires: (php-composer(sabre/xml) >= 2.1 with php-composer(sabre/xml) < 5)
# From phpcompatinfo report for version 4.1.2
%if %{with_cmd}
Requires: php-cli
@ -97,7 +96,19 @@ Autoloader: %{_datadir}/php/Sabre/VObject4/autoload.php
%patch0 -p1 -b .rpm
cp %{SOURCE1} lib/autoload.php
phpab -t fedora -o lib/autoload.php lib
cat << 'EOF' | tee -a lib/autoload.php
// Dependencies
\Fedora\Autoloader\Dependencies::required([
[
'%{_datadir}/php/Sabre/Xml4/autoload.php',
'%{_datadir}/php/Sabre/Xml3/autoload.php',
'%{_datadir}/php/Sabre/Xml2/autoload.php',
],
]);
EOF
%build
@ -139,7 +150,7 @@ fi
: Run upstream test suite against installed library
ret=0
for cmdarg in "php %{phpunit}" php74 php80 php81 php82; do
for cmdarg in "php %{phpunit}" php80 php81 php82; do
if which $cmdarg; then
set $cmdarg
$1 ${2:-%{_bindir}/phpunit9} $opt || ret=1
@ -162,6 +173,11 @@ exit $ret
%endif
%changelog
* Wed Jan 25 2023 Remi Collet <remi@remirepo.net> - 4.5.3-1
- update to 4.5.3
- allow sabre/xml v3 or v4
- switch to classmap autoloader
* Mon Oct 10 2022 Remi Collet <remi@remirepo.net> - 4.5.1-1
- update to 4.5.1

View file

@ -1 +1 @@
SHA512 (php-sabre-vobject4-4.5.1-1f83674.tgz) = 2d6df21a8ef43b155f139105b662cb4ae84374110aa4187324fd775b5d71cd05fc467efe1a95dadd07b755585cf2c1bd63095a22e8747548c021be7dad1adcd2
SHA512 (php-sabre-vobject4-4.5.3-fe6d918.tgz) = 4aab893c740ae1a0b770ded667f95b06d02bf172bb4cfb82bb18e7dd604620e8009d3fe9c4b555fa228b72f002bfedf3a82dd9533c4093cef8b94e8ab2713c7a