138 lines
3.8 KiB
RPMSpec
138 lines
3.8 KiB
RPMSpec
%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}}
|
|
%global pear_name Cache_Lite
|
|
|
|
Summary: Fast and Safe little cache system for PHP
|
|
Summary(fr): Méthode de cache rapide et sécurisée pour PHP
|
|
Name: php-pear-Cache-Lite
|
|
Version: 1.7.9
|
|
Release: 2%{?dist}
|
|
License: PHP
|
|
Group: Development/Libraries
|
|
Source: http://pear.php.net/get/%{pear_name}-%{version}.tgz
|
|
Source2: xml2changelog
|
|
|
|
URL: http://pear.php.net/package/Cache_Lite
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
BuildArch: noarch
|
|
BuildRequires: php-pear(PEAR) >= 1.5.4
|
|
Requires: php-pear(PEAR) >= 1.5.4
|
|
Requires(post): %{__pear}
|
|
Requires(postun): %{__pear}
|
|
Provides: php-pear(%{pear_name}) = %{version}
|
|
|
|
|
|
%description
|
|
This package is a little cache system optimized for file containers. It is
|
|
fast and safe (because it uses file locking and/or anti-corruption tests).
|
|
|
|
|
|
%description -l fr
|
|
Cette extension fournit une méthode de petit cache optimisé pour les fichiers.
|
|
Elle est rapide et sécurisée (parce qu'elle utilise les verrous de fichiers
|
|
et/ou des tests anti-corruption).
|
|
|
|
|
|
%prep
|
|
%setup -c -q
|
|
%{_bindir}/php -n %{SOURCE2} package.xml | tee CHANGELOG | head -n 10
|
|
|
|
# Create a "localized" php.ini to avoid build warning
|
|
cp /etc/php.ini .
|
|
echo "date.timezone=UTC" >>php.ini
|
|
|
|
cd %{pear_name}-%{version}
|
|
# package.xml is V2
|
|
mv ../package.xml %{name}.xml
|
|
|
|
|
|
%build
|
|
# Empty build section
|
|
|
|
|
|
%install
|
|
rm -rf %{buildroot}
|
|
|
|
cd %{pear_name}-%{version}
|
|
PHPRC=../php.ini %{__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}
|
|
|
|
|
|
%clean
|
|
rm -rf %{buildroot}
|
|
|
|
|
|
%check
|
|
lst=$(find %{buildroot}%{pear_phpdir} -exec grep -q %{buildroot} {} \; -print)
|
|
[ ! -z "$lst" ] && echo "Reference to BUILDROOT in $lst" && exit 1;
|
|
|
|
cd %{pear_name}-%{version}
|
|
PHPRC=../php.ini %{__pear} \
|
|
run-tests \
|
|
-i "-d include_path=%{buildroot}%{pear_phpdir}:%{pear_phpdir}" \
|
|
tests | tee ../tests.log
|
|
grep "FAILED TESTS" ../tests.log && exit 1
|
|
|
|
|
|
%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_docdir}/%{pear_name}
|
|
%{pear_phpdir}/Cache
|
|
%{pear_testdir}/%{pear_name}
|
|
%{pear_xmldir}/%{name}.xml
|
|
|
|
|
|
%changelog
|
|
* Wed Apr 06 2011 Remi Collet <Fedora@FamilleCollet.com> 1.7.9-2
|
|
- doc in /usr/share/doc/pear
|
|
|
|
* Wed Mar 02 2011 Remi Collet <Fedora@FamilleCollet.com> 1.7.9-1
|
|
- Version 1.7.9 (stable) - API 1.7.7 (stable)
|
|
- define timezone during build
|
|
- run test suite during %%check
|
|
|
|
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.8-4
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
|
|
|
* Fri May 08 2010 Remi Collet <Fedora@FamilleCollet.com> 1.7.8-3
|
|
- spec cleanup
|
|
- rename Cache_Lite.xml to php-pear-Cache-Lite.xml
|
|
|
|
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.8-2
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
|
|
|
* Sat Jul 08 2009 Remi Collet <Fedora@FamilleCollet.com> 1.7.8-1
|
|
- update to 1.7.8 (bugfix)
|
|
|
|
* Sun Mar 08 2009 Remi Collet <Fedora@FamilleCollet.com> 1.7.7-1
|
|
- update to 1.7.7 (bugfix)
|
|
|
|
* Thu Jan 29 2009 Remi Collet <Fedora@FamilleCollet.com> 1.7.6-1
|
|
- now Requires php-pear(PEAR) >= 1.5.4
|
|
|
|
* Sat Jan 09 2009 Remi Collet <Fedora@FamilleCollet.com> 1.7.5-1
|
|
- update to 1.7.5
|
|
|
|
* Mon Jun 09 2008 Remi Collet <Fedora@FamilleCollet.com> 1.7.4-1
|
|
- update to 1.7.4
|
|
|
|
* Tue Apr 15 2008 Remi Collet <Fedora@FamilleCollet.com> 1.7.3-1
|
|
- initial RPM
|
|
|