Package init

This commit is contained in:
si-gui 2021-05-24 11:24:15 +08:00
parent 63c0a38c9f
commit 5ce585037a
2 changed files with 81 additions and 0 deletions

Binary file not shown.

View 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