%define _requires_exceptions pear(PHPUnit/Framework.php) %define upstream_name Tree %define xmldir %{_var}/lib/pear %define peardir %(pear config-get php_dir 2> /dev/null) Name: php-pear-%{upstream_name} Version: 0.3.7 Release: %mkrel 3 Summary: Generic tree management, currently supports databases (via DB, MDB and MDB2) and XML as data sources License: PHP License Group: Development/PHP Source0: http://pear.php.net/get/Tree-%{version}.tgz URL: http://pear.php.net/package/Tree BuildRequires: php-pear >= 1.4.7 Requires: php-pear >= 1.4.0b1 BuildArch: noarch %description Provides methods to read and manipulate trees, which are stored in a database (via DB, MDB and MDB2) or an XML file. The trees can be stored in the DB either as nested trees. Or as simple trees, which use parentId-like structure. Currently XML data can only be read from a file and accessed. The package offers a big number of methods to access and manipulate trees. For example methods like: getRoot, getChild[ren[Ids]], getParent[s[Ids]], getPath[ById] and many more. There are two ways of retreiving the data from the place where they are stored, one is by reading the entire tree into the memory - the Memory way. The other is reading the tree nodes as needed (very useful in combination with huge trees and the nested set model). The package is designed that way that it is possible to convert/copy tree data from either structure to another (from XML into DB). This package has the following drivers: * DB * MDB * MDB2 * Array * XML * FileSystem %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 rm -rf %{buildroot} 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}/Tree.xml %clean rm -rf %{buildroot} %post pear install --nodeps --soft --force --register-only %{xmldir}/Tree.xml %postun if [ "$1" -eq "0" ]; then pear uninstall --nodeps --ignore-errors --register-only pear.php.net/Tree fi %files %defattr(-,root,root) %doc docs/Tree/* %{peardir}/* %{xmldir}/Tree.xml %changelog * Sun Jan 13 2013 umeabot <umeabot> 0.3.7-3.mga3 + Revision: 377384 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Sun Jan 15 2012 spuhler <spuhler> 0.3.7-2.mga2 + Revision: 196228 - added exceptions pear(PHPUnit/Framework.php) * Fri Jan 13 2012 spuhler <spuhler> 0.3.7-1.mga2 + Revision: 195583 - upgrade to 0.3.7 pearized spec * Fri Jan 21 2011 spuhler <spuhler> 0.3.4-4.mga1 + Revision: 28030 - removed buildroot definition from .spec removed the if mdkversion lines - imported package php-pear-Tree