e5acde4
# remirepo/fedora spec file for php-sabre-dav
663da18
#
f774347
# Copyright (c) 2013-2019 Remi Collet
663da18
# License: CC-BY-SA
e5acde4
# http://creativecommons.org/licenses/by-sa/4.0/
663da18
#
663da18
# Please, preserve the changelog entries
663da18
#
f774347
%global gh_commit    a9780ce4f35560ecbd0af524ad32d9d2c8954b80
663da18
%global gh_short     %(c=%{gh_commit}; echo ${c:0:7})
2286153
%global gh_owner     sabre-io
2286153
%global gh_project   dav
0bb92a4
%if 0%{?rhel} == 5
0bb92a4
%global with_tests   0%{?_with_tests:1}
0bb92a4
%else
0bb92a4
%global with_tests   0%{!?_without_tests:1}
0bb92a4
%endif
663da18
2286153
Name:           php-sabre-%{gh_project}
663da18
Summary:        WebDAV Framework for PHP
f774347
Version:        3.2.3
bc41321
Release:        6%{?dist}
663da18
663da18
URL:            https://github.com/%{gh_owner}/%{gh_project}
663da18
License:        BSD
2286153
Source0:        https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{gh_short}.tar.gz
e5acde4
Source1:        %{name}-autoload.php
663da18
e5acde4
# replace composer autoloader
e5acde4
Patch0:         %{name}-autoload.patch
b5d5840
# For PHP 7.2
b5d5840
Patch1:         https://patch-diff.githubusercontent.com/raw/fruux/sabre-dav/pull/1006.patch
7a32885
# For PHP 7.3
7a32885
Patch2:         https://github.com/sabre-io/dav/commit/5eb5d74514230b11c80b67c7e147242757ccc660.patch
fa3d841
# For PHP 7.4
fa3d841
Patch3:         %{name}-php74.patch
663da18
663da18
BuildArch:      noarch
663da18
%if %{with_tests}
5101559
BuildRequires:  php(language) >= 5.5
2286153
BuildRequires: (php-composer(sabre/vobject)   >= 4.1.0  with php-composer(sabre/vobject)  < 5)
2286153
BuildRequires: (php-composer(sabre/event)     >= 2.0    with php-composer(sabre/event)    < 3)
2286153
BuildRequires: (php-composer(sabre/xml)       >= 1.4.0  with php-composer(sabre/xml)      < 2)
2286153
BuildRequires: (php-composer(sabre/http)      >= 4.2.1  with php-composer(sabre/http)     < 5)
2286153
BuildRequires: (php-composer(sabre/uri)       >= 1.0.1  with php-composer(sabre/uri)      < 2)
2286153
BuildRequires: (php-composer(psr/log)         >= 1.0.1  with php-composer(psr/log)        < 2)
2286153
BuildRequires: (php-composer(psr/log)         >= 1.0.1  with php-composer(psr/log)        < 2)
2286153
BuildRequires: (php-composer(phpunit/phpunit) >= 4.8    with php-composer(phpunit/phpunit) < 6)
2286153
BuildRequires: (php-composer(monolog/monolog) >= 1.18 with php-composer(monolog/monolog)  < 2)
e5acde4
BuildRequires:  php-dom
e5acde4
BuildRequires:  php-pcre
e5acde4
BuildRequires:  php-spl
e5acde4
BuildRequires:  php-simplexml
e5acde4
BuildRequires:  php-mbstring
e5acde4
BuildRequires:  php-ctype
e5acde4
BuildRequires:  php-date
e5acde4
BuildRequires:  php-iconv
e5acde4
BuildRequires:  php-libxml
e5acde4
BuildRequires:  php-curl
d49cf9c
BuildRequires:  php-pdo
5101559
# From composer.json, "require-dev" : {
5101559
#        "phpunit/phpunit" : "> 4.8, <6.0.0",
5101559
#        "evert/phpdoc-md" : "~0.1.0",
5101559
#        "squizlabs/php_codesniffer": "~1.5.3"
5101559
#        "sabre/cs"        : "^1.0.0",
5101559
#        "monolog/monolog": "^1.18"
5101559
e5acde4
# Autoloader
0bb92a4
BuildRequires:  php-composer(fedora/autoloader)
e5acde4
BuildRequires:  php-pdo_sqlite
663da18
%endif
663da18
e5acde4
# From composer.json,    "require": {
5101559
#        "php": ">=5.5.0",
5101559
#        "sabre/vobject": "^4.1.0",
5101559
#        "sabre/event" : ">=2.0.0, <4.0.0",
5101559
#        "sabre/xml"  : "^1.4.0",
5101559
#        "sabre/http" : "^4.2.1",
5101559
#        "sabre/uri" : "^1.0.1",
e5acde4
#        "ext-dom": "*",
e5acde4
#        "ext-pcre": "*",
e5acde4
#        "ext-spl": "*",
e5acde4
#        "ext-simplexml": "*",
e5acde4
#        "ext-mbstring" : "*",
e5acde4
#        "ext-ctype" : "*",
e5acde4
#        "ext-date" : "*",
e5acde4
#        "ext-iconv" : "*",
5101559
#        "lib-libxml" : ">=2.7.0",
5101559
#        "psr/log": "^1.0"
2286153
Requires:       php(language) >= 5.5
2286153
Requires:      (php-composer(sabre/vobject) >= 4.1.0  with php-composer(sabre/vobject) < 5)
2286153
Requires:      (php-composer(sabre/event)   >= 2.0    with php-composer(sabre/event)   < 3)
2286153
Requires:      (php-composer(sabre/xml)     >= 1.4.0  with php-composer(sabre/xml)     < 2)
2286153
Requires:      (php-composer(sabre/http)    >= 4.2.1  with php-composer(sabre/http)    < 5)
2286153
Requires:      (php-composer(sabre/uri)     >= 1.0.1  with php-composer(sabre/uri)     < 2)
2286153
Requires:      (php-composer(psr/log)       >= 1.0.1  with php-composer(psr/log)       < 2)
e5acde4
Requires:       php-dom
e5acde4
Requires:       php-pcre
e5acde4
Requires:       php-spl
e5acde4
Requires:       php-simplexml
e5acde4
Requires:       php-mbstring
663da18
Requires:       php-ctype
663da18
Requires:       php-date
663da18
Requires:       php-iconv
663da18
Requires:       php-libxml
e5acde4
# From composer.json, "suggest" : {
e5acde4
#        "ext-curl" : "*",
e5acde4
#        "ext-pdo" : "*"
663da18
Requires:       php-curl
663da18
Requires:       php-pdo
e5acde4
# Autoloader
0bb92a4
Requires:       php-composer(fedora/autoloader)
663da18
a4abf8c
Provides:       php-composer(sabre/dav) = %{version}
a4abf8c
663da18
663da18
%description
663da18
What is SabreDAV
663da18
663da18
SabreDAV allows you to easily add WebDAV support to a PHP application.
663da18
SabreDAV is meant to cover the entire standard, and attempts to allow
663da18
integration using an easy to understand API.
663da18
663da18
Feature list:
663da18
* Fully WebDAV compliant
663da18
* Supports Windows XP, Windows Vista, Mac OS/X, DavFSv2, Cadaver, Netdrive,
663da18
  Open Office, and probably more.
