!2 Package init

From: @zhu-yuncheng
Reviewed-by: @shinwell_hu
Signed-off-by: @shinwell_hu
This commit is contained in:
openeuler-ci-bot 2021-05-25 14:27:59 +08:00 committed by Gitee
commit d241ca0c38
2 changed files with 73 additions and 0 deletions

Binary file not shown.

View File

@ -0,0 +1,73 @@
%global _empty_manifest_terminate_build 0
Name: perl-Test-Without-Module
Version: 0.20
Release: 1
Summary: Test fallback behaviour in absence of modules
License: GPL+ or Artistic
Group: Development/Libraries
URL: http://search.cpan.org/dist/Test-Without-Module/
Source0: http://www.cpan.org/authors/id/C/CO/CORION/Test-Without-Module-%{version}.tar.gz
BuildArch: noarch
BuildRequires: perl-generators
BuildRequires: perl(ExtUtils::MakeMaker)
%description
This module allows you to deliberately hide modules from a program even
though they are installed. This is mostly useful for testing modules that
have a fallback when a certain dependency module is not installed.
%package help
Summary : Test fallback behaviour in absence of modules
Provides: perl-Test-Without-Module-doc
%description help
This module allows you to deliberately hide modules from a program even
though they are installed. This is mostly useful for testing modules that
have a fallback when a certain dependency module is not installed.
%prep
%setup -q -n Test-Without-Module-%{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 META.json README README.mkdn
%{perl_vendorlib}/*
%files help
%{_mandir}/*
%changelog
* Sun May 23 2021 Perl_Bot <Perl_Bot@openeuler.org> 0.20-1
- Specfile autogenerated by Perl_Bot