!2 Package init
From: @si-gui Reviewed-by: @shinwell_hu Signed-off-by: @shinwell_hu
This commit is contained in:
commit
ba3c87614a
BIN
CPAN-DistnameInfo-0.12.tar.gz
Normal file
BIN
CPAN-DistnameInfo-0.12.tar.gz
Normal file
Binary file not shown.
81
perl-CPAN-DistnameInfo.spec
Normal file
81
perl-CPAN-DistnameInfo.spec
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
%global _empty_manifest_terminate_build 0
|
||||||
|
Name: perl-CPAN-DistnameInfo
|
||||||
|
Version: 0.12
|
||||||
|
Release: 1
|
||||||
|
Summary: Extract distribution name and version from a distribution filename
|
||||||
|
License: GPL-1.0-only or Artistic-1.0-Perl
|
||||||
|
Group: Development/Libraries
|
||||||
|
URL: http://search.cpan.org/dist/CPAN-DistnameInfo/
|
||||||
|
Source0: http://www.cpan.org/authors/id/G/GB/GBARR/CPAN-DistnameInfo-%{version}.tar.gz
|
||||||
|
BuildArch: noarch
|
||||||
|
BuildRequires: perl-generators
|
||||||
|
BuildRequires: perl(ExtUtils::MakeMaker)
|
||||||
|
BuildRequires: perl(Test::More)
|
||||||
|
Requires: perl(Test::More)
|
||||||
|
%description
|
||||||
|
Many online services that are centered around CPAN attempt to
|
||||||
|
associate multiple uploads by extracting a distribution name from the
|
||||||
|
filename of the upload. For most distributions this is easy as they
|
||||||
|
have used ExtUtils::MakeMaker or Module::Build to create the
|
||||||
|
distribution, which results in a uniform name. But sadly not all
|
||||||
|
uploads are created in this way.
|
||||||
|
%package help
|
||||||
|
Summary : Extract distribution name and version from a distribution filename
|
||||||
|
Provides: perl-CPAN-DistnameInfo-doc
|
||||||
|
%description help
|
||||||
|
Many online services that are centered around CPAN attempt to
|
||||||
|
associate multiple uploads by extracting a distribution name from the
|
||||||
|
filename of the upload. For most distributions this is easy as they
|
||||||
|
have used ExtUtils::MakeMaker or Module::Build to create the
|
||||||
|
distribution, which results in a uniform name. But sadly not all
|
||||||
|
uploads are created in this way.
|
||||||
|
%prep
|
||||||
|
%setup -q -n CPAN-DistnameInfo-%{version}
|
||||||
|
%build
|
||||||
|
export PERL_MM_OPT=""
|
||||||
|
%{__perl} Makefile.PL INSTALLDIRS=vendor
|
||||||
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
|
%install
|
||||||
|
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
|
||||||
|
|
||||||
|
%clean
|
||||||
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
%files -f filelist.lst
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%doc Changes README
|
||||||
|
%{perl_vendorlib}/*
|
||||||
|
%files help
|
||||||
|
%{_mandir}/*
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Sun May 23 2021 Perl_Bot <Perl_Bot@openeuler.org> 0.12-1
|
||||||
|
- Specfile autogenerated by Perl_Bot
|
||||||
Loading…
x
Reference in New Issue
Block a user