commit af34c75358aad7b813795c2aac12c7c5eeb536b1 Author: Petr Písař <ppisar@xxxxxxxxxx> Date: Wed Apr 25 17:07:56 2012 +0200 Import .gitignore | 1 + perl-constant-defer.spec | 57 ++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 59 insertions(+), 0 deletions(-) --- diff --git a/.gitignore b/.gitignore index e69de29..24fb515 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/constant-defer-5.tar.gz diff --git a/perl-constant-defer.spec b/perl-constant-defer.spec new file mode 100644 index 0000000..d7b0b38 --- /dev/null +++ b/perl-constant-defer.spec @@ -0,0 +1,57 @@ +Name: perl-constant-defer +Version: 5 +Release: 1%{?dist} +Summary: Constant subs with deferred value calculation +License: GPLv3+ +Group: Development/Libraries +URL: http://search.cpan.org/dist/constant-defer/ +Source0: http://www.cpan.org/authors/id/K/KR/KRYDE/constant-defer-%{version}.tar.gz +BuildArch: noarch +# The inc/my_pod2html is not called +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(lib) +# Run-Time: +BuildRequires: perl(Carp) +# Tests: +BuildRequires: perl(Devel::FindRef) +BuildRequires: perl(Exporter) +BuildRequires: perl(Scalar::Util) +BuildRequires: perl(Test) +BuildRequires: perl(Test::More) +# Optionals tests: +BuildRequires: perl(Data::Dumper) +BuildRequires: perl(Devel::StackTrace) +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) +Requires: perl(Carp) + +%description +constant::defer creates a subroutine which on the first call runs given +code to calculate its value, and on the second and subsequent calls just +returns that value, like a constant. The value code is discarded once run, +allowing it to be garbage collected. + +%prep +%setup -q -n constant-defer-%{version} +chmod -x examples/* + +%build +%{__perl} Makefile.PL INSTALLDIRS=vendor +make %{?_smp_mflags} + +%install +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/* + +%check +make test + +%files +%doc Changes COPYING examples README +%{perl_vendorlib}/* +%{_mandir}/man3/* + +%changelog +* Wed Apr 25 2012 Petr Pisar <ppisar@xxxxxxxxxx> 5-1 +- Specfile autogenerated by cpanspec 1.78. diff --git a/sources b/sources index e69de29..89e633c 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +519232b64896395b84b41f5300d1cab3 constant-defer-5.tar.gz -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list perl-devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/perl-devel