summaryrefslogtreecommitdiffstats
path: root/php-sabredav-Sabre_HTTP.spec
blob: 2b4b8c16413431f1b3f703ee6ba74e2fa54d33fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
%global pear_name %(echo %{name} | sed -e 's/^php-sabredav-//' -e 's/-/_/g')
%global channelname pear.sabredav.org

Name:           php-sabredav-Sabre_HTTP
Version:        1.6.4
Release:        3%{?dist}
Summary:        HTTP component for the SabreDAV WebDAV framework for PHP

License:        BSD
URL:            http://code.google.com/p/sabredav
Source0:        http://pear.sabredav.org/get/%{pear_name}-%{version}.tgz

BuildArch:      noarch
BuildRequires:  php-pear(PEAR)
BuildRequires:  php-channel(%{channelname})

Requires(post): %{__pear}
Requires(postun): %{__pear}
Requires:       php-common >= 4
Requires:       php-pear(PEAR)
Requires:       php-channel(%{channelname})
Requires:       php-pear(%{channelname}/Sabre)

Provides:       php-pear(%{pear_name}) = %{version}
Provides:       php-pear(%{channelname}/%{pear_name}) = %{version}

%description
Sabre_HTTP allows for a central interface to deal with Sabre.

%prep
%setup -q -c
[ -f package2.xml ] || mv package.xml package2.xml
mv package2.xml %{pear_name}-%{version}/%{pear_name}.xml


%build
# Empty build section, most likely nothing required.

%install
cd %{pear_name}-%{version}

%{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{pear_name}.xml


# Clean up unnecessary files
rm -rf $RPM_BUILD_ROOT%{pear_phpdir}/.??*


# Install XML package description
mkdir -p $RPM_BUILD_ROOT%{pear_xmldir}
install -pm 644 %{pear_name}.xml $RPM_BUILD_ROOT%{pear_xmldir}


%post
%{__pear} install --nodeps --soft --force --register-only \
    %{pear_xmldir}/%{pear_name}.xml >/dev/null || :

%postun
if [ $1 -eq 0 ] ; then
    %{__pear} uninstall --nodeps --ignore-errors --register-only \
        %{pear_name} >/dev/null || :
fi


%files
%doc %{pear_docdir}/%{pear_name}
%{pear_xmldir}/%{pear_name}.xml
%{pear_phpdir}/Sabre/HTTP


%changelog
* Wed Oct 31 2012 Joseph Marrero <jmarrero@fedoraproject.org> - 1.6.4-3
- specified php required version pointed out by phpci
* Sun Oct 12 2012 Joseph Marrero <jmarrero@fedoraproject.org> - 1.6.4-2
- Fixed Description
* Sun Oct 12 2012 Joseph Marrero <jmarrero@fedoraproject.org> - 1.6.4-1
- Version Bump to 1.6.4
- Add necesary deps and Clean up
- Fix documentation path
- remove not needed steps 
- Fixed Description
* Fri Apr 06 2012 Felix Kaechele <heffer@fedoraproject.org> - 1.6.0-1
- initial package