2023-04-21 00:57:44 +08:00
|
|
|
%global cpanname XML-Parser
|
|
|
|
|
2023-04-24 02:00:47 +08:00
|
|
|
%if %{?repo:1}%{!?repo:0}
|
|
|
|
%if "%{repo}" == "1.core."
|
|
|
|
%global norequirelwp foo
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
2023-04-21 00:57:44 +08:00
|
|
|
Name: perl-%{cpanname}
|
|
|
|
Version: 2.46
|
2023-04-24 02:00:47 +08:00
|
|
|
Release: %{?repo}0.rc4%{?dist}
|
2023-04-21 01:13:17 +08:00
|
|
|
Summary: A perl module for parsing XML documents
|
2023-04-21 00:57:44 +08:00
|
|
|
|
|
|
|
Group: Perl/Libraries
|
2023-04-24 02:00:47 +08:00
|
|
|
License: GPL-1.0-or-later or Artistic-1.0-Perl
|
2023-04-21 00:57:44 +08:00
|
|
|
URL: https://metacpan.org/pod/XML::Parser
|
|
|
|
Source0: https://cpan.metacpan.org/authors/id/T/TO/TODDR/%{cpanname}-%{version}.tar.gz
|
|
|
|
|
2023-04-24 02:00:47 +08:00
|
|
|
BuildRequires: perl-devel
|
2023-04-21 00:57:44 +08:00
|
|
|
BuildRequires: expat-devel
|
2023-04-24 09:17:51 +08:00
|
|
|
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
|
2023-04-21 00:57:44 +08:00
|
|
|
# for test
|
2023-04-23 08:02:22 +08:00
|
|
|
%if 0%{?runtests:1} == 1
|
2023-04-24 02:00:47 +08:00
|
|
|
BuildRequires: perl(Test::More)
|
|
|
|
BuildRequires: perl(warnings)
|
|
|
|
%if 0%{!?norequirelwp:1} == 1
|
2023-04-23 08:02:22 +08:00
|
|
|
BuildRequires: perl(LWP::UserAgent)
|
|
|
|
%endif
|
2023-04-24 02:00:47 +08:00
|
|
|
%endif
|
2023-04-23 08:02:22 +08:00
|
|
|
# runtime
|
2023-04-24 02:00:47 +08:00
|
|
|
%if 0%{!?norequirelwp:1} == 1
|
2023-04-23 08:02:22 +08:00
|
|
|
Requires: perl(LWP::UserAgent)
|
2023-04-24 02:00:47 +08:00
|
|
|
%endif
|
2023-04-23 08:02:22 +08:00
|
|
|
%if 0%{?perl5_cpanlic:1} == 1
|
|
|
|
Requires: common-CPAN-licenses
|
|
|
|
%endif
|
|
|
|
%if 0%{?perl5_ABI:1} == 1
|
|
|
|
Requires: %{perl5_ABI}
|
|
|
|
%endif
|
2023-04-21 00:57:44 +08:00
|
|
|
|
|
|
|
%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.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -n %{cpanname}-%{version}
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 OPTIMIZE="$RPM_OPT_FLAGS"
|
|
|
|
make %{?_smp_mflags}
|
|
|
|
|
|
|
|
%check
|
2023-04-23 08:02:22 +08:00
|
|
|
%if 0%{?runtests:1} == 1
|
2023-04-21 00:57:44 +08:00
|
|
|
make test > %{name}-make.test.log 2>&1
|
2023-04-23 08:02:22 +08:00
|
|
|
%else
|
|
|
|
echo "make test not run during package build." > %{name}-make.test.log
|
|
|
|
%endif
|
2023-04-21 00:57:44 +08:00
|
|
|
|
|
|
|
%install
|
|
|
|
make install DESTDIR=%{buildroot}
|
|
|
|
%{_fixperms} %{buildroot}%{perl5_vendorarch}
|
|
|
|
|
2023-04-23 08:02:22 +08:00
|
|
|
%if 0%{?perl5_cpanlic:1} == 1
|
2023-04-21 05:35:41 +08:00
|
|
|
cat > Perl5-Licenses.txt << "EOF"
|
|
|
|
This package specifies it uses the Perl 5 licenses but did not include
|
|
|
|
them in the package source.
|
|
|
|
|
|
|
|
They can be found in the following directory:
|
|
|
|
|
2023-04-23 08:02:22 +08:00
|
|
|
%{perl5_cpanlic}/Perl5/
|
2023-04-21 05:35:41 +08:00
|
|
|
|
|
|
|
EOF
|
2023-04-23 08:02:22 +08:00
|
|
|
%endif
|
2023-04-21 00:57:44 +08:00
|
|
|
|
|
|
|
%files
|
2023-04-26 11:53:43 +08:00
|
|
|
%defattr(-,root,root,-)
|
2023-04-21 00:57:44 +08:00
|
|
|
%dir %{perl5_vendorarch}/XML
|
|
|
|
%attr(0444,root,root) %{perl5_vendorarch}/XML/Parser.pm
|
|
|
|
%dir %{perl5_vendorarch}/XML/Parser
|
|
|
|
%dir %{perl5_vendorarch}/XML/Parser/Encodings
|
|
|
|
%attr(0444,root,root) %{perl5_vendorarch}/XML/Parser/Encodings/Japanese_Encodings.msg
|
|
|
|
%attr(0444,root,root) %{perl5_vendorarch}/XML/Parser/Encodings/README
|
|
|
|
%attr(0444,root,root) %{perl5_vendorarch}/XML/Parser/Encodings/*.enc
|
|
|
|
%attr(0444,root,root) %{perl5_vendorarch}/XML/Parser/Expat.pm
|
|
|
|
%attr(0444,root,root) %{perl5_vendorarch}/XML/Parser/LWPExternEnt.pl
|
|
|
|
%dir %{perl5_vendorarch}/XML/Parser/Style
|
|
|
|
%attr(0444,root,root) %{perl5_vendorarch}/XML/Parser/Style/*.pm
|
|
|
|
%dir %{perl5_vendorarch}/auto/XML
|
|
|
|
%dir %{perl5_vendorarch}/auto/XML/Parser
|
|
|
|
%dir %{perl5_vendorarch}/auto/XML/Parser/Expat
|
|
|
|
%attr(0555,root,root) %{perl5_vendorarch}/auto/XML/Parser/Expat/Expat.so
|
|
|
|
# man files
|
|
|
|
%attr(0644,root,root) %{_mandir}/man3/*.3*
|
2023-04-23 08:02:22 +08:00
|
|
|
%if 0%{?perl5_cpanlic:1} == 1
|
2023-04-21 05:35:41 +08:00
|
|
|
%license Perl5-Licenses.txt
|
2023-04-23 08:02:22 +08:00
|
|
|
%doc Changes README samples Perl5-Licenses.txt
|
|
|
|
%else
|
|
|
|
%doc Changes README samples
|
|
|
|
%endif
|
2023-04-21 00:57:44 +08:00
|
|
|
%doc %{name}-make.test.log
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
2023-04-24 02:00:47 +08:00
|
|
|
* Sun Apr 23 2023 Michael A. Peters <anymouseprophet@gmail.com> - 2.46-0.rc4
|
|
|
|
- Make dependency on LWP::UserAgent conditional
|
|
|
|
- BuildRequire perl-devel
|
|
|
|
|
2023-04-23 08:02:22 +08:00
|
|
|
* Sat Apr 22 2023 Michael A. Peters <anymouseprophet@gmail.com> - 2.46-0.rc3
|
|
|
|
- Update how license is done, add ABI requirement
|
|
|
|
|
2023-04-21 05:35:41 +08:00
|
|
|
* Thu Apr 20 2023 Michael A. Peters <anymouseprophet@gmail.com> - 2.46-0.rc2
|
|
|
|
- License file
|
|
|
|
|
2023-04-21 00:57:44 +08:00
|
|
|
* Thu Apr 20 2023 Michael A. Peters <anymouseprophet@gmail.com> - 2.46-0.rc1
|
|
|
|
- Initial spec file for YJL (RPM bootstrapping LFS/BLFS 11.3)
|