根据perlporter模板,重新生成spec文件

This commit is contained in:
weidong 2020-08-13 10:35:41 +08:00
parent bacc2aff13
commit 8724eb0ac4

View File

@ -1,64 +1,87 @@
%global _empty_manifest_terminate_build 0
Name: perl-XML-LibXML-PrettyPrint Name: perl-XML-LibXML-PrettyPrint
Version: 0.006 Version: 0.006
Release: 5 Release: 5
Summary: Add pleasant white space to an XML tree Summary: Add pleasant whitespace to a DOM tree
# CONTRIBUTING: GPL+ or Artistic or CC-BY-SA License: GPL+ or Artistic
# COPYRIGHT: Public Domain Group: Development/Libraries
# LICENSE: GPL1 and Artistic license text URL: http://search.cpan.org/dist/XML-LibXML-PrettyPrint/
# Other files: GPL+ or Artistic Source0: http://www.cpan.org/authors/id/T/TO/TOBYINK/XML-LibXML-PrettyPrint-%{version}.tar.gz
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
Patch0: XML-LibXML-PrettyPrint-0.006-Normalize-shell-bang.patch Patch0: XML-LibXML-PrettyPrint-0.006-Normalize-shell-bang.patch
BuildArch: noarch BuildArch: noarch
BuildRequires: make BuildRequires: perl >= 0:5.008001
BuildRequires: perl-generators 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(Exporter::Tiny)
BuildRequires: perl(IO::Handle) BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(Scalar::Util)
BuildRequires: perl(utf8)
BuildRequires: perl(warnings)
BuildRequires: perl(XML::LibXML) >= 1.62
# Tests:
BuildRequires: perl(Test::More) >= 0.96 BuildRequires: perl(Test::More) >= 0.96
BuildRequires: perl(Test::Warnings) 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 %description
XML::LibXML::PrettyPrint is a Perl module that can be applied to an Long XML files can be daunting for humans to read. Of course, XML is really
XML::LibXML DOM tree to reformat it into a more readable result. 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 %prep
%setup -q -n XML-LibXML-PrettyPrint-%{version} %setup -q -n XML-LibXML-PrettyPrint-%{version}
%patch0 -p1 %patch0 -p1
%build %build
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 export PERL_MM_OPT=""
%{__perl} Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags} make %{?_smp_mflags}
%install %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/* %{_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 %check
make test make test
%files %clean
%license LICENSE rm -rf $RPM_BUILD_ROOT
%doc Changes CONTRIBUTING COPYRIGHT CREDITS README
%{_bindir}/* %files -f filelist.lst
%defattr(-,root,root,-)
%doc Changes CONTRIBUTING COPYRIGHT CREDITS dist.ini doap.ttl LICENSE META.json README
%{perl_vendorlib}/* %{perl_vendorlib}/*
%{_mandir}/man1/* %files help
%{_mandir}/man3/* %{_mandir}/*
%changelog %changelog
* Fri Aug 7 2020 weidong <weidong@uniontech.com> - 0.006-5 * Wed Aug 12 2020 weidong <weidong@uniontech.com> 0.006-5
- Initial release for OpenEuler - Initial release for OpenEuler