File php7-sabre-dav1.spec of Package php7-sabre-dav1
#
# spec file for package php7-sabre-dav1
#
# Copyright (c) 2018 Aeneas Jaissle <aj@ajaissle.de>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define php_name php7
%define lib_name sabre-dav
Name: %{php_name}-sabre-dav1
Version: 1.8.12
Release: 0
Summary: SabreDAV WebDAV framework for PHP
License: BSD-3-Clause
Group: Development/Libraries/PHP
Url: http://sabre.io/dav/
Source0: https://github.com/fruux/sabre-dav/archive/%{version}.tar.gz#/%{lib_name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: %{php_name}-devel >= 5.3.1
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: %{php_name} >= 5.3.1
Requires: %{php_name}-ctype
Requires: %{php_name}-dom
Requires: %{php_name}-iconv
#Requires: php-libxml
Requires: php-mbstring
Requires: php-date >= 7.0
Requires: php-pcre >= 7.0
Requires: php-simplexml >= 7.0
Requires: php-spl >= 7.0
Requires: %{php_name}-sabre-vobject2 >= 2.1.0
Provides: php-%{lib_name} = %{version}-%{release}
Provides: php(%{lib_name}) = %{version}-%{release}
Obsoletes: php-%{lib_name} < %{version}-%{release}
Obsoletes: php(%{lib_name}) < %{version}-%{release}
Conflicts: %{php_name}-sabre-dav
Conflicts: %{php_name}-sabre-http
%description
SabreDAV is the most popular WebDAV framework for PHP. Use it to create WebDAV, CalDAV and CardDAV servers.
%prep
%setup -q -n %{lib_name}-%{version}
# remove tests
find . -name __tests__ -type d -print0 | xargs -0 rm -rf
%build
%install
install -d %{buildroot}%{_datadir}/%{php_name}/Sabre
cp -r lib/Sabre/CalDAV/ %{buildroot}%{_datadir}/%{php_name}/Sabre/CalDAV
cp -r lib/Sabre/CardDAV/ %{buildroot}%{_datadir}/%{php_name}/Sabre/CardDAV
cp -r lib/Sabre/DAV/ %{buildroot}%{_datadir}/%{php_name}/Sabre/DAV
cp -r lib/Sabre/DAVACL/ %{buildroot}%{_datadir}/%{php_name}/Sabre/DAVACL
cp -r lib/Sabre/HTTP/ %{buildroot}%{_datadir}/%{php_name}/Sabre/HTTP
%files
%defattr(-,root,root,-)
%doc ChangeLog LICENSE README.md
%dir %{_datadir}/%{php_name}/Sabre
%{_datadir}/%{php_name}/Sabre/*
%changelog