From abfb7f6b938e55a88fad46e5b5486ca100f6df8e Mon Sep 17 00:00:00 2001 From: weidong Date: Thu, 13 Aug 2020 10:29:38 +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-File-Find-Rule-Perl.spec | 80 +++++++++++++++++++++++++---------- 1 file changed, 58 insertions(+), 22 deletions(-) diff --git a/perl-File-Find-Rule-Perl.spec b/perl-File-Find-Rule-Perl.spec index 3315cc4..1b1996c 100644 --- a/perl-File-Find-Rule-Perl.spec +++ b/perl-File-Find-Rule-Perl.spec @@ -1,50 +1,86 @@ +%global _empty_manifest_terminate_build 0 Name: perl-File-Find-Rule-Perl Version: 1.15 Release: 15 Summary: Common rules for searching for Perl things License: GPL+ or Artistic -URL: https://metacpan.org/release/File-Find-Rule-Perl -Source0: https://cpan.metacpan.org/authors/id/E/ET/ETHER/File-Find-Rule-Perl-%{version}.tar.gz -# Filter out the files rpm generates in sourcedir. +Group: Development/Libraries +URL: http://search.cpan.org/dist/File-Find-Rule-Perl/ +Source0: http://www.cpan.org/authors/id/E/ET/ETHER/File-Find-Rule-Perl-%{version}.tar.gz Patch0: File-Find-Rule-Perl-1.15-fedora.patch -Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) BuildArch: noarch +BuildRequires: perl >= 0:5.006 BuildRequires: perl-generators -BuildRequires: perl(constant) -BuildRequires: perl(lib) -BuildRequires: perl(Carp) BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: perl(File::Find::Rule) >= 0.20 BuildRequires: perl(File::Spec) >= 0.82 -BuildRequires: perl(File::Spec::Functions) -BuildRequires: perl(File::Spec::Unix) BuildRequires: perl(Params::Util) >= 0.38 BuildRequires: perl(Parse::CPAN::Meta) >= 1.38 -BuildRequires: perl(Test::More) >= 0.47 - +BuildRequires: perl(Test::More) +Requires: perl(File::Find::Rule) >= 0.20 +Requires: perl(File::Spec) >= 0.82 +Requires: perl(Params::Util) >= 0.38 +Requires: perl(Parse::CPAN::Meta) >= 1.38 +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) %description -Common rules for searching for Perl things. - +I write a lot of things that muck with Perl files. And it always annoyed +me that finding "perl files" requires a moderately complex +File::Find::Rule pattern. +%package help +Summary : Common rules for searching for Perl things +Provides: perl-File-Find-Rule-Perl-doc +%description help +I write a lot of things that muck with Perl files. And it always annoyed +me that finding "perl files" requires a moderately complex +File::Find::Rule pattern. %prep %setup -q -n File-Find-Rule-Perl-%{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 PERL_INSTALL_ROOT=$RPM_BUILD_ROOT -chmod -R u+w $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 -%doc Changes -%{perl_vendorlib}/File -%{_mandir}/man3/* +%clean +rm -rf $RPM_BUILD_ROOT + +%files -f filelist.lst +%defattr(-,root,root,-) +%doc Changes META.json +%{perl_vendorlib}/* +%files help +%{_mandir}/* %changelog -* Fri Aug 7 2020 weidong - 1.15-15 +* Wed Aug 12 2020 weidong 1.15-15 - Initial release for OpenEuler