663da18
* Passing all Litmus tests.
663da18
* Supporting class 1, 2 and 3 Webdav servers.
663da18
* Locking support.
663da18
* Custom property support.
663da18
* CalDAV (tested with Evolution, iCal, iPhone and Lightning).
663da18
* CardDAV (tested with OS/X addressbook, the iOS addressbook and Evolution).
663da18
* Over 97% unittest code coverage.
663da18
0bb92a4
Autoloader: %{_datadir}/php/Sabre/DAV/autoload.php
0bb92a4
663da18
663da18
%prep
663da18
%setup -q -n %{gh_project}-%{gh_commit}
663da18
5101559
%patch0 -p1 -b .rpm
b5d5840
%patch1 -p1
7a32885
%patch2 -p1
fa3d841
%patch3 -p1
5101559
e5acde4
cp %{SOURCE1} lib/DAV/autoload.php
663da18
663da18
# drop executable as only provided as doc
663da18
chmod -x bin/*
663da18
663da18
663da18
%build
663da18
# nothing to build
663da18
663da18
663da18
%install
663da18
# Install as a PSR-0 library
663da18
mkdir -p %{buildroot}%{_datadir}/php
e5acde4
cp -pr lib %{buildroot}%{_datadir}/php/Sabre
663da18
663da18
663da18
%check
663da18
%if %{with_tests}
a4abf8c
%if 0%{?rhel} == 5
a4abf8c
sed -e 's/testMove/SKIP_testMove/' \
a4abf8c
    -i tests/Sabre/DAV/PropertyStorage/Backend/AbstractPDOTest.php
a4abf8c
%endif
a4abf8c
e5acde4
: Fix bootstrap
663da18
cd tests
e5acde4
sed -e 's:@BUILDROOT@:%{buildroot}:' -i bootstrap.php
e5acde4
e5acde4
: Run upstream test suite against installed library
b5d5840
ret=0
d8d959f
for cmd in php php71 php72 php73 php74; do
b5d5840
  if which $cmd; then
2286153
    $cmd %{_bindir}/phpunit \
2286153
       --filter '^((?!(testRequireAuth)).)*$'  \
2286153
       || ret=1
b5d5840
  fi
b5d5840
done
b5d5840
exit $ret
663da18
%else
663da18
: Skip upstream test suite
663da18
%endif
663da18
663da18
663da18
%files
e5acde4
%license LICENSE
e5acde4
%doc *md
e5acde4
%doc composer.json
d49cf9c
%doc examples bin
e5acde4
%{_datadir}/php/Sabre/DAV
e5acde4
%{_datadir}/php/Sabre/DAVACL
e5acde4
%{_datadir}/php/Sabre/CalDAV
e5acde4
%{_datadir}/php/Sabre/CardDAV
663da18
663da18
663da18
%changelog
bc41321
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.3-6
bc41321
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
bc41321
ddfccad
* Fri Oct 11 2019 Remi Collet <remi@remirepo.net> - 3.2.3-5
fa3d841
- add patch for PHP 7.4 backported from v4
fa3d841
d157054
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.3-4
d157054
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
d157054
d8d959f
* Mon Jul  1 2019 Remi Collet <remi@remirepo.net> - 3.2.3-3
d8d959f
- change autoloader order to ensure same versions are used
d8d959f
19c2b30
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.3-2
19c2b30
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
19c2b30
f774347
* Wed Jan  9 2019 Remi Collet <remi@remirepo.net> - 3.2.3-1
f774347
- update to 3.2.3
f774347
7a32885
* Mon Oct 15 2018 Remi Collet <remi@remirepo.net> - 3.2.2-7
7a32885
- add upstream patch for PHP 7.3
7a32885
db6f25b
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.2-6
db6f25b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
db6f25b
2286153
* Tue Jun  5 2018 Remi Collet <remi@remirepo.net> - 3.2.2-5
2286153
- use range dependencies on F27+
2286153
- ignore 1 test failing with sabre/http 4.2.4
2286153
- fix project URL
2286153
fe6dd67
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.2-4
fe6dd67
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
fe6dd67
b5d5840
* Fri Oct  6 2017 Remi Collet <remi@remirepo.net> - 3.2.2-3
b5d5840
- add patch for PHP 7.2 from https://github.com/fruux/sabre-dav/pull/1006
b5d5840
dbbc025
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.2-2
dbbc025
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
dbbc025
5101559
* Wed Feb 15 2017 Remi Collet <remi@fedoraproject.org> - 3.2.2-1
5101559
- update to 3.2.2
5101559
- raise dependency on PHP version 5.5
5101559
- raise dependency on sabre/vobject version 4.1
5101559
- raise dependency on sabre/xml version 1.4
5101559
- raise dependency on sabre/http version 4.2.1
5101559
- raise dependency on sabre/uri version 1.0.1
5101559
- add dependency on psr/log
5101559
2aa703a
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.9-4
2aa703a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
2aa703a
1081bc4
* Wed Nov 23 2016 Remi Collet <remi@fedoraproject.org> - 3.0.9-3
1081bc4
- add upstream patch to fix FTBFS with php 7.1
1081bc4
1081bc4
* Sat Oct 29 2016 Remi Collet <remi@fedoraproject.org> - 3.0.9-2
0bb92a4
- switch from symfony/class-loader to fedora/autoloader
0bb92a4
f0cd04d
* Thu Apr  7 2016 Remi Collet <remi@fedoraproject.org> - 3.0.9-1
f0cd04d
- update to 3.0.9
d946793
1c4b5f0
* Wed Mar 23 2016 Remi Collet <remi@fedoraproject.org> - 3.0.8-1
1c4b5f0
- update to 3.0.8
1c4b5f0
bac7b51
* Mon Mar 21 2016 Remi Collet <remi@fedoraproject.org> - 3.0.7-2
a4abf8c
- provide missing php-composer(sabre/dav)
bac7b51
c27bbee
* Fri Mar 11 2016 Remi Collet <remi@fedoraproject.org> - 3.0.7-1
c27bbee
- update to 3.0.7
c27bbee
- add dependency on sabre/xml
c27bbee
- add dependency on sabre/uri
c27bbee
- raise dependency on sabre/http >= 4
a4abf8c
- run test suite with both PHP 5 and 7 when available
a4abf8c
5e66aa9
* Wed Feb 24 2016 James Hogarth <james.hogarth@gmail.com> - 2.1.6-1
5e66aa9
- update to 2.1.6
5e66aa9
c80cc1e
* Wed Feb 24 2016 Remi Collet <remi@fedoraproject.org> - 2.1.5-1
e5acde4
- update to 2.1.5
e5acde4
be7d386
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.12-3
be7d386
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
be7d386
d70211c
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.12-2
d70211c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
d70211c
477ce97
* Fri Mar 06 2015 Adam Williamson <awilliam@redhat.com> - 1.8.12-1
477ce97
- update to 1.8.12 (bugfix release, no bc breaks)
477ce97
b47d63a
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.10-2
b47d63a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
b47d63a
d49cf9c
* Thu May 22 2014 Remi Collet <remi@fedoraproject.org> - 1.8.10-1
d49cf9c
- update to 1.8.10
d49cf9c
1e7c6ff
* Sun Mar  2 2014 Remi Collet <remi@fedoraproject.org> - 1.8.9-1
1e7c6ff
- update to 1.8.9
1e7c6ff
49a11b8
* Thu Feb 20 2014 Remi Collet <remi@fedoraproject.org> - 1.8.8-2
49a11b8
- drop max version for VObject
49a11b8
4990e2a
* Tue Feb 11 2014 Remi Collet <remi@fedoraproject.org> - 1.8.8-1
4990e2a
- update to 1.8.8
4990e2a
663da18
* Tue Dec 31 2013 Remi Collet <remi@fedoraproject.org> - 1.8.7-1
477ce97
- Initial packaging