Sophie

Sophie

distrib > Fedora > 13 > i386 > media > updates-src > by-pkgid > 76798b295a3dbbce3a5b911ba7e0d947 > files > 2

php-pear-HTTP-OAuth-0.1.17-1.fc13.src.rpm

%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
%global pear_name HTTP_OAuth

Name:           php-pear-HTTP-OAuth
Version:        0.1.17
Release:        1%{?dist}
Summary:        Implementation of the OAuth spec

Group:          Development/Libraries
License:        BSD
URL:            http://pear.php.net/package/HTTP_OAuth
Source0:        http://pear.php.net/get/%{pear_name}-%{version}.tgz
Source2:        xml2changelog

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:      noarch

BuildRequires:  php-pear >= 1:1.4.9-1.2
Requires(post): %{__pear}
Requires(postun): %{__pear}
Provides:       php-pear(%{pear_name}) = %{version}
Requires:       php-pear(HTTP_Request2) >= 0.5.1
Requires:       php-pear(PEAR)

# Optional Dependencies
Requires:       php-pear(Log) >= 1.11.0
# not yet available in Fedora Requires: php-pecl(pecl_http) >= 1.6.0


%description
Allows the use of the consumer and provider angles of the OAuth spec.

%prep
%setup -q -c
# Package is V2
%{_bindir}/php -n %{SOURCE2} package.xml >CHANGELOG
mv package.xml %{pear_name}-%{version}/%{name}.xml
cd %{pear_name}-%{version}


%build
cd %{pear_name}-%{version}
# Empty build section, most likely nothing required.


%install
cd %{pear_name}-%{version}
rm -rf $RPM_BUILD_ROOT docdir
%{__pear} install --nodeps --packagingroot $RPM_BUILD_ROOT %{name}.xml

# Move documentation
mkdir -p docdir
mv $RPM_BUILD_ROOT%{pear_docdir}/* docdir
# fix rpmlint warnings
sed -i -e 's/\r//' docdir/%{pear_name}/examples/jquery.fade.js

# 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 %{name}.xml $RPM_BUILD_ROOT%{pear_xmldir}


%clean
rm -rf $RPM_BUILD_ROOT


%check
# For documentation only - to run after installation
# cd /usr/share/pear/test/HTTP_OAuth/tests
# phpunit AllTests.php
# With PHPUnit 3.4.14 + HTTP_OAuth 0.1.17
# OK (69 tests, 176 assertions)


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

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


%files
%defattr(-,root,root,-)
%doc CHANGELOG
%doc %{pear_name}-%{version}/docdir/%{pear_name}/*
%{pear_xmldir}/%{name}.xml
%{pear_phpdir}/HTTP/OAuth.php
%{pear_phpdir}/HTTP/OAuth
%{pear_testdir}/HTTP_OAuth
# only an empty unused file 
%exclude %{pear_datadir}/HTTP_OAuth/README
# file not used (packaging error in 0.1.10)
%exclude %{pear_phpdir}/generatePackage.php
%exclude %{pear_phpdir}/runTests.php


%changelog
* Thu Jul 01 2010 Remi Collet <Fedora@FamilleCollet.com> 0.1.17-1
- Version 0.1.17 (alpha) - API 0.1.1 (alpha)

* Fri Jun 25 2010 Remi Collet <Fedora@FamilleCollet.com> 0.1.16-1
- Version 0.1.16 (alpha) - API 0.1.1 (alpha)

* Thu Jun 24 2010 Remi Collet <Fedora@FamilleCollet.com> 0.1.15-1
- Version 0.1.15 (alpha) - API 0.1.1 (alpha)

* Thu May 27 2010 Remi Collet <Fedora@FamilleCollet.com> 0.1.14-1
- Version 0.1.14 (alpha) - API 0.1.1 (alpha)

* Thu Apr 29 2010 Remi Collet <Fedora@FamilleCollet.com> 0.1.10-1
- new version 0.1.10 (alpha) - API 0.1.1 (alpha)
- add generated CHANGELOG
- add doc on howto run tests

* Sun Feb 21 2010 Remi Collet <Fedora@FamilleCollet.com> 0.1.9-1
- new version
- raise HTTP_Request2 to 0.5.1

* Thu Feb 18 2010 Remi Collet <Fedora@FamilleCollet.com> 0.1.8-1
- new version

* Fri Jan 29 2010 Remi Collet <Fedora@FamilleCollet.com> 0.1.7-1
- new version

* Tue Dec 01 2009 Remi Collet <Fedora@FamilleCollet.com> 0.1.6-1
- new version

* Fri Nov 20 2009 Remi Collet <Fedora@FamilleCollet.com> 0.1.5-1
- new version

* Wed Nov 11 2009 Remi Collet <Fedora@FamilleCollet.com> 0.1.4-1
- initial RPM