[perl-Compress-Snappy] Initial import (#1183294).

David Dick ddick at fedoraproject.org
Sat Feb 14 08:40:12 UTC 2015


commit cee02bb2c4660bdd75f7490a3753a3b8077e9cfb
Author: David Dick <ddick at cpan.org>
Date:   Sat Feb 14 19:39:50 2015 +1100

    Initial import (#1183294).

 .gitignore                     |    1 +
 compress_snappy_unbundle.patch |   25 +++++++++++++++++
 perl-Compress-Snappy.spec      |   57 ++++++++++++++++++++++++++++++++++++++++
 sources                        |    1 +
 4 files changed, 84 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..de91af3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/Compress-Snappy-0.23.tar.gz
diff --git a/compress_snappy_unbundle.patch b/compress_snappy_unbundle.patch
new file mode 100644
index 0000000..2d3c893
--- /dev/null
+++ b/compress_snappy_unbundle.patch
@@ -0,0 +1,25 @@
+diff -Naur old/Makefile.PL new/Makefile.PL
+--- old/Makefile.PL	2013-10-13 18:26:49.000000000 +1100
++++ new/Makefile.PL	2015-01-18 18:46:24.594352156 +1100
+@@ -31,6 +31,8 @@
+     },
+ 
+     DEFINE => $ctz,
++    LIBS   => '-lcsnappy',
++
+ 
+     dist  => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
+     clean => { FILES    => 'Compress-Snappy-*' },
+diff -Naur old/Snappy.xs new/Snappy.xs
+--- old/Snappy.xs	2012-09-09 03:23:49.000000000 +1000
++++ new/Snappy.xs	2015-01-18 18:53:57.220381008 +1100
+@@ -7,8 +7,7 @@
+ #define NEED_sv_2pvbyte
+ #include "ppport.h"
+ 
+-#include "src/csnappy_compress.c"
+-#include "src/csnappy_decompress.c"
++#include <csnappy.h>
+ 
+ MODULE = Compress::Snappy    PACKAGE = Compress::Snappy
+ 
diff --git a/perl-Compress-Snappy.spec b/perl-Compress-Snappy.spec
new file mode 100644
index 0000000..548f419
--- /dev/null
+++ b/perl-Compress-Snappy.spec
@@ -0,0 +1,57 @@
+Name:           perl-Compress-Snappy
+Version:        0.23
+Release:        1%{?dist}
+Summary:        Perl interface to Google's Snappy (de)compressor
+License:        GPL+ or Artistic
+Group:          Development/Libraries
+URL:            http://search.cpan.org/dist/Compress-Snappy/
+Source0:        http://www.cpan.org/modules/by-module/Compress/Compress-Snappy-%{version}.tar.gz
+Patch1:         compress_snappy_unbundle.patch
+BuildRequires:  csnappy-devel
+BuildRequires:  perl
+BuildRequires:  perl(Devel::CheckLib)
+BuildRequires:  perl(Exporter) >= 5.57
+BuildRequires:  perl(ExtUtils::MakeMaker) >= 6.52
+BuildRequires:  perl(overload)
+BuildRequires:  perl(strict)
+BuildRequires:  perl(Test::More) >= 0.82
+BuildRequires:  perl(warnings)
+BuildRequires:  perl(XSLoader)
+Requires:       perl(Exporter) >= 5.57
+Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
+
+%global __requires_exclude %{?__requires_exclude:__requires_exclude|}^perl\\(Exporter\\)$
+%description
+The Compress::Snappy module provides an interface to Google's Snappy
+(de)compressor.
+
+%prep
+%setup -q -n Compress-Snappy-%{version}
+%patch1 -p1
+chmod -c -x ex/*
+rm -Rf src
+
+%build
+perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
+make %{?_smp_mflags}
+
+%install
+make pure_install DESTDIR=$RPM_BUILD_ROOT
+
+find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
+find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \;
+
+%{_fixperms} $RPM_BUILD_ROOT/*
+
+%check
+make test
+
+%files
+%doc Changes README ex
+%{perl_vendorarch}/auto/*
+%{perl_vendorarch}/Compress*
+%{_mandir}/man3/*
+
+%changelog
+* Sun Jan 18 2015 David Dick <ddick at cpan.org> - 0.23-1
+- Initial release
diff --git a/sources b/sources
index e69de29..bd353b1 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+b89a16b79b123b0c275e2052235c4e88  Compress-Snappy-0.23.tar.gz


More information about the scm-commits mailing list