[perl-File-Slurp-Tiny] Initial import (perl-File-Slurp-Tiny-0.003-2)
Paul Howarth
pghmcfc at fedoraproject.org
Wed Feb 26 13:42:56 UTC 2014
commit 2601f819d5854fc0bce44fefe0433528586b231c
Author: Paul Howarth <paul at city-fan.org>
Date: Wed Feb 26 13:34:08 2014 +0000
Initial import (perl-File-Slurp-Tiny-0.003-2)
This module provides functions for fast and correct slurping and spewing
of files.
.gitignore | 1 +
File-Slurp-Tiny-0.003-old-Test::More.patch | 16 ++++++
perl-File-Slurp-Tiny.spec | 77 ++++++++++++++++++++++++++++
sources | 1 +
4 files changed, 95 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..e0976da 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/File-Slurp-Tiny-[0-9.]*.tar.gz
diff --git a/File-Slurp-Tiny-0.003-old-Test::More.patch b/File-Slurp-Tiny-0.003-old-Test::More.patch
new file mode 100644
index 0000000..b8f8a38
--- /dev/null
+++ b/File-Slurp-Tiny-0.003-old-Test::More.patch
@@ -0,0 +1,16 @@
+--- t/10-basics.t
++++ t/10-basics.t
+@@ -7,7 +7,7 @@
+ use File::Slurp::Tiny qw/read_file read_lines write_file read_dir/;
+ use File::Temp qw/tempdir/;
+
+-use Test::More;
++use Test::More tests => 10;
+
+ my $content = do { local $/; open my $fh, '<:raw', $0; <$fh> };
+ is(read_file($0), $content, 'read_file() works');
+@@ -33,4 +33,3 @@
+ write_file($filename, $content, append => 1);
+ is(read_file($filename), $content x 2, 'write_file + readfile = noop');
+
+-done_testing;
diff --git a/perl-File-Slurp-Tiny.spec b/perl-File-Slurp-Tiny.spec
new file mode 100644
index 0000000..717e2a9
--- /dev/null
+++ b/perl-File-Slurp-Tiny.spec
@@ -0,0 +1,77 @@
+# Test suite needs patching if we have Test::More < 0.88
+%global old_test_more %(perl -MTest::More -e 'print (($Test::More::VERSION) < 0.88 ? 1 : 0);' 2>/dev/null || echo 0)
+
+Name: perl-File-Slurp-Tiny
+Version: 0.003
+Release: 2%{?dist}
+Summary: A simple, sane and efficient file slurper
+Group: Development/Libraries
+License: GPL+ or Artistic
+URL: http://search.cpan.org/dist/File-Slurp-Tiny/
+Source0: http://search.cpan.org/CPAN/authors/id/L/LE/LEONT/File-Slurp-Tiny-%{version}.tar.gz
+Patch0: File-Slurp-Tiny-0.003-old-Test::More.patch
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
+BuildArch: noarch
+# Build
+BuildRequires: perl(ExtUtils::MakeMaker) >= 6.30
+# Module
+BuildRequires: perl(Carp)
+BuildRequires: perl(Exporter) >= 5.57
+BuildRequires: perl(File::Spec::Functions)
+BuildRequires: perl(FileHandle)
+BuildRequires: perl(strict)
+BuildRequires: perl(warnings)
+# Test Suite
+BuildRequires: perl(File::Spec)
+BuildRequires: perl(File::Temp)
+BuildRequires: perl(IO::Handle)
+BuildRequires: perl(IPC::Open3)
+BuildRequires: perl(Test::More)
+# Release Tests
+BuildRequires: perl(Pod::Coverage::TrustPod)
+BuildRequires: perl(Test::Pod)
+BuildRequires: perl(Test::Pod::Coverage)
+# Runtime
+Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
+
+%description
+This module provides functions for fast and correct slurping and spewing.
+
+%prep
+%setup -q -n File-Slurp-Tiny-%{version}
+
+# Test suite needs patching if we have Test::More < 0.88
+%if %{old_test_more}
+%patch0
+%endif
+
+%build
+perl Makefile.PL INSTALLDIRS=vendor
+make %{?_smp_mflags}
+
+%install
+rm -rf %{buildroot}
+make pure_install DESTDIR=%{buildroot}
+find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
+%{_fixperms} %{buildroot}
+
+# Don't want to ship the benchmark script
+rm %{buildroot}%{perl_vendorlib}/File/Slurp/benchmark.pl
+
+%check
+make test RELEASE_TESTING=1
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%doc Changes LICENSE README
+%{perl_vendorlib}/File/
+%{_mandir}/man3/File::Slurp::Tiny.3pm*
+
+%changelog
+* Thu Feb 13 2014 Paul Howarth <paul at city-fan.org> - 0.003-2
+- Sanitize for Fedora submission
+
+* Thu Feb 13 2014 Paul Howarth <paul at city-fan.org> - 0.003-1
+- Initial RPM version
diff --git a/sources b/sources
index e69de29..3a15420 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+b3c1c485b5bc40f7e94acfd983d7a871 File-Slurp-Tiny-0.003.tar.gz
More information about the scm-commits
mailing list