summaryrefslogtreecommitdiffstats
path: root/php-sabredav-Sabre_CalDAV.spec
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2013-05-07 14:35:40 +0200
committerRemi Collet <fedora@famillecollet.com>2013-05-07 14:35:40 +0200
commit8cea226acc05ec0eee2e8b318aa4c128d688fb18 (patch)
treedd33253c0c5db2b81ee1a25379cb2c6be3f57515 /php-sabredav-Sabre_CalDAV.spec
parentc82b88df913d0fe961d46030c419dc554bab09c9 (diff)
php-sabredav-Sabre_CalDAV: 1.8.3 (upstream PEAR not maintained)
Diffstat (limited to 'php-sabredav-Sabre_CalDAV.spec')
-rw-r--r--php-sabredav-Sabre_CalDAV.spec65
1 files changed, 47 insertions, 18 deletions
diff --git a/php-sabredav-Sabre_CalDAV.spec b/php-sabredav-Sabre_CalDAV.spec
index af8e5db..5dfef6d 100644
--- a/php-sabredav-Sabre_CalDAV.spec
+++ b/php-sabredav-Sabre_CalDAV.spec
@@ -1,16 +1,20 @@
%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
-%global pear_name %(echo %{name} | sed -e 's/^php-sabredav-//' -e 's/-/_/g')
+%global pear_name Sabre_CalDAV
%global channelname pear.sabredav.org
+%global mainver 1.8.5
Name: php-sabredav-Sabre_CalDAV
-Version: 1.6.4
-Release: 3%{?dist}
+Version: 1.8.3
+Release: 1%{?dist}
Summary: Provides RFC4791 (CalDAV) support to Sabre_DAV
Group: Development/Libraries
License: BSD
URL: http://code.google.com/p/sabredav
-Source0: http://pear.sabredav.org/get/%{pear_name}-%{version}.tgz
+# 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
@@ -24,10 +28,10 @@ Requires: php-pdo
Requires: php-xml
Requires: php-pear(PEAR)
Requires: php-channel(%{channelname})
-Requires: php-pear(%{channelname}/Sabre)
-Requires: php-pear(%{channelname}/Sabre_DAV)
-Requires: php-pear(%{channelname}/Sabre_DAVACL)
-Requires: php-pear(%{channelname}/Sabre_VObject)
+Requires: php-pear(%{channelname}/Sabre) >= 1.0.1
+Requires: php-pear(%{channelname}/Sabre_DAV) >= 1.8.5
+Requires: php-pear(%{channelname}/Sabre_DAVACL) >= 1.8.4
+Requires: php-pear(%{channelname}/Sabre_VObject) >= 2.0.7
Provides: php-pear(%{pear_name}) = %{version}
Provides: php-pear(%{channelname}/%{pear_name}) = %{version}
@@ -36,29 +40,50 @@ Provides: php-pear(%{channelname}/%{pear_name}) = %{version}
CalDAV plugin for Sabre, Adds support for CalDAV in Sabre_DAV.
%prep
-%setup -q -c
-[ -f package2.xml ] || mv package.xml package2.xml
-mv package2.xml %{pear_name}-%{version}/%{pear_name}.xml
+%setup -q -n SabreDAV
+
+cp %{SOURCE1} .
+mv lib/Sabre Sabre
+
+# Check version
+extver=$(sed -n "/VERSION/{s/.* '//;s/'.*$//;p}" Sabre/CalDAV/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/CalDAV -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
-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
@@ -70,11 +95,15 @@ fi
%files
%defattr(-,root,root,-)
%doc %{pear_docdir}/%{pear_name}
-%{pear_xmldir}/%{pear_name}.xml
+%{pear_xmldir}/%{name}.xml
%{pear_phpdir}/Sabre/CalDAV
%changelog
+* Tue May 7 2013 Remi Collet <RPMS@FamilleCollet.com> 1.8.3-1
+- update to 1.8.3
+ use our own package.xml as upstream doesn't use pear anymore
+
* Mon Nov 12 2012 Remi Collet <RPMS@FamilleCollet.com> 1.6.4-3
- backport for remi repo