debian/0000755000000000000000000000000012215337675007201 5ustar debian/source/0000755000000000000000000000000012215337554010475 5ustar debian/source/format0000644000000000000000000000001412215337554011703 0ustar 3.0 (quilt) debian/control0000644000000000000000000000162212215337675010605 0ustar Source: pgmemcache Section: database Priority: extra Maintainer: Marco Nenciarini Build-Depends: debhelper (>= 8), postgresql-server-dev-all (>= 148~), libmemcached-dev (>= 1), libsasl2-dev Standards-Version: 3.9.4 Homepage: http://pgfoundry.org/projects/pgmemcache/ Vcs-Git: git://anonscm.debian.org/pkg-postgresql/pgmemcache.gi Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-postgresql/pgmemcache.git;a=summary Package: postgresql-9.3-pgmemcache Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, postgresql-9.3 Description: PostgreSQL interface to memcached pgmemcache is an extension for PostgreSQL that provides an API to memcached through user-defined functions. . memcached is a high-performance, distributed memory object caching system, generic in nature, but originally intended for use in speeding up dynamic web applications by alleviating database load. debian/rules0000755000000000000000000000274012215337554010260 0ustar #!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # This has to be exported to make some magic below work. export DH_OPTIONS export SRCDIR = $(CURDIR) TARGET = $(CURDIR)/debian/pgmemcache-%v include /usr/share/postgresql-common/pgxs_debian_control.mk override_dh_auto_clean: debian/control +pg_buildext clean $(SRCDIR) $(TARGET) dh_clean override_dh_auto_build: +pg_buildext build $(SRCDIR) $(TARGET) "$(CFLAGS)" override_dh_auto_install: for v in `pg_buildext supported-versions $(SRCDIR)`; do \ TARGET=$(CURDIR)/debian/postgresql-$$v-pgmemcache ; \ mkdir -p $$TARGET/usr/lib/postgresql/$$v/lib ; \ install -m 644 $(CURDIR)/debian/pgmemcache-$$v/pgmemcache.so $$TARGET/usr/lib/postgresql/$$v/lib ; \ case $$v in \ 8.*|9.0) \ mkdir -p $$TARGET/usr/share/postgresql/$$v/contrib ; \ install -m 644 $(CURDIR)/pgmemcache.sql $$TARGET/usr/share/postgresql/$$v/contrib ; \ install -m 644 $(CURDIR)/uninstall_pgmemcache.sql $$TARGET/usr/share/postgresql/$$v/contrib ; \ ;; \ *) \ mkdir -p $$TARGET/usr/share/postgresql/$$v/extension ; \ install -m 644 $(CURDIR)/debian/pgmemcache-$$v/pgmemcache*.sql $$TARGET/usr/share/postgresql/$$v/extension ; \ install -m 644 $(CURDIR)/pgmemcache--unpackaged--2.0.6.sql $$TARGET/usr/share/postgresql/$$v/extension ; \ install -m 644 $(CURDIR)/pgmemcache.control $$TARGET/usr/share/postgresql/$$v/extension ; \ ;; \ esac \ done %: dh $@ .PHONY: debian/control debian/changelog0000644000000000000000000000161112215337554011046 0ustar pgmemcache (2.0.6-2) unstable; urgency=low * [74b3c34] Install files in debian/rules instead of using one static .install file per PostgreSQL version * [89341af] Update debian/pgversions to include recent PostgreSQL releases * [42ae7f7] Canonicalize Vcs-* fields in debian/control * [e25b4d2] Bump Standards-Version to 3.9.4 -- Marco Nenciarini Sun, 15 Sep 2013 16:06:29 +0200 pgmemcache (2.0.6-1.1) unstable; urgency=low * Non-maintainer upload. * Fix "FTBFS with libmemcached-dev-1.0.3-1": add patch libmemcached-1.0.patch from Michael Fladischer; make build dependency on libmemcached-dev versioned. (Closes: #658405) -- gregor herrmann Tue, 13 Mar 2012 19:01:16 +0100 pgmemcache (2.0.6-1) unstable; urgency=low * Initial release (Closes: #621729) -- Marco Nenciarini Wed, 31 Aug 2011 00:14:22 +0200 debian/pgversions0000644000000000000000000000000512215337554011312 0ustar 8.4+ debian/gbp.conf0000644000000000000000000000027012215337554010613 0ustar [DEFAULT] cleaner = /bin/true pristine-tar = True sign-tags = True [git-buildpackage] export-dir = ../build-area/ [git-dch] meta = True id-length = 7 [gbp-pq] patch-numbers = False debian/watch0000644000000000000000000000014612215337554010227 0ustar version=3 http://pgfoundry.org/frs/?group_id=1000052 /frs/download.php/[0-9]+/pgmemcache_(.+).tar.bz2 debian/patches/0000755000000000000000000000000012215337554010624 5ustar debian/patches/9.1-extension.patch0000644000000000000000000001066212215337554014173 0ustar From: Marco Nenciarini Date: Fri, 30 Sep 2011 00:27:43 +0200 Subject: 9.1-extension --- Makefile | 19 ++++++++++++++++++- pgmemcache--unpackaged--2.0.6.sql | 36 ++++++++++++++++++++++++++++++++++++ pgmemcache.control | 5 +++++ 3 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 pgmemcache--unpackaged--2.0.6.sql create mode 100644 pgmemcache.control diff --git a/Makefile b/Makefile index 6e746f0..aa774fc 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,4 @@ +EXTENSION = pgmemcache MODULE_big = pgmemcache PGMC_VERSION = 2.0.6 @@ -5,7 +6,23 @@ OBJS = pgmemcache.o DATA_built = $(MODULE_big).sql SHLIB_LINK = -lmemcached -lsasl2 -PGXS := $(shell pg_config --pgxs) +ifndef PG_CONFIG +PG_CONFIG = pg_config +endif + +BUILD_EXTENSION = $(shell $(PG_CONFIG) --version | grep -qE " 8\.| 9\.0" && echo no || echo yes) + +ifeq ($(BUILD_EXTENSION),yes) +all: pgmemcache--$(PGMC_VERSION).sql + +pgmemcache--$(PGMC_VERSION).sql: pgmemcache.sql + cp $< $@ + +DATA = pgmemcache--unpackaged--$(PGMC_VERSION).sql pgmemcache--$(PGMC_VERSION).sql +EXTRA_CLEAN = pgmemcache--$(PGMC_VERSION).sql +endif + +PGXS := $(shell $(PG_CONFIG) --pgxs) include $(PGXS) # Build a release tarball. To make a release, update PGMC_VERSION, adjust diff --git a/pgmemcache--unpackaged--2.0.6.sql b/pgmemcache--unpackaged--2.0.6.sql new file mode 100644 index 0000000..16ace72 --- /dev/null +++ b/pgmemcache--unpackaged--2.0.6.sql @@ -0,0 +1,36 @@ +ALTER EXTENSION pgmemcache ADD FUNCTION memcache_server_add(TEXT); +ALTER EXTENSION pgmemcache ADD FUNCTION memcache_add(TEXT, TEXT, INTERVAL); +ALTER EXTENSION pgmemcache ADD FUNCTION memcache_add(TEXT, TEXT, TIMESTAMPTZ); +ALTER EXTENSION pgmemcache ADD FUNCTION memcache_add(TEXT, TEXT); +ALTER EXTENSION pgmemcache ADD FUNCTION memcache_get(TEXT); +ALTER EXTENSION pgmemcache ADD FUNCTION memcache_get(BYTEA); +ALTER EXTENSION pgmemcache ADD FUNCTION memcache_get_multi(IN TEXT[], OUT key TEXT, OUT value TEXT); +ALTER EXTENSION pgmemcache ADD FUNCTION memcache_get_multi(IN BYTEA[], OUT key TEXT, OUT value TEXT); +ALTER EXTENSION pgmemcache ADD FUNCTION memcache_decr(TEXT, INT4); +ALTER EXTENSION pgmemcache ADD FUNCTION memcache_decr(TEXT); +ALTER EXTENSION pgmemcache ADD FUNCTION memcache_incr(TEXT, INT4); +ALTER EXTENSION pgmemcache ADD FUNCTION memcache_incr(TEXT); +ALTER EXTENSION pgmemcache ADD FUNCTION memcache_delete(TEXT, INTERVAL); +ALTER EXTENSION pgmemcache ADD FUNCTION memcache_delete(TEXT); +ALTER EXTENSION pgmemcache ADD FUNCTION memcache_flush_all(); +ALTER EXTENSION pgmemcache ADD FUNCTION memcache_replace(TEXT, TEXT, INTERVAL); +ALTER EXTENSION pgmemcache ADD FUNCTION memcache_replace(TEXT, TEXT, TIMESTAMPTZ); +ALTER EXTENSION pgmemcache ADD FUNCTION memcache_replace(TEXT, TEXT); +ALTER EXTENSION pgmemcache ADD FUNCTION memcache_set(TEXT, TEXT, INTERVAL); +ALTER EXTENSION pgmemcache ADD FUNCTION memcache_set(TEXT, TEXT, TIMESTAMPTZ); +ALTER EXTENSION pgmemcache ADD FUNCTION memcache_set(TEXT, TEXT); +ALTER EXTENSION pgmemcache ADD FUNCTION memcache_set(BYTEA, TEXT); +ALTER EXTENSION pgmemcache ADD FUNCTION memcache_set(TEXT, BYTEA); +ALTER EXTENSION pgmemcache ADD FUNCTION memcache_prepend(TEXT, TEXT, INTERVAL); +ALTER EXTENSION pgmemcache ADD FUNCTION memcache_prepend(TEXT, TEXT, TIMESTAMPTZ); +ALTER EXTENSION pgmemcache ADD FUNCTION memcache_prepend(TEXT, TEXT); +ALTER EXTENSION pgmemcache ADD FUNCTION memcache_append(TEXT, TEXT, INTERVAL); +ALTER EXTENSION pgmemcache ADD FUNCTION memcache_append(TEXT, TEXT, TIMESTAMPTZ); +ALTER EXTENSION pgmemcache ADD FUNCTION memcache_append(TEXT, TEXT); +ALTER EXTENSION pgmemcache ADD FUNCTION memcache_prepend(TEXT, TEXT, INTERVAL); +ALTER EXTENSION pgmemcache ADD FUNCTION memcache_prepend(TEXT, TEXT, TIMESTAMPTZ); +ALTER EXTENSION pgmemcache ADD FUNCTION memcache_prepend(TEXT, TEXT); +ALTER EXTENSION pgmemcache ADD FUNCTION memcache_append(TEXT, TEXT, INTERVAL); +ALTER EXTENSION pgmemcache ADD FUNCTION memcache_append(TEXT, TEXT, TIMESTAMPTZ); +ALTER EXTENSION pgmemcache ADD FUNCTION memcache_append(TEXT, TEXT); +ALTER EXTENSION pgmemcache ADD FUNCTION memcache_stats(); diff --git a/pgmemcache.control b/pgmemcache.control new file mode 100644 index 0000000..3ff61ea --- /dev/null +++ b/pgmemcache.control @@ -0,0 +1,5 @@ +# pgmemcache extension +comment = 'A PostgreSQL API based on libmemcached to interface with memcached.' +default_version = '2.0.6' +module_pathname = '$libdir/pgmemcache' +relocatable = true debian/patches/libmemcached-1.0.patch0000644000000000000000000000240112215337554014533 0ustar From: Michael Fladischer Date: Sun, 15 Sep 2013 15:26:11 +0200 Subject: libmemcached-1.0 Fix for the libmemcached-1.0 API issue reported in http://bugs.debian.org/658405 --- pgmemcache.c | 2 ++ pgmemcache.h | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pgmemcache.c b/pgmemcache.c index dfdc92a..807fd35 100644 --- a/pgmemcache.c +++ b/pgmemcache.c @@ -28,6 +28,7 @@ static char *memcache_default_behavior = ""; static char *memcache_sasl_authentication_username = ""; static char *memcache_sasl_authentication_password = ""; +#if 0 static sasl_callback_t sasl_callbacks[] = { { SASL_CB_USER, &get_sasl_username, NULL}, @@ -35,6 +36,7 @@ static sasl_callback_t sasl_callbacks[] = { SASL_CB_PASS, &get_sasl_password, NULL}, { SASL_CB_LIST_END, NULL, NULL} }; +#endif void _PG_init(void) { diff --git a/pgmemcache.h b/pgmemcache.h index 79868ff..92d3415 100644 --- a/pgmemcache.h +++ b/pgmemcache.h @@ -23,10 +23,8 @@ #include "utils/guc.h" #include "utils/memutils.h" #include "utils/lsyscache.h" -#include -#include -#include #include +#include #undef PACKAGE_BUGREPORT #undef PACKAGE_NAME debian/patches/series0000644000000000000000000000005312215337554012037 0ustar 9.1-extension.patch libmemcached-1.0.patch debian/copyright0000644000000000000000000000433512215337554011135 0ustar Format: http://dep.debian.net/deps/dep5 Upstream-Name: pgmemcache Source: http://pgfoundry.org/projects/pgmemcache/ Files: * Copyright: 2004-2005 Sean Chittenden 2007 Neil Conway 2007 Open Technology Group, Inc. 2008-2010 Hannu Valtonen License: MIT/X Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: . The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Files: debian/* Copyright: 2011 Marco Nenciarini License: GPL-2.0+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see . On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". debian/control.in0000644000000000000000000000163512215337554011212 0ustar Source: pgmemcache Section: database Priority: extra Maintainer: Marco Nenciarini Build-Depends: debhelper (>= 8), postgresql-server-dev-all (>= 148~), libmemcached-dev (>= 1), libsasl2-dev Standards-Version: 3.9.4 Homepage: http://pgfoundry.org/projects/pgmemcache/ Vcs-Git: git://anonscm.debian.org/pkg-postgresql/pgmemcache.gi Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-postgresql/pgmemcache.git;a=summary Package: postgresql-PGVERSION-pgmemcache Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, postgresql-PGVERSION Description: PostgreSQL interface to memcached pgmemcache is an extension for PostgreSQL that provides an API to memcached through user-defined functions. . memcached is a high-performance, distributed memory object caching system, generic in nature, but originally intended for use in speeding up dynamic web applications by alleviating database load. debian/compat0000644000000000000000000000000212215337554010373 0ustar 8