%{!?__pear: %{expand: %%global __pear %{_bindir}/pear}} %global channel htmlpurifier %global php_libname htmlpurifier Name: php-htmlpurifier-htmlpurifier Version: 4.3.0 Release: 3%{?dist} License: LGPLv2+ Summary: Standards-compliant HTML filter library Group: Development/Libraries URL: http://www.htmlpurifier.org Source: http://htmlpurifier.org/releases/%{php_libname}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: php-channel(htmlpurifier) BuildRequires: php-pear(PEAR) Requires: php >= 5.0.5 Requires: php-bcmath Requires: php-tidy Requires: php-pear(PEAR) Requires(post): %{__pear} Requires(postun): %{__pear} Requires: php-channel(%{channel}) Provides: php-pear(%{channel}/%{php_libname}) = %{version} BuildArch: noarch %description Standards-compliant HTML filter library written in PHP. HTML Purifier will not only remove all malicious code (better known as XSS) with a thoroughly audited, secure yet permissive white list, it will also make sure your documents are standards compliant, something only achievable with a comprehensive knowledge of W3C's specifications. %package doc Summary: Documentation for HTML Purifier Group: Documentation %description doc Documentation for php-htmlpurifier %prep %setup -qn %{php_libname}-%{version} rm -rf library/HTMLPurifier/DefinitionCache/Serializer rm -rf benchmarks/.htaccess chmod -x tests/HTMLPurifier/Injector/RemoveSpansWithoutAttributesTest.php %build %install rm -rf %{buildroot} mkdir -p %{buildroot}%{_datadir}/php/%{php_libname} cp -a library/* %{buildroot}%{_datadir}/php/%{php_libname} %clean rm -rf %{buildroot} %post %{__pear} install --nodeps --soft --force --register-only \ %{pear_xmldir}/%{name}.xml >/dev/null || : %postun if [ $1 -eq 0 ] ; then %{__pear} uninstall --nodeps --ignore-errors --register-only \ %{channel}/%{php_libname} >/dev/null || : fi %files %defattr(-,root,root,-) %doc CREDITS FOCUS LICENSE NEWS README TODO VERSION WHATSNEW %{_datadir}/php/%{php_libname} %files doc %defattr(-,root,root,-) %doc CREDITS FOCUS INSTALL INSTALL.fr.utf8 LICENSE NEWS README TODO VERSION WHATSNEW WYSIWYG %doc art benchmarks configdoc docs Doxyfile smoketests tests %changelog * Fri Sep 16 2011 David Nalley 4.3.0-3 - fixed spec name typo * Wed Sep 14 2011 David Nalley 4.3.0-2 - fixed spelling typo - added appropriate docs to the main package. - corrected app category for docs subpackge * Sat Sep 03 2011 David Nalley 4.3.0-1 - updating to latest upstream version * Wed Jan 05 2011 David Nalley 4.2.0-1 - version bump for XSS vulnerability. CVE-2010-2479 * Tue Mar 24 2010 David Nalley 4.0.0-3 - added reqs for php-bcmath php-tidy and iconv - registered for pear channel * Sun Jan 03 2010 David Nalley 4.0.0-2 - corrected capitalization problem in summ. * Thu Nov 26 2009 David Nalley 4.0.0-1 - Initial Packaging