101 lines
2.8 KiB
RPMSpec
101 lines
2.8 KiB
RPMSpec
%global pdini_name %{perl_vendorlib}/XML/SAX/ParserDetails.ini
|
|
|
|
Summary: SAX parser access API for Perl
|
|
Name: perl-XML-SAX
|
|
Version: 1.02
|
|
Release: 2
|
|
License: GPL+ or Artistic
|
|
URL: https://metacpan.org/release/XML-SAX
|
|
|
|
Source0: http://www.cpan.org/authors/id/G/GR/GRANTM/XML-SAX-%{version}.tar.gz
|
|
|
|
Patch0: perl-XML-SAX-0.99-rt20126.patch
|
|
|
|
BuildArch: noarch
|
|
BuildRequires: coreutils make perl-generators perl-interpreter
|
|
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 perl(File::Basename) perl(File::Spec)
|
|
# Run-time
|
|
BuildRequires: perl(Carp) perl(constant) perl(Encode) perl(Exporter) perl(File::Temp)
|
|
BuildRequires: perl(IO::File) perl(overload) perl(strict) perl(Symbol) perl(vars)
|
|
BuildRequires: perl(warnings) perl(XML::NamespaceSupport) >= 0.03
|
|
BuildRequires: perl(XML::SAX::Base) perl(XML::SAX::Exception)
|
|
# Test
|
|
BuildRequires: perl(base) perl(Fatal) perl(File::Path) perl(Test)
|
|
|
|
Requires: perl(:MODULE_COMPAT_%(perl -MConfig -e 'print $Config{version}'))
|
|
Recommends: perl(LWP::UserAgent)
|
|
|
|
# Remove bogus XML::SAX::PurePerl* dependencies and unversioned provides
|
|
%global __requires_exclude ^perl\\(XML::SAX::PurePerl
|
|
%global __provides_exclude ^perl\\(XML::SAX::PurePerl\\)$
|
|
|
|
%description
|
|
XML::SAX is a SAX parser access API for Perl. It includes classes and
|
|
APIs required for implementing SAX drivers, along with a factory class
|
|
for returning any SAX parser installed on the user's system.
|
|
|
|
|
|
%package_help
|
|
|
|
|
|
%prep
|
|
%autosetup -p1 -n XML-SAX-%{version}
|
|
|
|
%build
|
|
echo N | %{__perl} Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1
|
|
%make_build
|
|
|
|
%install
|
|
make pure_install DESTDIR=%{buildroot}
|
|
%{_fixperms} %{buildroot}/*
|
|
|
|
touch %{buildroot}%{pdini_name}
|
|
|
|
%check
|
|
make test
|
|
|
|
%post
|
|
if [ ! -f "%{pdini_name}" ] ; then
|
|
perl -MXML::SAX -e \
|
|
'XML::SAX->add_parser(q(XML::SAX::PurePerl))->save_parsers()' 2>/dev/null || :
|
|
else
|
|
cp -p "%{pdini_name}" "%{pdini_name}.backup"
|
|
fi
|
|
|
|
%triggerun -- perl-XML-LibXML < 1.58-8
|
|
if [ -f "%{pdini_name}.backup" ] ; then
|
|
mv "%{pdini_name}.backup" "%{pdini_name}"
|
|
fi
|
|
|
|
%preun
|
|
if [ $1 -eq 0 ] ; then
|
|
perl -MXML::SAX -e \
|
|
'XML::SAX->remove_parser(q(XML::SAX::PurePerl))->save_parsers()' || :
|
|
fi
|
|
[ -f "%{pdini_name}.backup" ] && \
|
|
rm -rf "%{pdini_name}.backup" || :
|
|
|
|
%files
|
|
%license LICENSE
|
|
%dir %{perl_vendorlib}/XML/
|
|
%{perl_vendorlib}/XML/SAX.pm
|
|
%dir %{perl_vendorlib}/XML/SAX/
|
|
%{perl_vendorlib}/XML/SAX/*.pm
|
|
%doc %{perl_vendorlib}/XML/SAX/*.pod
|
|
%{perl_vendorlib}/XML/SAX/PurePerl/
|
|
%ghost %{perl_vendorlib}/XML/SAX/ParserDetails.ini
|
|
|
|
%files help
|
|
%doc Changes README
|
|
%{_mandir}/man3/XML::*.3pm*
|
|
|
|
%changelog
|
|
* Mon Oct 24 2022 xujing <xujing125@huawei.com> - 1.02-2
|
|
- optimize the specfile
|
|
|
|
* Wed Jul 22 2020 dingyue <dingyue5@huawei.com> - 1.02-1
|
|
- Package update
|
|
|
|
* Tue Nov 19 2019 mengxian <mengxian@huawei.com> - 1.00-5
|
|
- Package init
|