%include /usr/lib/rpm/macros.php %define _class HTML %define _subclass BBCodeParser %define _status stable %define _pearname %{_class}_%{_subclass} Summary: %{_pearname} - parser to replace UBB style tags with their HTML equivalents Summary(pl): %{_pearname} - parser zastępujący tagi typu UBB ich odpowiednikami HTML Name: php-pear-%{_pearname} Version: 1.1 Release: 1 License: PHP 2.02 Group: Development/Languages/PHP Source0: http://pear.php.net/get/%{_pearname}-%{version}.tgz # Source0-md5: 0baca616b569dff6966ff6422b5ecdc4 URL: http://pear.php.net/package/HTML_BBCodeParser/ BuildRequires: rpm-php-pearprov >= 4.0.2-98 Requires: php-pear BuildArch: noarch BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description This is a parser to replace UBB style tags with their HTML equivalents. It does not simply do some regex calls, but is complete stack based parse engine. This ensures that all tags are properly nested, if not, extra tags are added to maintain the nesting. This parser should only produce XHTML 1.0 compliant code. All tags are validated and so are all their attributes. It should be easy to extend this parser with your own tags. This class has in PEAR status: %{_status}. %description -l pl Jest to parser zastępujący tagi typu UBB ich odpowiednikami HTML. Nie jest to jednak to tylko wywołanie kilku wyrażeń regularnych, ale kompletny silnik parsujący. Dzięki temu pewne jest, iż wszystkie tagi będą poprawnie zagnieżdzone, a jeśli nie, dodatkowy tag zostanie dodany w celu zachowania zagnieżdzenia. Ten parser powinien wyprodukować kod zgodny z XHTML 1.0. Wszystkie tagi oraz ich atrybuty sprawdzane są pod kątem poprawności. Możliwe jest rozszerzenie parsera o własne tagi. Ta klasa ma w PEAR status: %{_status}. %prep %setup -q -c %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT%{php_pear_dir}/%{_class}/%{_subclass}/Filter install %{_pearname}-%{version}/*.php $RPM_BUILD_ROOT%{php_pear_dir}/%{_class} install %{_pearname}-%{version}/%{_subclass}/Filter/*.php $RPM_BUILD_ROOT%{php_pear_dir}/%{_class}/%{_subclass}/Filter %clean rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) %doc %{_pearname}-%{version}/%{_subclass}/example %dir %{php_pear_dir}/%{_class}/%{_subclass} %{php_pear_dir}/%{_class}/*.php %{php_pear_dir}/%{_class}/%{_subclass}