diff options
author | clsung <clsung@FreeBSD.org> | 2007-09-27 11:02:34 +0800 |
---|---|---|
committer | clsung <clsung@FreeBSD.org> | 2007-09-27 11:02:34 +0800 |
commit | 79635f13eb7a26bfadb23b8753bca95e9800e7d3 (patch) | |
tree | ddd48c600f90534859d05439e2df15b11c79d9fb /databases | |
parent | 5ea7df5760a1bafea78cec727ca27586b30aa2b3 (diff) | |
download | freebsd-ports-gnome-79635f13eb7a26bfadb23b8753bca95e9800e7d3.tar.gz freebsd-ports-gnome-79635f13eb7a26bfadb23b8753bca95e9800e7d3.tar.zst freebsd-ports-gnome-79635f13eb7a26bfadb23b8753bca95e9800e7d3.zip |
Memcachedb is a distributed storage system designed for persistent. We
simplely hacked from memcached and tugela. But neither of them.
Memcachedb is not a cache solution, it is a persistent solution for
high-frequency writing and reading. It conforms to memcache protocol
(not completed, see below), so any memcached client can have
connectivity with memcachedb. Memcachedb uses Berkeley DB as a storing
backend, so lots of features including transaction and replication are
supported.
WWW: http://code.google.com/p/memcachedb/
PR: ports/116548
Submitted by: Gea-Suan Lin <gslin at gslin.org>
Diffstat (limited to 'databases')
-rw-r--r-- | databases/Makefile | 1 | ||||
-rw-r--r-- | databases/memcachedb/Makefile | 34 | ||||
-rw-r--r-- | databases/memcachedb/distinfo | 3 | ||||
-rw-r--r-- | databases/memcachedb/files/memcachedb.in | 35 | ||||
-rw-r--r-- | databases/memcachedb/files/patch-Makefile | 23 | ||||
-rw-r--r-- | databases/memcachedb/files/patch-memcachedb.c | 10 | ||||
-rw-r--r-- | databases/memcachedb/files/patch-memcachedb.h | 13 | ||||
-rw-r--r-- | databases/memcachedb/pkg-descr | 10 | ||||
-rw-r--r-- | databases/memcachedb/pkg-plist | 4 |
9 files changed, 133 insertions, 0 deletions
diff --git a/databases/Makefile b/databases/Makefile index 1b9f9667e23c..52acbce00cb1 100644 --- a/databases/Makefile +++ b/databases/Makefile @@ -121,6 +121,7 @@ SUBDIR += mantis SUBDIR += mdbtools SUBDIR += memcached + SUBDIR += memcachedb SUBDIR += metakit SUBDIR += mird SUBDIR += mrtg-mysql-load diff --git a/databases/memcachedb/Makefile b/databases/memcachedb/Makefile new file mode 100644 index 000000000000..bfbaca710c3e --- /dev/null +++ b/databases/memcachedb/Makefile @@ -0,0 +1,34 @@ +# New ports collection makefile for: memcachedb +# Date created: 2007-09-22 +# Whom: Gea-Suan Lin <gslin@gslin.org> +# +# $FreeBSD$ +# + +PORTNAME= memcachedb +PORTVERSION= 0.0.2 +CATEGORIES= databases +MASTER_SITES= http://memcachedb.googlecode.com/files/ + +MAINTAINER= gslin@gslin.org +COMMENT= Distributed storage system designed for persistent + +LIB_DEPENDS= event:${PORTSDIR}/devel/libevent + +USE_BDB= 42+ +USE_RC_SUBR= ${PORTNAME} +USE_DOS2UNIX= YES + +post-patch: + ${REINPLACE_CMD} \ + -e "s,%%BDB_LIB_NAME%%,${BDB_LIB_NAME}," \ + -e "s,%%BDB_LIB_DIR%%,${BDB_LIB_DIR}," \ + -e "s,%%BDB_INCLUDE_DIR%%,${BDB_INCLUDE_DIR}," \ + ${WRKSRC}/Makefile + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/memcachedb ${PREFIX}/sbin + ${MKDIR} /var/db/memcachedb || ${TRUE} + ${CHOWN} nobody:nobody /var/db/memcachedb + +.include <bsd.port.mk> diff --git a/databases/memcachedb/distinfo b/databases/memcachedb/distinfo new file mode 100644 index 000000000000..11a9dfb4496a --- /dev/null +++ b/databases/memcachedb/distinfo @@ -0,0 +1,3 @@ +MD5 (memcachedb-0.0.2.tar.gz) = cba9c036f33d2804e916e7e15fd80488 +SHA256 (memcachedb-0.0.2.tar.gz) = e0a9018dab5d78153c3260886b939d0a9873fe4766eafa9f28f36c687451dbd1 +SIZE (memcachedb-0.0.2.tar.gz) = 11723 diff --git a/databases/memcachedb/files/memcachedb.in b/databases/memcachedb/files/memcachedb.in new file mode 100644 index 000000000000..5258ab910195 --- /dev/null +++ b/databases/memcachedb/files/memcachedb.in @@ -0,0 +1,35 @@ +#!/bin/sh +# $FreeBSD$ + +# PROVIDE: memcachedb +# REQUIRE: LOGIN +# KEYWORD: shutdown + +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# memcachedb_enable (bool): Set to NO by default. +# Set it to YES to enable memcachedb. +# +. %%RC_SUBR%% + +name="memcachedb" +rcvar=`set_rcvar` + +load_rc_config $name + +: ${memcachedb_bind="127.0.0.1"} +: ${memcachedb_dbfile="/var/db/memcachedb/default.db"} +: ${memcachedb_dbpath="/var/db/memcachedb"} +: ${memcachedb_enable="NO"} +: ${memcachedb_pidfile="/var/run/memcachedb.pid"} +: ${memcachedb_port="11211"} +: ${memcachedb_user="nobody"} + +command=%%PREFIX%%/sbin/${name} +command_args="-p ${memcachedb_port} -l ${memcachedb_bind} -d -u ${memcachedb_user} -f ${memcachedb_dbfile} -H ${memcachedb_dbpath} -P ${memcachedb_pidfile}" + +unset memcachedb_user + +run_rc_command "$1" + diff --git a/databases/memcachedb/files/patch-Makefile b/databases/memcachedb/files/patch-Makefile new file mode 100644 index 000000000000..dca673aeed43 --- /dev/null +++ b/databases/memcachedb/files/patch-Makefile @@ -0,0 +1,23 @@ +--- Makefile.orig 2007-09-22 03:51:05.000000000 +0800 ++++ Makefile 2007-09-22 03:56:02.000000000 +0800 +@@ -1,15 +1,15 @@ + # $Id: Makefile 11833 2005-11-28 00:22:02Z midom $ + # $Id: Makefile 11833 2007-09-06 10:56:02Z steve $ + +-LIBS=-ldb -levent +-DBLIBPATH=/usr/local/BerkeleyDB.4.5/lib +-DBINCPATH=/usr/local/BerkeleyDB.4.5/include ++LIBS=-l%%BDB_LIB_NAME%% -levent ++DBLIBPATH=%%BDB_LIB_DIR%% ++DBINCPATH=%%BDB_INCLUDE_DIR%% + + LDFLAGS= -L/usr/local/lib/ -L${DBLIBPATH} +-CFLAGS = -O2 -I/usr/local/include -I${DBINCPATH} ++CFLAGS+= -I/usr/local/include -I${DBINCPATH} + + all: +- cc -o memcachedb memcachedb.c ${LDFLAGS} ${CFLAGS} ${LIBS} ++ ${CC} -o memcachedb memcachedb.c ${LDFLAGS} ${CFLAGS} ${LIBS} + + clean: + rm -f -- *.o memcachedb diff --git a/databases/memcachedb/files/patch-memcachedb.c b/databases/memcachedb/files/patch-memcachedb.c new file mode 100644 index 000000000000..b1a1e463531d --- /dev/null +++ b/databases/memcachedb/files/patch-memcachedb.c @@ -0,0 +1,10 @@ +--- memcachedb.c.orig 2007-09-21 18:52:54.000000000 +0800 ++++ memcachedb.c 2007-09-27 09:26:43.000000000 +0800 +@@ -39,7 +39,6 @@ + #include <assert.h> + #include <db.h> + #include <signal.h> +-#include <malloc.h> + + #include "memcachedb.h" + diff --git a/databases/memcachedb/files/patch-memcachedb.h b/databases/memcachedb/files/patch-memcachedb.h new file mode 100644 index 000000000000..46b0c00d95e1 --- /dev/null +++ b/databases/memcachedb/files/patch-memcachedb.h @@ -0,0 +1,13 @@ +--- memcachedb.h.orig 2007-09-22 04:01:02.000000000 +0800 ++++ memcachedb.h 2007-09-22 04:01:15.000000000 +0800 +@@ -40,8 +40,8 @@ + extern struct stats stats; + extern struct settings settings; + +-#define END_LEN 32 +-#define END_LEN_STR "31" ++#define END_LEN 128 ++#define END_LEN_STR "127" + + typedef struct _stritem { + int nbytes; /* size of data */ diff --git a/databases/memcachedb/pkg-descr b/databases/memcachedb/pkg-descr new file mode 100644 index 000000000000..b49a7dd91c03 --- /dev/null +++ b/databases/memcachedb/pkg-descr @@ -0,0 +1,10 @@ +Memcachedb is a distributed storage system designed for persistent. We +simplely hacked from memcached and tugela. But neither of them. +Memcachedb is not a cache solution, it is a persistent solution for +high-frequency writing and reading. It conforms to memcache protocol +(not completed, see below), so any memcached client can have +connectivity with memcachedb. Memcachedb uses Berkeley DB as a storing +backend, so lots of features including transaction and replication are +supported. + +WWW: http://code.google.com/p/memcachedb/ diff --git a/databases/memcachedb/pkg-plist b/databases/memcachedb/pkg-plist new file mode 100644 index 000000000000..5f4af0a4b1bd --- /dev/null +++ b/databases/memcachedb/pkg-plist @@ -0,0 +1,4 @@ +@comment $FreeBSD$ +@stopdaemon memcachedb +sbin/memcachedb +@unexec rmdir /var/db/memcachedb 2>/dev/null || true |