summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-sabredav-Sabre.patch36
-rw-r--r--php-sabredav-Sabre.spec42
2 files changed, 64 insertions, 14 deletions
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 @@
+ <date>2010-04-28</date>
+ <time>15:05:53</time>
+ <version>
+- <release>1.0.0</release>
+- <api>1.0.0</api>
++ <release>1.0.1</release>
++ <api>1.0.1</api>
+ </version>
+ <stability>
+ <release>stable</release>
+@@ -28,7 +28,7 @@
+ </notes>
+ <contents>
+ <dir name="/">
+- <file md5sum="0bbb0bd9fec4fd55382d1e75ae6e396e" name="Sabre/autoload.php" role="php" />
++ <file name="Sabre/autoload.php" role="php" />
+ <file md5sum="fe15d5f0e285d1f105071b8e7ea97ae1" name="LICENSE" role="doc" />
+ </dir>
+ </contents>
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 <RPMS@FamilleCollet.com> 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 <RPMS@FamilleCollet.com> 1.3-3
- backport for remi repo