%define upstream_name HTML_BBCodeParser %define xmldir %{_var}/lib/pear %define peardir %(pear config-get php_dir 2> /dev/null) Name: php-pear-%{upstream_name} Version: 1.2.3 Release: %mkrel 2 Summary: This is a parser to replace UBB style tags with their html equivalents License: PHP License Group: Development/PHP Source0: http://pear.php.net/get/HTML_BBCodeParser-%{version}.tgz URL: http://pear.php.net/package/HTML_BBCodeParser BuildRequires: php-pear >= 1.4.7 Requires: php-pear >= 1.5.4 BuildArch: noarch %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. %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 # Install XML package description mkdir -p %{buildroot}%{xmldir} tar -xzf %{SOURCE0} package.xml cp -p package.xml %{buildroot}%{xmldir}/HTML_BBCodeParser.xml %clean rm -rf %{buildroot} %post pear install --nodeps --soft --force --register-only %{xmldir}/HTML_BBCodeParser.xml %postun if [ "$1" -eq "0" ]; then pear uninstall --nodeps --ignore-errors --register-only pear.php.net/HTML_BBCodeParser fi %files %defattr(-,root,root) %{peardir}/* %{xmldir}/HTML_BBCodeParser.xml %changelog * Sun Jan 13 2013 umeabot <umeabot> 1.2.3-2.mga3 + Revision: 376197 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Mon Mar 05 2012 spuhler <spuhler> 1.2.3-1.mga2 + Revision: 218439 - upgrade to 1.2.3 pearized spec * Sat Feb 05 2011 spuhler <spuhler> 1.2.2-6.mga1 + Revision: 47175 - removed buildroot definition from .spec removed the if mdkversion lines - imported package php-pear-HTML_BBCodeParser