3 %define _pearname %{_class}
4 Summary: %{_pearname} - Generic tree management
5 Summary(pl.UTF-8): %{_pearname} - Podstawowe zarządzanie drzewami
6 Name: php-pear-%{_pearname}
10 Group: Development/Languages/PHP
11 Source0: http://pear.php.net/get/%{_pearname}-%{version}.tgz
12 # Source0-md5: bddfbe4ba03da2904ea8f20d4ab22b08
13 URL: http://pear.php.net/package/Tree/
14 BuildRequires: php-pear-PEAR >= 1:1.4.0-0.b1
15 BuildRequires: rpm-php-pearprov >= 4.4.2-11
16 BuildRequires: rpmbuild(macros) >= 1.300
18 Requires: php-pear-DB >= 1.3
19 Requires: php-pear-PEAR-core >= 1:1.5.4
20 Requires: php-pear-XML_Parser >= 1.0
22 Suggests: php-pear-XML_Parser
23 Obsoletes: php-pear-Tree-tests
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 # exclude optional dependencies
28 %define _noautoreq 'pear(DB.*)' 'pear(XML/Parser.*)'
31 Provides methods to read and manipulate trees, which are stored in the
32 DB or an XML file. The trees can be stored in the DB either as nested
33 trees or as simple trees ('brain dead method'), which use
34 parentId-like structure. Currently XML data can only be read from a
35 file and accessed. The package offers a big number of methods to
36 access and manipulate trees. For example methods like: getRoot,
37 getChild[ren], getParent, getPath and many more. There are two ways of
38 retrieving the data from the place where they are stored, one is by
39 reading the entire tree into the memory - the Memory way. The other is
40 reading the tree nodes as needed (very useful in combination with huge
41 trees and the nested set model). The package is designed that way that
42 it is possible to convert/copy tree data from either structure to
43 another (from XML into DB).
45 In PEAR status of this package is: %{_status}.
47 %description -l pl.UTF-8
48 Ten pakiet udostępnia metody do odczytu i obróbki drzew zapisanych w
49 bazach danych lub plikach XML. Drzewa mogą być zapisane w bazie jako
50 zagnieżdżone drzewa lub proste drzewa (metoda prymitywna), które
51 używają struktury w stylu parentId. Aktualnie dane XML mogą być tylko
52 czytane tylko z pliku i przeglądane. Pakiet oferuje dużą liczbę metod
53 do dostępu i obróbki drzew, na przykład getRoot, getChild[ren],
54 getParent, getPath i wiele innych. Są dwa sposoby na odczytywanie
55 danych z miejsca gdzie są zapisane - jeden przez wczytanie całego
56 drzewa do pamięci (metoda pamięciowa), drugi przez czytanie węzłów w
57 miarę potrzeby (bardzo przydatny w przypadku dużych drzew i modelu
58 zagnieżdżonego). Pakiet jest stworzony tak, by umożliwić konwersję i
59 kopiowanie danych z drzewa z jednej struktury do drugiej (z XML-a do
62 Ta klasa ma w PEAR status: %{_status}.
67 # pear/tests/pearname/tests -> pear/tests/pearname
68 mv ./%{php_pear_dir}/tests/%{_pearname}/{tests/*,}
69 rmdir ./%{php_pear_dir}/tests/%{_pearname}/tests
72 rm -rf $RPM_BUILD_ROOT
73 install -d $RPM_BUILD_ROOT%{php_pear_dir}
77 rm -rf $RPM_BUILD_ROOT
80 if [ -f %{_docdir}/%{name}-%{version}/optional-packages.txt ]; then
81 cat %{_docdir}/%{name}-%{version}/optional-packages.txt
85 %defattr(644,root,root,755)
86 %doc install.log optional-packages.txt
87 %doc docs/%{_pearname}/docs/*
88 %dir %{php_pear_dir}/%{_class}
89 %dir %{php_pear_dir}/%{_class}/Dynamic
90 %dir %{php_pear_dir}/%{_class}/Memory
91 %{php_pear_dir}/.registry/*.reg
92 %{php_pear_dir}/%{_class}/*.php
93 %{php_pear_dir}/%{_class}/Dynamic/*.php
94 %{php_pear_dir}/%{_class}/Memory/*.php