- Handle ParserDetails.ini parser registration.
- Require perl(:MODULE_COMPAT_*).
- Own installed directories.
This commit is contained in:
Warren Togami 2004-09-24 22:44:14 +00:00
parent d5f79a1d04
commit efd036d2a4

View File

@ -1,9 +1,10 @@
%define _use_internal_dependency_generator 0 %define _use_internal_dependency_generator 0
%{!?perl_vendorlib: %define perl_vendorlib %(eval "`perl -V:installvendorlib`"; echo $installvendorlib)}
Summary: XML-SAX Perl module Summary: XML-SAX Perl module
Name: perl-XML-SAX Name: perl-XML-SAX
Version: 0.12 Version: 0.12
Release: 6 Release: 7
License: GPL or Artistic License: GPL or Artistic
Group: Development/Libraries Group: Development/Libraries
URL: http://search.cpan.org/dist/XML-SAX/ URL: http://search.cpan.org/dist/XML-SAX/
@ -12,6 +13,7 @@ BuildRequires: perl >= 2:5.8.0
Requires: %(perl -MConfig -le 'if (defined $Config{useithreads}) { print "perl(:WITH_ITHREADS)" } else { print "perl(:WITHOUT_ITHREADS)" }') Requires: %(perl -MConfig -le 'if (defined $Config{useithreads}) { print "perl(:WITH_ITHREADS)" } else { print "perl(:WITHOUT_ITHREADS)" }')
Requires: %(perl -MConfig -le 'if (defined $Config{usethreads}) { print "perl(:WITH_THREADS)" } else { print "perl(:WITHOUT_THREADS)" }') Requires: %(perl -MConfig -le 'if (defined $Config{usethreads}) { print "perl(:WITH_THREADS)" } else { print "perl(:WITHOUT_THREADS)" }')
Requires: %(perl -MConfig -le 'if (defined $Config{uselargefiles}) { print "perl(:WITH_LARGEFILES)" } else { print "perl(:WITHOUT_LARGEFILES)" }') Requires: %(perl -MConfig -le 'if (defined $Config{uselargefiles}) { print "perl(:WITH_LARGEFILES)" } else { print "perl(:WITHOUT_LARGEFILES)" }')
Requires: perl(:MODULE_COMPAT_%(perl -MConfig -e 'print $Config{version}'))
Source0: XML-SAX-0.12.tar.gz Source0: XML-SAX-0.12.tar.gz
Source1: filter-requires-xmlsax.sh Source1: filter-requires-xmlsax.sh
BuildArch: noarch BuildArch: noarch
@ -30,33 +32,56 @@ BuildRequires: perl-XML-NamespaceSupport
%setup -q -n XML-SAX-%{version} %setup -q -n XML-SAX-%{version}
%build %build
echo N | CFLAGS="$RPM_OPT_FLAGS" perl Makefile.PL PREFIX=$RPM_BUILD_ROOT%{_prefix} INSTALLDIRS=vendor echo N | CFLAGS="$RPM_OPT_FLAGS" perl Makefile.PL INSTALLDIRS=vendor
make OPTIMIZE="$RPM_OPT_FLAGS" make OPTIMIZE="$RPM_OPT_FLAGS"
make test
%install %install
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
eval `perl '-V:installarchlib'` make install \
mkdir -p $RPM_BUILD_ROOT$installarchlib PERL_INSTALL_ROOT=$RPM_BUILD_ROOT \
%makeinstall INSTALLARCHLIB=$RPM_BUILD_ROOT%{perl_archlib}
rm -f `find $RPM_BUILD_ROOT -type f -name perllocal.pod -o -name .packlist` find $RPM_BUILD_ROOT -type f -a \( -name perllocal.pod -o -name .packlist \
-o \( -name '*.bs' -a -empty \) \) -exec rm -f {} ';'
find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';'
chmod -R u+w $RPM_BUILD_ROOT/*
touch $RPM_BUILD_ROOT%{perl_vendorlib}/XML/SAX/ParserDetails.ini
[ -x %{_libdir}/rpm/brp-compress ] && %{_libdir}/rpm/brp-compress %check || :
make test
find $RPM_BUILD_ROOT%{_prefix} -type f -print | \
sed "s@^$RPM_BUILD_ROOT@@g" > %{name}-%{version}-%{release}-filelist
if [ "$(cat %{name}-%{version}-%{release}-filelist)X" = "X" ] ; then
echo "ERROR: EMPTY FILE LIST"
exit 1
fi
%clean %clean
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
%files -f %{name}-%{version}-%{release}-filelist %post
perl -MXML::SAX -e \
'XML::SAX->add_parser(q(XML::SAX::PurePerl))->save_parsers()' 2>/dev/null
%preun
if [ $1 -eq 0 ]; then
perl -MXML::SAX -e \
'XML::SAX->remove_parser(q(XML::SAX::PurePerl))->save_parsers()'
fi
%files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc Changes LICENSE README
%dir %{perl_vendorlib}/XML
%{perl_vendorlib}/XML/SAX.pm
%dir %{perl_vendorlib}/XML/SAX
%{perl_vendorlib}/XML/SAX/*.pm
%{perl_vendorlib}/XML/SAX/*.pod
%{perl_vendorlib}/XML/SAX/PurePerl
%{_mandir}/man3/XML::*.3*
%ghost %{perl_vendorlib}/XML/SAX/ParserDetails.ini
%exclude %{perl_vendorlib}/XML/SAX/placeholder.pl
%changelog %changelog
* Sun Apr 18 2004 Ville Skyttä <ville.skytta at iki.fi> - 0.12-7
- #121167
- Handle ParserDetails.ini parser registration.
- Require perl(:MODULE_COMPAT_*).
- Own installed directories.
* Wed Oct 22 2003 Chip Turner <cturner@redhat.com> - 0.12-1 * Wed Oct 22 2003 Chip Turner <cturner@redhat.com> - 0.12-1
- Specfile autogenerated. - Specfile autogenerated.