From a4aacfe213241dc1231a65a97013f75b0f141ea2 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 6 Jan 2024 09:50:56 +0100 Subject: [PATCH] perl 5.16 mass rebuild [release 0.13-2mamba;Tue Nov 13 2012] --- README.md | 10 +++++ perl-UNIVERSAL-require.spec | 90 +++++++++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+) create mode 100644 perl-UNIVERSAL-require.spec diff --git a/README.md b/README.md index 159eab2..013ce31 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,12 @@ # perl-UNIVERSAL-require +If you've ever had to do this... + + eval "require $module"; + +to get around the bareword caveats on require(), this module is for you. It creates a universal require() class method that will work with every Perl module and its secure. So instead of doing some arcane eval() work, you can do this: + + $module->require; + +It doesn't save you much typing, but it'll make alot more sense to someone who's not a ninth level Perl acolyte + diff --git a/perl-UNIVERSAL-require.spec b/perl-UNIVERSAL-require.spec new file mode 100644 index 0000000..c952e9a --- /dev/null +++ b/perl-UNIVERSAL-require.spec @@ -0,0 +1,90 @@ +%define perl_major_ver %(eval `perl -V:version`; echo ${version%*.[0-9]*}.0) + +Name: perl-UNIVERSAL-require +Version: 0.13 +Release: 2mamba +Summary: UNIVERSAL::require - require() modules from a variable +Group: System/Libraries/Perl +Vendor: openmamba +Distribution: openmamba +Packager: Automatic Build System +URL: http://www.cpan.org +Source: http://search.cpan.org/CPAN/authors/id/M/MS/MSCHWERN/UNIVERSAL-require-%{version}.tar.gz +License: GPL, Artistic +Requires: perl >= %perl_major_ver +BuildRequires: perl-devel >= %perl_major_ver +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +If you've ever had to do this... + + eval "require $module"; + +to get around the bareword caveats on require(), this module is for you. It creates a universal require() class method that will work with every Perl module and its secure. So instead of doing some arcane eval() work, you can do this: + + $module->require; + +It doesn't save you much typing, but it'll make alot more sense to someone who's not a ninth level Perl acolyte + +%prep + +%setup -q -n UNIVERSAL-require-%{version} + +%define _use_internal_dependency_generator 0 +%define __find_provides %{_builddir}/UNIVERSAL-require-%{version}/find_provides.sh +%define __find_requires %{_libdir}/rpm/find-requires + +cat > find_provides.sh << _EOF +#! /bin/sh +%{_prefix}/lib/rpm/find-provides %{buildroot} %{_target_cpu} | grep -v "perl(UNIVERSAL)" + + +#cat << EOF | %{_prefix}/lib/rpm/find-provides %{buildroot} %{_target_cpu} +#%{buildroot}%{_libdir}/OpenOffice/program/libcppu* +#%{buildroot}%{_libdir}/OpenOffice/program/libsal* +#%{buildroot}%{_libdir}/OpenOffice/program/libstl* +#EOF +_EOF + +chmod +x find_provides.sh + +%build +perl Makefile.PL PREFIX=%{_prefix} INSTALLDIRS=vendor +%make +%make test + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%makeinstall_perl +packlist=`find %{buildroot} -name .packlist` +[ -z "$packlist" ] && exit 1 || cat $packlist | \ + sed "s,%buildroot,,g;s,.*/man/.*,&.gz,g" | \ + sort -u > .packlist && rm $packlist + +strid=`echo $packlist | sed 's,.*auto\(.*\)/.packlist,\1,'` +for dir in `find %{buildroot} -type d | grep $strid`; do + echo "%dir ${dir#%buildroot}" >> .packlist +done + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +rm -f .packlist + +%files -f .packlist +%defattr(-,root,root) + +%changelog +* Tue Nov 13 2012 Silvan Calarco 0.13-2mamba +- perl 5.16 mass rebuild + +* Fri Apr 03 2009 Silvan Calarco 0.13-1mamba +- automatic update by autodist + +* Fri Nov 21 2008 Silvan Calarco 0.11-3mamba +- remove conflicting provide for perl(UNIVERSAL) + +* Wed Nov 05 2008 Silvan Calarco 0.11-2mamba +- automatic rebuild by autodist + +* Mon Oct 20 2008 gil 0.11-1mamba +- package created by autospec