From 8724eb0ac4def95f1066f60c7ba8f7cced11366d Mon Sep 17 00:00:00 2001 From: weidong Date: Thu, 13 Aug 2020 10:35:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B9=E6=8D=AEperlporter=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=EF=BC=8C=E9=87=8D=E6=96=B0=E7=94=9F=E6=88=90spec=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- perl-XML-LibXML-PrettyPrint.spec | 99 ++++++++++++++++++++------------ 1 file changed, 61 insertions(+), 38 deletions(-) diff --git a/perl-XML-LibXML-PrettyPrint.spec b/perl-XML-LibXML-PrettyPrint.spec index 6d6a4d1..8933b50 100644 --- a/perl-XML-LibXML-PrettyPrint.spec +++ b/perl-XML-LibXML-PrettyPrint.spec @@ -1,64 +1,87 @@ +%global _empty_manifest_terminate_build 0 Name: perl-XML-LibXML-PrettyPrint Version: 0.006 Release: 5 -Summary: Add pleasant white space to an XML tree -# CONTRIBUTING: GPL+ or Artistic or CC-BY-SA -# COPYRIGHT: Public Domain -# LICENSE: GPL1 and Artistic license text -# Other files: GPL+ or Artistic -License: (GPL+ or Artistic) and (GPL+ or Artistic or CC-BY-SA) and Public Domain -URL: https://metacpan.org/release/XML-LibXML-PrettyPrint -Source0: https://cpan.metacpan.org/authors/id/T/TO/TOBYINK/XML-LibXML-PrettyPrint-%{version}.tar.gz -# Do not use /usr/bin/env in scripts +Summary: Add pleasant whitespace to a DOM tree +License: GPL+ or Artistic +Group: Development/Libraries +URL: http://search.cpan.org/dist/XML-LibXML-PrettyPrint/ +Source0: http://www.cpan.org/authors/id/T/TO/TOBYINK/XML-LibXML-PrettyPrint-%{version}.tar.gz Patch0: XML-LibXML-PrettyPrint-0.006-Normalize-shell-bang.patch BuildArch: noarch -BuildRequires: make +BuildRequires: perl >= 0:5.008001 BuildRequires: perl-generators -BuildRequires: perl-interpreter -BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 -BuildRequires: perl(strict) -# Run-time: -BuildRequires: perl(:VERSION) >= 5.8.1 -BuildRequires: perl(Carp) -BuildRequires: perl(constant) BuildRequires: perl(Exporter::Tiny) -BuildRequires: perl(IO::Handle) -BuildRequires: perl(Scalar::Util) -BuildRequires: perl(utf8) -BuildRequires: perl(warnings) -BuildRequires: perl(XML::LibXML) >= 1.62 -# Tests: +BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: perl(Test::More) >= 0.96 BuildRequires: perl(Test::Warnings) -Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) - +BuildRequires: perl(XML::LibXML) >= 1.62 +Requires: perl(Exporter::Tiny) +Requires: perl(XML::LibXML) >= 1.62 +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) %description -XML::LibXML::PrettyPrint is a Perl module that can be applied to an -XML::LibXML DOM tree to reformat it into a more readable result. - +Long XML files can be daunting for humans to read. Of course, XML is really +designed for computers to read - not people - but there are times when mere +mortals do need to read and edit XML by hand. For example, if your +application stores its configuration in XML, or you need to dump some XML +to STDOUT for debugging purposes. +%package help +Summary : Add pleasant whitespace to a DOM tree +Provides: perl-XML-LibXML-PrettyPrint-doc +%description help +Long XML files can be daunting for humans to read. Of course, XML is really +designed for computers to read - not people - but there are times when mere +mortals do need to read and edit XML by hand. For example, if your +application stores its configuration in XML, or you need to dump some XML +to STDOUT for debugging purposes. %prep %setup -q -n XML-LibXML-PrettyPrint-%{version} %patch0 -p1 - %build -perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 +export PERL_MM_OPT="" +%{__perl} Makefile.PL INSTALLDIRS=vendor make %{?_smp_mflags} %install -make pure_install DESTDIR=$RPM_BUILD_ROOT +export PERL_MM_OPT="" +rm -rf $RPM_BUILD_ROOT + +make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT + +find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \; +find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \; + %{_fixperms} $RPM_BUILD_ROOT/* +pushd %{buildroot} +touch filelist.lst +if [ -d usr/bin ];then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ];then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ];then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib ];then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +popd +mv %{buildroot}/filelist.lst . %check make test -%files -%license LICENSE -%doc Changes CONTRIBUTING COPYRIGHT CREDITS README -%{_bindir}/* +%clean +rm -rf $RPM_BUILD_ROOT + +%files -f filelist.lst +%defattr(-,root,root,-) +%doc Changes CONTRIBUTING COPYRIGHT CREDITS dist.ini doap.ttl LICENSE META.json README %{perl_vendorlib}/* -%{_mandir}/man1/* -%{_mandir}/man3/* +%files help +%{_mandir}/* %changelog -* Fri Aug 7 2020 weidong - 0.006-5 +* Wed Aug 12 2020 weidong 0.006-5 - Initial release for OpenEuler