perl-XML-SAX/perl-XML-SAX.spec

127 lines
4.1 KiB
RPMSpec

%define perl_major_ver %(eval `perl -V:version`; echo ${version%*.[0-9]*}.0)
%define perl_vendorlib %(eval "`perl -V:vendorlib`"; echo $vendorlib)
Name: perl-XML-SAX
Version: 1.02
Release: 2mamba
Summary: XML::SAX - Classes for using and building Perl SAX2 XML parsers, filters, and drivers
Group: Development/Libraries/Perl
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://www.cpan.org/
Source: http://www.cpan.org/modules/by-module/XML/XML-SAX-%{version}.tar.gz
License: GPL
Requires: perl >= %perl_major_ver
## AUTOBUILDREQ-BEGIN
BuildRequires: libperl
BuildRequires: perl-Encode
BuildRequires: perl-XML-NamespaceSupport
BuildRequires: perl-XML-Sax-Base
BuildRequires: perl-devel
## AUTOBUILDREQ-END
BuildRequires: perl >= 2:5.36.0
Provides: perl(XML::SAX::PurePerl::DocType)
Provides: perl(XML::SAX::PurePerl::DTDDecls)
Provides: perl(XML::SAX::PurePerl::EncodingDetect)
Provides: perl(XML::SAX::PurePerl::XMLDecl)
Obsoletes: perl-XML-SAX-Base
%description
XML::SAX consists of several framework classes for using and building Perl SAX2 XML parsers, filters, and drivers.
It is designed around the need to be able to "plug in" different SAX parsers to an application without requiring programmer intervention.
Those of you familiar with the DBI will be right at home.
Some of the designs come from the Java JAXP specification (SAX part), only without the javaness.
%prep
%setup -q -n XML-SAX-%{version}
%build
perl Makefile.PL PREFIX=%{_prefix} INSTALLDIRS=vendor << EOF
EOF
%make
make test
%install
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
%makeinstall_perl
packlist=`find %{buildroot} -name .packlist`
[ -z "$packlist" ] && exit 1 || cat $packlist | \
sed "s,%buildroot,,g;s,.*/man/.*,&.gz,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 "%dir ${dir#%buildroot}" >> .packlist
done
touch %{buildroot}%{perl_vendorlib}/XML/SAX/ParserDetails.ini
%clean
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
rm -f .packlist
%post
perl -MXML::SAX -e \
'XML::SAX->add_parser(q(XML::SAX::PurePerl))->save_parsers()' &>/dev/null
exit 0
%preun
if [ $1 -eq 0 ]; then
perl -MXML::SAX -e \
'XML::SAX->remove_parser(q(XML::SAX::PurePerl))->save_parsers()' &>/dev/null
fi
exit 0
%files -f .packlist
%defattr(-,root,root)
%ghost %{perl_vendorlib}/XML/SAX/ParserDetails.ini
%changelog
* Tue Apr 18 2023 Sdk Build System <sdk@mambasoft.it> 1.02-2mamba
- rebuilt with perl 5.36.0
* Thu May 14 2020 Automatic Build System <autodist@mambasoft.it> 1.02-1mamba
- automatic update by autodist
* Sun Apr 01 2018 Automatic Build System <autodist@mambasoft.it> 1.00-1mamba
- automatic update by autodist
* Mon Nov 12 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 0.99-1mamba
- perl 5.16 mass rebuild
* Fri Feb 05 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 0.96-3mamba
- rebuilt to remove executable requirements
* Mon Nov 10 2008 gil <puntogil@libero.it> 0.96-2mamba
- rebuilt
* Sun Oct 26 2008 gil <puntogil@libero.it> 0.96-1mamba
- update to 0.96
* Thu Sep 20 2007 Aleph0 <aleph0@openmamba.org> 0.16-1mamba
- update to 0.16
* Thu Dec 01 2005 Davide Madrisan <davide.madrisan@qilinux.it> 0.13-1qilnx
- update to version 0.13 by autospec
- updated specfile
- included ParserDetails.ini in the package as a ghost file
- fixed %%post script, added %%preun script
* Fri Jan 28 2005 Silvan Calarco <silvan.calarco@mambasoft.it> 0.12-5qilnx
- fixed a typo error in %%post script
* Thu Jan 27 2005 Silvan Calarco <silvan.calarco@mambasoft.it> 0.12-4qilnx
- make silent a %%post message warning message
* Thu Jan 27 2005 Davide Madrisan <davide.madrisan@qilinux.it> 0.12-3qilnx
- obsoletes perl-XML-SAX-Base
* Fri Jan 21 2005 Silvan Calarco <silvan.calarco@mambasoft.it> 0.12-2qilnx
- add %%post script for creation of ParserDetails.ini
(see http://perl-xml.sourceforge.net/faq/#win32_cpan)
* Sun Jul 18 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 0.12-1qilnx
- first build