[libmemcached-libmemcached-perl] 03/04: Add test, ensure patches unapplied
Christopher Hoskin
christopher.hoskin at gmail.com
Wed Oct 7 21:00:54 UTC 2015
This is an automated email from the git hooks/post-receive script.
grinorcole-guest pushed a commit to branch master
in repository libmemcached-libmemcached-perl.
commit c434de15c5fabe576d3a555bd38b4fb4ca482e19
Author: Christopher Hoskin <christopher.hoskin at gmail.com>
Date: Wed Oct 7 21:27:42 2015 +0100
Add test, ensure patches unapplied
---
Makefile.PL | 32 +++++++++++++---------------
debian/control | 12 +++++++----
debian/copyright | 12 +++--------
debian/libmemcached-libmemcached-perl.docs | 1 -
debian/patches/use-system-libmemcached.patch | 6 ++++++
debian/rules | 19 +++++++++++++++++
6 files changed, 51 insertions(+), 31 deletions(-)
diff --git a/Makefile.PL b/Makefile.PL
index 77d161d..5aa00fd 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -31,17 +31,15 @@ $Data::Dumper::Sortkeys = 1;
my $lmcd_api_ver = "1.0"; # eg $lmcd_src/libmemcached-$lmcd_api_ver/
my $lmcd_inst = getcwd()."/src_inst";
-my $lmcd_built_lib = "/usr/lib/x86_64-linux-gnu/libmemcached.so";
+my $lmcd_built_lib = "$lmcd_inst/lib/libmemcached$Config{lib_ext}";
my $is_developer = (-d ".svn" || -d ".git");
-#my ($lmcd_h) = eval { build_libmemcached() };
-#if ($@) {
-# warn "Unable to build libmemcached: $@\n";
-# warn "Aborted.\n";
-# exit 0; # tell cpan testers that this is not a failure
-#}
-extract_libmemcached_constants();
-extract_libmemcached_functions();
+my ($lmcd_h) = eval { build_libmemcached() };
+if ($@) {
+ warn "Unable to build libmemcached: $@\n";
+ warn "Aborted.\n";
+ exit 0; # tell cpan testers that this is not a failure
+}
my %opts;
if (my $gccversion = $Config{gccversion}) { # ask gcc to be more pedantic
@@ -78,13 +76,13 @@ WriteMakefile(
AUTHOR => 'Tim Bunce <Tim.Bunce at pobox.com>',
VERSION_FROM => 'libmemcached.pm',
ABSTRACT_FROM => 'libmemcached.pm',
-# INC => "-I$lmcd_inst/include",
-# # We want to link to *our* private libmemcached and not one that
-# # might already be installed on the system. The LIBS config gets
-# # appended to the link command line, so if we used "-L$dir -lmemcached"
-# # then the installed lib would get preference over ours.
-# # So we explicitly refer to our static library. That also avoids the
-# # need to worry about what library might get used at runtime.
+ INC => "-I$lmcd_inst/include",
+ # We want to link to *our* private libmemcached and not one that
+ # might already be installed on the system. The LIBS config gets
+ # appended to the link command line, so if we used "-L$dir -lmemcached"
+ # then the installed lib would get preference over ours.
+ # So we explicitly refer to our static library. That also avoids the
+ # need to worry about what library might get used at runtime.
LDFROM => '$(OBJECT)'." $lmcd_built_lib",
PREREQ_PM => {
'Test::More' => 0,
@@ -148,7 +146,7 @@ realclean ::
-cd $(LMCD_SRC) && $(MAKE) distclean
-#libmemcached.c : $(XSUBPPDIR)/ParseXS.pm typemap
+libmemcached.c : $(XSUBPPDIR)/ParseXS.pm typemap
$(OBJECT) : $(LMCD_BUILT_LIB)
diff --git a/debian/control b/debian/control
index 3ccd6fe..916a6ac 100644
--- a/debian/control
+++ b/debian/control
@@ -5,7 +5,13 @@ Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
Uploaders: Christopher Hoskin <christopher.hoskin at gmail.com>
Build-Depends: debhelper (>= 9.20120312~),
perl,
- libmemcached-dev (= 1.0.18-4)
+ libmemcached-dev (= 1.0.18-4),
+ memcached,
+ net-tools,
+ procps,
+ libpod-coverage-perl,
+ libtest-pod-perl,
+ libtest-pod-coverage-perl
Standards-Version: 3.9.6
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-perl/packages/libmemcached-libmemcached-perl.git
Vcs-Git: git://anonscm.debian.org/pkg-perl/packages/libmemcached-libmemcached-perl.git
@@ -15,7 +21,7 @@ Testsuite: autopkgtest-pkg-perl
Package: libmemcached-libmemcached-perl
Architecture: any
Depends: ${misc:Depends}, ${perl:Depends}, ${shlibs:Depends}
-Description: Thin fast full interface to the libmemcached client API
+Description: thin, fast, full interface to the libmemcached client API
Memcached::libmemcached is a very thin, highly efficient, wrapper around the
libmemcached library. It's implemented almost entirely in C.
.
@@ -34,5 +40,3 @@ Description: Thin fast full interface to the libmemcached client API
- Man pages written up on entire API.
.
- Implements both modulo and consistent hashing solutions.
- .
- This description was automagically extracted from the module by dh-make-perl.
diff --git a/debian/copyright b/debian/copyright
index 1432476..69eb1cf 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -2,14 +2,6 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Source: https://metacpan.org/release/Memcached-libmemcached
Upstream-Contact: Tim Bunce <Tim.Bunce at pobox.com>
Upstream-Name: Memcached-libmemcached
-DISCLAIMER: This copyright info was automatically extracted
- from the perl module. It may not be accurate, so you better
- check the module sources in order to ensure the module for its
- inclusion in Debian or for general legal information. Please,
- if licensing information is incorrectly generated, file a bug
- on dh-make-perl.
- NOTE: Don't forget to remove this disclaimer once you are happy
- with this file.
Files: *
Copyright: 2008, Daisuke Maki <daisuke at endeworks.jp>
@@ -23,9 +15,11 @@ License: Artistic or GPL-1+
Files: lib/Memcached/libmemcached/*
Copyright: 2010, Brian Aker <brian at tangent.org>
+License: Artistic or GPL-1+
Files: lib/Memcached/libmemcached/memcached_user_data.pm lib/Memcached/libmemcached/memcached_memory_allocators.pm lib/Memcached/libmemcached/memcached_pool.pm lib/Memcached/libmemcached/memcached_sasl.pm lib/Memcached/libmemcached/memcached_flush_buffers.pm
Copyright: Trond Norbye <trond.norbye at gmail.com>
+License: Artistic or GPL-1+
Files: ppport.h
Copyright: 2004-2007, Marcus Holland-Moritz <mhx-cpan at gmx.net>
@@ -74,7 +68,7 @@ Copyright: 1990, 1993, The Regents of the University of California
2010, Stewart Smith
License: BSD-3-clause
-Files: lib/ExtUtils/*
+Files: t/lib/ExtUtils/*
Copyright: 2002-2003, Ken Williams <ken at mathforum.org>
Larry Wall and the Perl 5 Porters
License: Artistic or GPL-1+
diff --git a/debian/libmemcached-libmemcached-perl.docs b/debian/libmemcached-libmemcached-perl.docs
index 41d7396..ea8704f 100644
--- a/debian/libmemcached-libmemcached-perl.docs
+++ b/debian/libmemcached-libmemcached-perl.docs
@@ -5,5 +5,4 @@ src/libmemcached/README
src/libmemcached/README.FIRST
src/libmemcached/NEWS
src/libmemcached/TODO
-src/libmemcached/README.win32
src/libmemcached/libmemcached/memcached/README.txt
diff --git a/debian/patches/use-system-libmemcached.patch b/debian/patches/use-system-libmemcached.patch
index e40fa7c..e75cbf9 100644
--- a/debian/patches/use-system-libmemcached.patch
+++ b/debian/patches/use-system-libmemcached.patch
@@ -1,3 +1,9 @@
+Description: Use the packaged libmemcached
+ Uses the libmemcached packaged for Debian rather than compiling the bundled
+ source code.
+Author: Christopher Hoskin <christopher.hoskin at gmail.com>
+Forwarded: not-needed
+Last-Update: 2015-10-07
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -31,15 +31,17 @@
diff --git a/debian/rules b/debian/rules
index 2d33f6a..24bd62d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,4 +1,23 @@
#!/usr/bin/make -f
+BUILDHOME = $(CURDIR)/debian/build
+PIDFILE = $(BUILDHOME)/memcached.pid
+WHOAMI = $(shell whoami)
+PORT := $(shell /bin/netstat -want | perl -w -e 'while (<>) { $$used{$$1}=1 if /127\.0\.0\.1:(\d+)/;}; $$port = 20000; while ($$used{$$port}) { $$port++ }; print "$$port\n";')
+
+
%:
dh $@
+
+override_dh_auto_test:
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+ mkdir -p $(BUILDHOME)
+ memcached -u $(WHOAMI) -p $(PORT) -P $(PIDFILE) -d
+ export PERL_LIBMEMCACHED_TEST_SERVERS=127.0.0.1:$(PORT);\
+ dh_auto_test
+ [ ! -s $(PIDFILE) ] || /bin/kill `cat $(PIDFILE)`
+endif
+
+override_dh_clean:
+ dh_clean
+ rm -rf $(BUILDHOME)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmemcached-libmemcached-perl.git
More information about the Pkg-perl-cvs-commits
mailing list