diff --git a/perl-XML-Parser.spec b/perl-XML-Parser.spec index 118446221f9612a1f26b71f69764d9d72cd312b7..64663bdf579c2b0debcbf1fc0c88ea27a9796bf4 100644 --- a/perl-XML-Parser.spec +++ b/perl-XML-Parser.spec @@ -1,71 +1,49 @@ -%define anolis_release 1 +%define anolis_release 2 + Name: perl-XML-Parser Version: 2.46 Release: %{anolis_release}%{?dist} -Summary: Perl module for parsing XML documents - +Summary: A perl module for parsing XML documents License: GPL-1.0-or-later OR Artistic-1.0-Perl Url: https://metacpan.org/release/XML-Parser Source0: https://cpan.metacpan.org/authors/id/T/TO/TODDR/XML-Parser-%{version}.tar.gz -# Build -BuildRequires: coreutils -BuildRequires: expat-devel -BuildRequires: findutils -BuildRequires: gcc -BuildRequires: glibc-common -BuildRequires: make -BuildRequires: perl-devel -BuildRequires: perl-generators -BuildRequires: perl-interpreter -BuildRequires: perl(Config) -BuildRequires: perl(Devel::CheckLib) -BuildRequires: perl(English) -BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 -BuildRequires: perl(lib) -# Runtime -BuildRequires: perl(Carp) -BuildRequires: perl(FileHandle) -BuildRequires: perl(File::Spec) -BuildRequires: perl(if) -BuildRequires: perl(IO::File) -BuildRequires: perl(IO::Handle) -# LWPExternEnt.pl script is loaded by Parser.pm -BuildRequires: perl(LWP::UserAgent) -BuildRequires: perl(overload) -BuildRequires: perl(strict) -BuildRequires: perl(URI) -BuildRequires: perl(URI::file) -BuildRequires: perl(XSLoader) +BuildRequires: coreutils findutils gcc make pkgconfig(expat) glibc-common +BuildRequires: perl-devel perl-generators perl-interpreter perl(Config) +BuildRequires: perl(IO::Handle) perl(IO::File) perl(overload) perl(XSLoader) +BuildRequires: perl(Carp) perl(FileHandle) perl(File::Spec) perl(if) +BuildRequires: perl(URI::file) perl(URI) perl(LWP::UserAgent) perl(strict) +BuildRequires: perl(lib) perl(English) perl(Devel::CheckLib) perl(ExtUtils::MakeMaker) >= 6.76 # Tests -BuildRequires: perl(if) -BuildRequires: perl(Test) -BuildRequires: perl(Test::More) -BuildRequires: perl(warnings) -Requires: perl(IO::File) -Requires: perl(IO::Handle) +BuildRequires: perl(if) perl(Test) perl(Test::More) perl(warnings) +Requires: perl(IO::File) perl(IO::Handle) %{?perl_default_filter} %global __provides_exclude %{?__provides_exclude:%__provides_exclude|}perl\\(XML::Parser\\)$ %description -This module provides ways to parse XML documents. It is built on top -of XML::Parser::Expat, which is a lower level interface to James -Clark's expat library. Each call to one of the parsing methods creates -a new instance of XML::Parser::Expat which is then used to parse the -document. Expat options may be provided when the XML::Parser object is -created. These options are then passed on to the Expat object on each -parse call. They can also be given as extra arguments to the parse -methods, in which case they override options given at XML::Parser -creation time. +The perl-XML-Parser module is a Perl interface to James Clark’s XML parser, expat. It provides +a Perl interface to the Expat XML parsing library. The module provides a simple way to parse +XML documents. It is built on top of the XML::Parser module that implements an interface to expat. + +The XML::Parser module provides a way to parse XML documents using an event-driven model. +The parser is implemented as a Perl wrapper around expat, which is written in C. The module +provides a simple way to parse XML documents and extract information from them . + +%package doc +Summary: Documentation files for %{name} +Requires: %{name} = %{EVR} +BuildArch: noarch + +%description doc +The %{name}-doc package contains documentation files for %{name}. %prep -%setup -q -n XML-Parser-%{version} +%autosetup -n XML-Parser-%{version} -p1 chmod 644 samples/{canonical,xml*} perl -MConfig -pi -e 's|^#!/usr/local/bin/perl\b|$Config{startperl}|' samples/{canonical,xml*} -# Remove bundled library rm -r inc perl -i -ne 'print $_ unless m{^inc/}' MANIFEST @@ -75,8 +53,8 @@ perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 OPTIMIZE="$RPM_ %install %{make_install} -find $RPM_BUILD_ROOT -type f -name '*.bs' -a -size 0 -delete -%{_fixperms} $RPM_BUILD_ROOT/* +find %{buildroot} -type f -name '*.bs' -a -size 0 -delete +%{_fixperms} %{buildroot}/* for file in samples/REC-xml-19980210.xml; do iconv -f iso-8859-1 -t utf-8 < "$file" > "${file}_" @@ -88,12 +66,16 @@ done make test %files -%doc README Changes samples/ -%{perl_vendorarch}/XML/ %{perl_vendorarch}/auto/XML/ +%{perl_vendorarch}/XML/ %{_mandir}/man3/*.3* +%files doc +%doc Changes README samples/ %changelog +* Thu Apr 13 2023 yuanhui - 2.46-2 +- Optimize the spec file + * Thu Feb 02 2023 Chunmei Xu - 2.46-1 - init from upstream