[php-sabredav-Sabre_DAV] Update to 1.7.8

Joseph Marrero jmarrero at fedoraproject.org
Tue Sep 3 23:14:47 UTC 2013


commit fd965c6f0277619d8df8898f1a3ff4618cef2bb5
Author: Joseph Marrero <jmarrero at fedoraproject.org>
Date:   Tue Sep 3 19:14:16 2013 -0400

    Update to 1.7.8

 .gitignore                      |    1 +
 php-sabredav-Sabre_DAV.spec     |   85 ++++++++++++++++++++++++---------------
 sabreDav_BrowserPluginFix.patch |   23 ----------
 sources                         |    2 +-
 4 files changed, 54 insertions(+), 57 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index c0043ed..58ce896 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 /Sabre_DAV-1.6.5.tgz
+/SabreDAV-1.7.8.zip
diff --git a/php-sabredav-Sabre_DAV.spec b/php-sabredav-Sabre_DAV.spec
index 5a336c1..6dfd22d 100644
--- a/php-sabredav-Sabre_DAV.spec
+++ b/php-sabredav-Sabre_DAV.spec
@@ -1,17 +1,23 @@
 %{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
-%global pear_name %(echo %{name} | sed -e 's/^php-sabredav-//' -e 's/-/_/g')
+%global pear_name   Sabre_DAV
 %global channelname pear.sabredav.org
+%global mainver     1.7.8
+%global reldate     2013-06-17
 
 Name:           php-sabredav-Sabre_DAV
-Version:        1.6.5
-Release:        6%{?dist}
+Version:        1.7.8
+Release:        1%{?dist}
 Summary:        Sabre_DAV is a WebDAV framework for PHP
 
+Group:          Development/Libraries
 License:        BSD
 URL:            http://code.google.com/p/sabredav
-Source0:        http://pear.sabredav.org/get/%{pear_name}-%{version}.tgz
-Patch1:         sabreDav_BrowserPluginFix.patch 
+# https://github.com/fruux/sabre-dav/issues/336
+# Please update PEAR channel
+Source0:        http://sabredav.googlecode.com/files/SabreDAV-%{mainver}.zip
+Source1:        %{name}.xml
 
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch:      noarch
 BuildRequires:  php-pear(PEAR)
 BuildRequires:  php-channel(%{channelname})
@@ -25,8 +31,8 @@ Requires:       php-channel(%{channelname})
 Requires:       php-xml
 Requires:       php-mbstring
 Requires:       php-pdo
-Requires:       php-pear(%{channelname}/Sabre)
-Requires:       php-pear(%{channelname}/Sabre_HTTP)
+Requires:       php-pear(%{channelname}/Sabre)      >= 1.0.0
+Requires:       php-pear(%{channelname}/Sabre_HTTP) >= 1.7.3
 
 Provides:       php-pear(%{pear_name}) = %{version}
 Provides:       php-pear(%{channelname}/%{pear_name}) = %{version}
@@ -37,34 +43,52 @@ is meant to cover the entire standard.
 
 
 %prep
-%setup -q -c
-%patch1 -p0
-sed -e '/Plugin.php/s/md5sum.*name/name/' \
-  package.xml > %{pear_name}-%{version}/%{pear_name}.xml
+%setup -q -n SabreDAV
+
+sed -e 's/@VERSION@/%{version}/' \
+    -e 's/@RELDATE@/%{reldate}/' \
+    %{SOURCE1} >%{name}.xml
+mv lib/Sabre Sabre
+
+# Check version
+extver=$(sed -n "/VERSION/{s/.* '//;s/'.*$//;p}" Sabre/DAV/Version.php)
+if test "x${extver}" != "x%{version}"; then
+   : Error: Upstream version is ${extver}, expecting %{version}.
+   exit 1
+fi
+
+# Check files
+touch error.lst
+for fic in $(find Sabre/DAV -type f)
+do
+  grep $fic %{name}.xml || echo $fic >> error.lst
+done
+
+if [ -s error.lst ]; then
+  : Missing in %{name}.xml
+  cat error.lst
+  exit 1
+fi
+
 
 %build
 # Empty build section, most likely nothing required.
 
 
 %install
-cd %{pear_name}-%{version}
-%{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{pear_name}.xml
+%{__pear} install --nodeps --packagingroot %{buildroot} %{name}.xml
 
 # Clean up unnecessary files
-%if 0%{?rhel}
-rm -rf $RPM_BUILD_ROOT%{pear_phpdir}/.??*
-%else
-rm -rf $RPM_BUILD_ROOT%{pear_metadir}/.??*
-%endif
+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
@@ -74,25 +98,20 @@ fi
 
 
 %files
+%defattr(-,root,root,-)
 %doc %doc %{pear_docdir}/%{pear_name}
-%{pear_xmldir}/%{pear_name}.xml
+%{pear_xmldir}/%{name}.xml
 %{pear_phpdir}/Sabre/DAV
 
 
 %changelog
-* Sun Aug 04 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.6.5-6
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
-
-* Wed May 01 2013 Joseph Marrero <jmarrero at fedoraproject.org> - 1.6.5-5
-- Fix problem with checksum whitout braking the files installed 
+* Tue Sep 03 2013 Joseph Marrero <jmarrero at fedoraproject.org> - 1.7.8-1
+- Update to 1.7.8 Uptream version
+- Add own pear configuration provided by Remi Collet from RH
 * Sun Apr 28 2013 Joseph Marrero <jmarrero at fedoraproject.org> - 1.6.5-4
 - added security patch that fixes bugs 951568 951569 951562
-- added --ignore-erros flag to pear install macro to accept the patch
-* Sat Mar 02 2013 Joseph Marrero <jmarrero at fedoraproject.org> - 1.6.5-3
-- Fix cleanup in rhel6 and f19
-* Thu Feb 14 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.6.5-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
-
+- added --ignore-errors flag to pear install macro to accept the patch
+- patches provided by Remi Collet
 * Wed Oct 31 2012 Joseph Marrero <jmarrero at fedoraproject.org> - 1.6.5-1
 - updated to 1.6.5
 - Added the required deps pointed by phpci
diff --git a/sources b/sources
index 5c3a594..ab132b8 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-10c323ea4c776b053f9f5dbeff352089  Sabre_DAV-1.6.5.tgz
+06c330ffe79d8cfbcb3fc44d6ac35cd8  SabreDAV-1.7.8.zip


More information about the scm-commits mailing list