php-pear-HTTP/php-pear-HTTP.spec

147 lines
4.2 KiB
RPMSpec

%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
%global pear_name HTTP
Summary: Miscellaneous HTTP utilities
Summary(fr): Divers utilitaires HTTP
Name: php-pear-HTTP
Version: 1.4.1
Release: 5%{?dist}
License: PHP
Group: Development/Libraries
URL: http://pear.php.net/package/HTTP
Source: http://pear.php.net/get/HTTP-%{version}.tgz
Source2: xml2changelog
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: php-pear(PEAR) >= 1.7.1
Requires(post): %{__pear}
Requires(postun): %{__pear}
Requires: php-pear(PEAR) >= 1.7.1
Provides: php-pear(%{pear_name}) = %{version}
%description
The HTTP class is a class with static methods for doing
miscellaneous HTTP related stuff like date formatting,
language negotiation or HTTP redirection.
%description -l fr
La classe HTTP contient des méthodes statiques pour
réaliser diverses tâches concernant HTTP, comme la mise
en forme des dates, la négociation de la langue ou les
redirections HTTP.
%prep
%setup -c -q
# package.xml is V2
%{_bindir}/php -n %{SOURCE2} package.xml >CHANGELOG
mv package.xml %{pear_name}-%{version}/%{name}.xml
%build
# Empty build section
%install
rm -rf %{buildroot}
cd %{pear_name}-%{version}
%{__pear} install --nodeps --packagingroot %{buildroot} %{name}.xml
# Clean up unnecessary files
rm -rf %{buildroot}%{pear_phpdir}/.??*
# Install XML package description
%{__mkdir_p} %{buildroot}%{pear_xmldir}
%{__install} -pm 644 %{name}.xml %{buildroot}%{pear_xmldir}
%check
# Sanity check
lst=$(find %{buildroot}%{pear_phpdir} -exec grep -q %{buildroot} {} \; -print)
[ ! -z "$lst" ] && echo "Reference to BUILDROOT in $lst" && exit 1;
# Test suite - must be run as root after installation
# pear run-tests -p HTTP
# Should return : 10 PASSED TESTS
%clean
rm -rf %{buildroot}
%post
%{__pear} install --nodeps --soft --force --register-only %{pear_xmldir}/%{name}.xml >/dev/null || :
%postun
# if refcount = 0 then package has been removed (not upgraded)
if [ "$1" -eq "0" ]; then
%{__pear} uninstall --nodeps --ignore-errors --register-only %{pear_name} >/dev/null || :
fi
%files
%defattr(-,root,root,-)
%doc CHANGELOG
%{pear_phpdir}/HTTP.php
%{pear_xmldir}/%{name}.xml
%{pear_testdir}/HTTP
%changelog
* Sat May 22 2010 Remi Collet <Fedora@FamilleCollet.com> 1.4.1-5
- spec cleanup
- rename HTTP.xml to php-pear-HTTP.xml
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Sat Sep 13 2008 Remi Collet <Fedora@FamilleCollet.com> 1.4.1-2
- Fix BR for PEAR >= 1.7.1
* Mon Sep 1 2008 Remi Collet <Fedora@FamilleCollet.com> 1.4.1-1
- update to 1.4.1
- add tests
* Wed Aug 22 2007 Remi Collet <Fedora@FamilleCollet.com> 1.4.0-8
- remove PEAR from sumnary
- SPEC Cleanups - Fix License
- convert package.xml to package2.xml
* Thu Sep 07 2006 Remi Collet <Fedora@FamilleCollet.com> 1.4.0-7
- last template.spec
* Mon Sep 04 2006 Remi Collet <Fedora@FamilleCollet.com> 1.4.0-6
- new and simpler %%prep and %%install
* Mon Aug 28 2006 Remi Collet <Fedora@FamilleCollet.com> 1.4.0-5
- FE6 rebuild
* Sat May 20 2006 Remi Collet <Fedora@FamilleCollet.com> 1.4.0-4
- install Licence in prep
- use new macros from /etc/rpm/macros.pear
* Sat May 20 2006 Remi Collet <Fedora@FamilleCollet.com> 1.4.0-3
- Require pear >= 1.4.9
- bundle the v3.01 PHP LICENSE file
- use --packagingroot (instead of -R)
- check from install to check (as in php-pear)
* Sat May 06 2006 Remi Collet <Fedora@FamilleCollet.com> 1.4.0-2
- use %%{_datadir}/pear/.pkgxml for XML (Bug #190252)
* Fri Apr 28 2006 Remi Collet <Fedora@FamilleCollet.com> 1.4.0-1
- spec for extras
- add french summary & description
* Thu Apr 06 2006 Remi Collet <rpms@FamilleCollet.com> 1.4.0-2.fc{3,4,5}.remi
- change /var/lib/pear to %%{_libdir}/php/pear for XML (as in extras for FC5)
- spec cleanning
* Sat Jan 7 2006 Remi Collet <remi.collet@univ-reims.fr> 1.4.0-1.fc{3,4}.remi
- initial RPM