113 lines
3.0 KiB
RPMSpec
113 lines
3.0 KiB
RPMSpec
%global cpan_name List-UtilsBy
|
|
%global _empty_manifest_terminate_build 0
|
|
|
|
Name: perl-%{cpan_name}
|
|
Version: 0.11
|
|
Release: 1
|
|
Summary: Higher-order list utility functions
|
|
|
|
License: Perl License
|
|
URL: http://search.cpan.org/dist/%{cpan_name}/
|
|
Source0: http://www.cpan.org/authors/id/P/PE/PEVANS/%{cpan_name}-%{version}.tar.gz
|
|
BuildArch: noarch
|
|
|
|
BuildRequires: perl-generators
|
|
BuildRequires: perl(Exporter) >= 5.57
|
|
BuildRequires: perl(Module::Build)
|
|
BuildRequires: perl(Test::More) >= 0.88
|
|
Requires: perl(Exporter) >= 5.57
|
|
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
|
|
|
%description
|
|
This module provides a number of list utility functions, all of which take
|
|
an initial code block to control their behaviour. They are variations on
|
|
similar core perl or List::Util functions of similar names, but which use
|
|
the block to control their behaviour. For example, the core Perl function
|
|
sort takes a list of values and returns them, sorted into order by their
|
|
string value. The "sort_by" function sorts them according to the string
|
|
value returned by the extra function, when given each value.
|
|
|
|
|
|
%package help
|
|
Summary : Higher-order list utility functions
|
|
Provides: perl-%{cpan_name}-doc
|
|
%description help
|
|
This module provides a number of list utility functions, all of which take
|
|
an initial code block to control their behaviour. They are variations on
|
|
similar core perl or List::Util functions of similar names, but which use
|
|
the block to control their behaviour. For example, the core Perl function
|
|
sort takes a list of values and returns them, sorted into order by their
|
|
string value. The "sort_by" function sorts them according to the string
|
|
value returned by the extra function, when given each value.
|
|
|
|
|
|
%prep
|
|
%setup -q -n %{cpan_name}-%{version}
|
|
|
|
|
|
%build
|
|
export PERL_MM_OPT=""
|
|
%{__perl} Build.PL --installdirs=vendor
|
|
./Build
|
|
|
|
|
|
%install
|
|
export PERL_MM_OPT=""
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
./Build install --destdir=$RPM_BUILD_ROOT --create_packlist=0
|
|
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
|
|
|
|
%{_fixperms} $RPM_BUILD_ROOT/*
|
|
|
|
pushd %{buildroot}
|
|
|
|
mkdir -p .%{perl_vendorlib}
|
|
mkdir -p .%{_mandir}
|
|
if [ -d root/perl5/lib ];then
|
|
mv root/perl5/lib .%{perl_vendorlib}
|
|
fi
|
|
if [ -d root/perl5/man ];then
|
|
mv root/perl5/man/* .%{_mandir}
|
|
fi
|
|
|
|
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
|
|
./Build test
|
|
|
|
|
|
%clean
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
%files -f filelist.lst
|
|
%defattr(-,root,root,-)
|
|
%doc Changes META.json README
|
|
%license LICENSE
|
|
%{perl_vendorlib}/*
|
|
|
|
|
|
%files help
|
|
%{_mandir}/*
|
|
|
|
|
|
%changelog
|
|
* Wed Jul 14 2021 ice-kylin <wminid@yeah.net> 0.11-1
|
|
- Initial package
|