Search
j0ke.net Open Build Service
>
Projects
>
server:php:applications
>
php5-pear-cache_lite
> Changes
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
Changes of Revision 2
[-]
[+]
Added
php5-pear-cache_lite.spec
@@ -0,0 +1,90 @@ +#norootforbuild + +# +# spec file for package Cache_Lite (Version 1.7.2) +# +# Copyright (c) 2007 SuSE Linux AG, Nuernberg, Germany. +# This file and all modifications and additions to the pristine +# package are under the same license as the package itself. +# +# Please submit bug fixes or comments via http://bugs.opensuse.org/ +# + +%define peardir %(pear config-get php_dir 2> /dev/null) +%define xmldir /var/lib/pear + +Summary: Fast and Safe little cache system +Name: php5-pear-cache_lite +Version: 1.7.2 +Release: 1 +License: lgpl +Group: Development/Libraries/Other +Source0: http://pear.php.net/get/Cache_Lite-%{version}.tgz +BuildRoot: %{_tmppath}/%{name}-%{version}-build +URL: http://pear.php.net/package/Cache_Lite +BuildRequires: php5-pear +PreReq: php5-pear +BuildArch: noarch + +%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). + + + +%prep + +%setup -c -T + +pear -v -c pearrc \ + -d php_dir=%{peardir} \ + -d doc_dir=/docs \ + -d bin_dir=%{_bindir} \ + -d data_dir=%{peardir}/data \ + -d test_dir=%{peardir}/tests \ + -d ext_dir=%{_libdir} \ + -s + +%build + +%install + +pear -c pearrc install --nodeps --packagingroot %{buildroot} %{SOURCE0} + +# Clean up unnecessary files +rm pearrc +rm %{buildroot}/%{peardir}/.filemap +rm %{buildroot}/%{peardir}/.lock +rm -rf %{buildroot}/%{peardir}/.registry +rm -rf %{buildroot}%{peardir}/.channels +rm %{buildroot}%{peardir}/.depdb +rm %{buildroot}%{peardir}/.depdblock + +mv %{buildroot}/docs . + + +# Install XML package description +mkdir -p %{buildroot}%{xmldir} +tar -xzf %{SOURCE0} package.xml +cp -p package.xml %{buildroot}%{xmldir}/Cache_Lite.xml + +%clean + +rm -rf %{buildroot} + +%post + +pear install --nodeps --soft --force --register-only %{xmldir}/Cache_Lite.xml + +%postun + +if [ "$1" -eq "0" ]; then + pear uninstall --nodeps --ignore-errors --register-only pear.php.net/Cache_Lite +fi + +%files + +%defattr(-,root,root) +%doc docs/Cache_Lite/* +%{peardir}/* +%{xmldir}/Cache_Lite.xml