2024-01-06 09:53:52 +01:00
%define perl_major_ver %(eval `perl -V:version`; echo ${version%*.[0-9]*}.0)
Name : perl-XML-Filter-BufferText
Version : 1.01
2024-03-27 23:56:44 +01:00
Release : 4mamba
2024-01-06 09:53:52 +01:00
Summary : XML::Filter::BufferText - Filter to put all characters() in one event
Group : System/Libraries/Perl
Vendor : openmamba
Distribution : openmamba
Packager : Automatic Build System <autodist@mambasoft.it>
2024-03-27 23:56:44 +01:00
URL : https://www.cpan.org/
2024-01-06 09:53:52 +01:00
Source : http://search.cpan.org/CPAN/authors/id/R/RB/RBERJON/XML-Filter-BufferText-%{version} .tar.gz
License : Artistic
Requires : perl >= %perl_major_ver
## AUTOBUILDREQ-BEGIN
2024-03-27 23:56:44 +01:00
BuildRequires : perl-XML-Sax-Base
BuildRequires : perl-devel
2024-01-06 09:53:52 +01:00
## AUTOBUILDREQ-END
%description
This is a very simple filter. One common cause of grief (and programmer error) is that XML parsers aren't required to provide character events in one chunk. They can, but are not forced to, and most don' t. This filter does the trivial but oft-repeated task of putting all characters into a single event.
Note that this won't help you cases such as:
<foo> blah <!-- comment --> phubar </foo>
In the above case, given the interleaving comment, there will be two character() events. This may be worked around in the future if there is demand for it.
An interesting way to use this filter, instead of telling users to use it, is to return it from your handler's constructor, already configured and all. That' ll make the buffering totally transparent to them (XML::SAX::Writer does that).
%prep
%setup -q -n XML-Filter-BufferText-%{version}
%build
perl Makefile.PL PREFIX=%{_prefix} INSTALLDIRS=vendor
%make
%make test
%install
[ " %{buildroot} " != / ] && rm -rf " %{buildroot} "
%makeinstall _perl
packlist=`find %{buildroot} -name .packlist`
[ -z " $ p a c k l i s t " ] && exit 1 || cat $packlist | \
sed " s , % b u i l d r o o t , , g ; s , . * / m a n / . * , & . g z , g " | \
sort -u > .packlist && rm $packlist
strid=`echo $packlist | sed 's,.*auto\(.*\)/.packlist,\1,' `
for dir in `find %{buildroot} -type d | grep $strid`; do
echo " % d i r $ { d i r # % b u i l d r o o t } " >> .packlist
done
%clean
[ " %{buildroot} " != / ] && rm -rf " %{buildroot} "
rm -f .packlist
%files -f .packlist
%defattr (-,root,root)
%changelog
2024-03-27 23:56:44 +01:00
* Wed Mar 27 2024 Automatic Build System <autodist@openmamba.org> 1.01-4mamba
- automatic rebuild by autodist
2024-01-06 09:53:52 +01:00
* Tue Nov 13 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 1.01-3mamba
- perl 5.16 mass rebuild
* Wed Nov 05 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 1.01-2mamba
- automatic rebuild by autodist
* Mon Sep 15 2008 gil <puntogil@libero.it> 1.01-1mamba
- package created by autospec