From f0b499f74643accc6b8a326d23e02dfbbd006fae Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 7 May 2013 14:27:45 +0200 Subject: php-sabredav-Sabre: 1.0.1 (non upstream, just of us) --- php-sabredav-Sabre.patch | 36 ++++++++++++++++++++++++++++++++++++ php-sabredav-Sabre.spec | 42 ++++++++++++++++++++++++++++-------------- 2 files changed, 64 insertions(+), 14 deletions(-) create mode 100644 php-sabredav-Sabre.patch diff --git a/php-sabredav-Sabre.patch b/php-sabredav-Sabre.patch new file mode 100644 index 0000000..6405897 --- /dev/null +++ b/php-sabredav-Sabre.patch @@ -0,0 +1,36 @@ +--- Sabre/autoload.php 2010-04-28 15:05:53.000000000 +0200 ++++ Sabre/autoload.php 2013-05-07 13:32:38.808004076 +0200 +@@ -15,9 +15,9 @@ + + function Sabre_autoload($className) { + +- if(strpos($className,'Sabre_')===0) { ++ if(strpos($className,'Sabre\\')===0) { + +- include dirname(__FILE__) . '/' . str_replace('_','/',substr($className,6)) . '.php'; ++ include dirname(__FILE__) . '/' . str_replace('\\','/',substr($className,6)) . '.php'; + + } + +--- php-sabredav-Sabre.xml 2010-04-28 15:05:53.000000000 +0200 ++++ php-sabredav-Sabre.xml 2013-05-07 13:35:58.000000000 +0200 +@@ -15,8 +15,8 @@ + 2010-04-28 + + +- 1.0.0 +- 1.0.0 ++ 1.0.1 ++ 1.0.1 + + + stable +@@ -28,7 +28,7 @@ + + + +- ++ + + + diff --git a/php-sabredav-Sabre.spec b/php-sabredav-Sabre.spec index d73c0d6..a142dc8 100644 --- a/php-sabredav-Sabre.spec +++ b/php-sabredav-Sabre.spec @@ -1,16 +1,22 @@ %{!?__pear: %{expand: %%global __pear %{_bindir}/pear}} -%global pear_name %(echo %{name} | sed -e 's/^php-sabredav-//' -e 's/-/_/g') +%global pear_name Sabre %global channelname pear.sabredav.org +%global origver 1.0.0 Name: php-sabredav-Sabre -Version: 1.0.0 -Release: 6%{?dist} +Version: 1.0.1 +Release: 1%{?dist} Summary: Base for Sabre_DAV packages Group: Development/Libraries License: BSD URL: http://code.google.com/p/sabredav -Source0: http://pear.sabredav.org/get/%{pear_name}-%{version}.tgz +Source0: http://pear.sabredav.org/get/%{pear_name}-%{origver}.tgz + +# https://github.com/fruux/sabre-dav/issues/336 +# Please update PEAR channel +# Fix autoload to use namespace and force version +Patch0: %{name}.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -18,7 +24,6 @@ BuildRequires: php-pear(PEAR) BuildRequires: php-channel(%{channelname}) Requires: php-pear(PEAR) -Requires: php-common >= 5.1 Requires: php-pdo Requires: php-xml Requires: php-mbstring @@ -35,27 +40,32 @@ The Base SabreDAV package provides some functionality used by all packages. %prep %setup -q -c -[ -f package2.xml ] || mv package.xml package2.xml -mv package2.xml %{pear_name}-%{version}/%{pear_name}.xml +cd %{pear_name}-%{origver} +mv ../package.xml %{name}.xml + +# Fix autoload to use namespace and force version +%patch0 -p0 + %build # Empty build section, most likely nothing required. + %install -cd %{pear_name}-%{version} -%{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{pear_name}.xml +cd %{pear_name}-%{origver} +%{__pear} install --nodeps --packagingroot %{buildroot} %{name}.xml # Clean up unnecessary files -rm -rf $RPM_BUILD_ROOT%{pear_metadir}/.??* +rm -rf %{buildroot}%{pear_metadir}/.??* # Install XML package description -mkdir -p $RPM_BUILD_ROOT%{pear_xmldir} -install -pm 644 %{pear_name}.xml $RPM_BUILD_ROOT%{pear_xmldir} +mkdir -p %{buildroot}%{pear_xmldir} +install -pm 644 %{name}.xml %{buildroot}%{pear_xmldir} %post %{__pear} install --nodeps --soft --force --register-only \ - %{pear_xmldir}/%{pear_name}.xml >/dev/null || : + %{pear_xmldir}/%{name}.xml >/dev/null || : %postun if [ $1 -eq 0 ] ; then @@ -67,11 +77,15 @@ fi %files %defattr(-,root,root,-) %doc %{pear_docdir}/%{pear_name} -%{pear_xmldir}/%{pear_name}.xml +%{pear_xmldir}/%{name}.xml %{pear_phpdir}/%{pear_name} %changelog +* Tue May 7 2013 Remi Collet 1.8.5-1 +- update to 1.0.1 (use namespace) + use our own package.xml as upstream doesn't use pear anymore + * Mon Nov 12 2012 Remi Collet 1.3-3 - backport for remi repo -- cgit