aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorosa <osa@FreeBSD.org>2011-07-22 18:32:41 +0800
committerosa <osa@FreeBSD.org>2011-07-22 18:32:41 +0800
commitab53fb479e3756bde96ec046ab2f9a6766919eae (patch)
tree23c3d863074fc677ac49bdbf9c5fa32312073c2b
parentabc5e73ddf92174d491fb5971b75abfae2ee936a (diff)
downloadfreebsd-ports-gnome-ab53fb479e3756bde96ec046ab2f9a6766919eae.tar.gz
freebsd-ports-gnome-ab53fb479e3756bde96ec046ab2f9a6766919eae.tar.zst
freebsd-ports-gnome-ab53fb479e3756bde96ec046ab2f9a6766919eae.zip
Add redis-scripting, version 2.2.111, an experimental version of
Redis 2.2.11 with support for Lua scripting, backported from the scripting branch. Instructions about how to use it are contained in following blog post: http://antirez.com/post/scripting-branch-released.html Connect to build. Add CONFLICTS and bump PORTREVISION for databases/redis.
-rw-r--r--databases/Makefile1
-rw-r--r--databases/redis-scripting/Makefile62
-rw-r--r--databases/redis-scripting/distinfo2
-rw-r--r--databases/redis-scripting/files/patch-deps::hiredis::Makefile29
-rw-r--r--databases/redis-scripting/files/patch-deps::linenoise::Makefile15
-rw-r--r--databases/redis-scripting/files/patch-redis.conf34
-rw-r--r--databases/redis-scripting/files/patch-src::Makefile37
-rw-r--r--databases/redis-scripting/files/patch-src::mkreleasehdr.sh11
-rw-r--r--databases/redis-scripting/files/pkg-message.in8
-rw-r--r--databases/redis-scripting/files/redis.sh.in34
-rw-r--r--databases/redis-scripting/pkg-descr19
-rw-r--r--databases/redis-scripting/pkg-plist17
-rw-r--r--databases/redis/Makefile4
13 files changed, 272 insertions, 1 deletions
diff --git a/databases/Makefile b/databases/Makefile
index 63b140d05b17..5e20b543f022 100644
--- a/databases/Makefile
+++ b/databases/Makefile
@@ -719,6 +719,7 @@
SUBDIR += rdb
SUBDIR += rdfdb
SUBDIR += redis
+ SUBDIR += redis-scripting
SUBDIR += rrdman
SUBDIR += rrdtool
SUBDIR += rrdtool10
diff --git a/databases/redis-scripting/Makefile b/databases/redis-scripting/Makefile
new file mode 100644
index 000000000000..c8c40688b164
--- /dev/null
+++ b/databases/redis-scripting/Makefile
@@ -0,0 +1,62 @@
+# New ports collection makefile for: redis-scripting
+# Date created: 29 Jun 2011
+# Whom: osa
+#
+# $FreeBSD$
+#
+
+PORTNAME= redis-scripting
+PORTVERSION= 2.2.111
+CATEGORIES= databases
+MASTER_SITES= GOOGLE_CODE
+DISTNAME= ${PORTNAME:C/\-.*$//}-${PORTVERSION}-${PORTNAME:C/^.*\-//}
+
+MAINTAINER= osa@FreeBSD.org
+COMMENT= A persistent key-value database with net interface and scripting
+
+CONFLICTS?= redis-2.*
+
+LIB_DEPENDS= execinfo.1:${PORTSDIR}/devel/libexecinfo
+
+CFLAGS+= -I${LOCALBASE}/include
+
+USE_GMAKE= yes
+USE_LUA= 5.1+
+USE_RC_SUBR= redis.sh
+BIN_FILES= redis-benchmark redis-check-aof redis-check-dump \
+ redis-cli redis-server
+
+PKGMESSAGE= ${WRKDIR}/pkg-message
+
+USERS= redis
+GROUPS= redis
+
+REDIS_DBDIR?= /var/db/redis
+REDIS_RUNDIR?= /var/run/redis
+REDIS_LOGDIR?= /var/log/redis
+
+SUB_FILES= pkg-message
+SUB_LIST+= PORTNAME=${PORTNAME} \
+ REDIS_USER=${USERS} \
+ REDIS_RUNDIR=${REDIS_RUNDIR}
+
+PLIST_SUB+= REDIS_USER=${USERS} \
+ REDIS_GROUP=${GROUPS} \
+ REDIS_LOGDIR=${REDIS_LOGDIR} \
+ REDIS_DBDIR=${REDIS_DBDIR} \
+ REDIS_RUNDIR=${REDIS_RUNDIR}
+
+post-build:
+ ${SED} ${SUB_LIST:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
+ ${WRKSRC}/redis.conf > ${WRKDIR}/redis.conf
+
+do-install:
+ ${INSTALL_PROGRAM} ${BIN_FILES:C!^!${WRKSRC}/src/!} ${PREFIX}/bin/
+ ${INSTALL_DATA} ${WRKDIR}/redis.conf ${PREFIX}/etc/redis.conf.sample
+
+post-install:
+.for d in ${REDIS_LOGDIR} ${REDIS_RUNDIR} ${REDIS_DBDIR}
+ [ -d ${d} ] || ${MKDIR} ${d} && ${CHOWN} ${USERS}:${GROUPS} ${d}
+.endfor
+
+.include <bsd.port.mk>
diff --git a/databases/redis-scripting/distinfo b/databases/redis-scripting/distinfo
new file mode 100644
index 000000000000..76f7df5f5e18
--- /dev/null
+++ b/databases/redis-scripting/distinfo
@@ -0,0 +1,2 @@
+SHA256 (redis-2.2.111-scripting.tar.gz) = dee5f6cc54945756181c8c4259827724cdba9db254396bd92d7a90eed0fd7a4f
+SIZE (redis-2.2.111-scripting.tar.gz) = 674358
diff --git a/databases/redis-scripting/files/patch-deps::hiredis::Makefile b/databases/redis-scripting/files/patch-deps::hiredis::Makefile
new file mode 100644
index 000000000000..f6d34bd3a9de
--- /dev/null
+++ b/databases/redis-scripting/files/patch-deps::hiredis::Makefile
@@ -0,0 +1,29 @@
+--- deps/hiredis/Makefile.orig 2010-12-23 15:17:54.000000000 +0300
++++ deps/hiredis/Makefile 2010-12-24 09:24:45.000000000 +0300
+@@ -24,6 +24,14 @@
+ DYLIB_MAKE_CMD?=libtool -dynamic -o ${DYLIBNAME} -lm ${DEBUG} - ${OBJ}
+ STLIBNAME?=libhiredis.a
+ STLIB_MAKE_CMD?=libtool -static -o ${STLIBNAME} - ${OBJ}
++else ifeq ($(uname_S),FreeBSD)
++ CFLAGS?=$(CFLAGS)
++ CCLINK?=-pthread
++ LDFLAGS?=-L. -Wl,-rpath,.
++ DYLIBNAME?=libhiredis.so
++ DYLIB_MAKE_CMD?=$(CC) -o ${DYLIBNAME} ${OBJ}
++ STLIBNAME?=libhiredis.a
++ STLIB_MAKE_CMD?=ar rcs ${STLIBNAME} ${OBJ}
+ else
+ CFLAGS?=-std=c99 -pedantic $(OPTIMIZATION) -fPIC -Wall -W -Wwrite-strings $(ARCH) $(PROF)
+ CCLINK?=-lm -pthread
+@@ -34,9 +42,9 @@
+ STLIB_MAKE_CMD?=ar rcs ${STLIBNAME} ${OBJ}
+ endif
+ CCOPT= $(CFLAGS) $(CCLINK)
+-DEBUG?= -g -ggdb
++#DEBUG?= -g -ggdb
+
+-PREFIX?= /usr/local
++PREFIX?= ${PREFIX}
+ INSTALL_INC= $(PREFIX)/include/hiredis
+ INSTALL_LIB= $(PREFIX)/lib
+ INSTALL= cp -a
diff --git a/databases/redis-scripting/files/patch-deps::linenoise::Makefile b/databases/redis-scripting/files/patch-deps::linenoise::Makefile
new file mode 100644
index 000000000000..2a79e2e3208c
--- /dev/null
+++ b/databases/redis-scripting/files/patch-deps::linenoise::Makefile
@@ -0,0 +1,15 @@
+--- deps/linenoise/Makefile.orig 2010-12-24 09:27:03.000000000 +0300
++++ deps/linenoise/Makefile 2010-12-24 09:27:47.000000000 +0300
+@@ -1,10 +1,10 @@
+ linenoise_example: linenoise.h linenoise.c
+
+ linenoise_example: linenoise.o example.o
+- $(CC) $(ARCH) -Wall -W -Os -g -o linenoise_example linenoise.o example.o
++ $(CC) $(CFLAGS) -o linenoise_example linenoise.o example.o
+
+ .c.o:
+- $(CC) $(ARCH) -c -Wall -W -Os -g $<
++ $(CC) $(CFLAGS) -c $<
+
+ clean:
+ rm -f linenoise_example *.o
diff --git a/databases/redis-scripting/files/patch-redis.conf b/databases/redis-scripting/files/patch-redis.conf
new file mode 100644
index 000000000000..d105b89a9e95
--- /dev/null
+++ b/databases/redis-scripting/files/patch-redis.conf
@@ -0,0 +1,34 @@
+--- redis.conf.orig 2010-07-02 16:00:49.000000000 +0400
++++ redis.conf 2010-07-02 16:01:46.000000000 +0400
+@@ -14,11 +14,11 @@
+
+ # By default Redis does not run as a daemon. Use 'yes' if you need it.
+ # Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
+-daemonize no
++daemonize yes
+
+ # When running daemonized, Redis writes a pid file in /var/run/redis.pid by
+ # default. You can specify a custom pid file location here.
+-pidfile /var/run/redis.pid
++pidfile %%REDIS_RUNDIR%%/redis.pid
+
+ # Accept connections on the specified port, default is 6379
+ port 6379
+@@ -42,7 +42,7 @@
+ # Specify the log file name. Also 'stdout' can be used to force
+ # Redis to log on the standard output. Note that if you use standard
+ # output for logging but daemonize, logs will be sent to /dev/null
+-logfile stdout
++logfile %%REDIS_LOGDIR%%/redis.log
+
+ # Set the number of databases. The default database is DB 0, you can select
+ # a different one on a per-connection basis using SELECT <dbid> where
+@@ -86,7 +86,7 @@
+ # Also the Append Only File will be created inside this directory.
+ #
+ # Note that you must specify a directory here, not a file name.
+-dir ./
++dir %%REDIS_DBDIR%%/
+
+ ################################# REPLICATION #################################
+
diff --git a/databases/redis-scripting/files/patch-src::Makefile b/databases/redis-scripting/files/patch-src::Makefile
new file mode 100644
index 000000000000..a1f837d04d3a
--- /dev/null
+++ b/databases/redis-scripting/files/patch-src::Makefile
@@ -0,0 +1,37 @@
+--- src/Makefile.orig 2011-06-23 00:40:21.000000000 +0400
++++ src/Makefile 2011-06-29 16:27:24.000000000 +0400
+@@ -9,6 +9,9 @@
+ CFLAGS?= -std=c99 -pedantic $(OPTIMIZATION) -Wall -W -D__EXTENSIONS__ -D_XPG6
+ CCLINK?= -ldl -lnsl -lsocket -lm -lpthread
+ DEBUG?= -g -ggdb
++else ifeq ($(uname_S),FreeBSD)
++ CFLAGS?= $(CFLAGS)
++ CCLINK?= -pthread -lm -L${PREFIX}/lib -llua-5.1
+ else
+ CFLAGS?= -std=c99 -pedantic $(OPTIMIZATION) -Wall -W $(ARCH) $(PROF)
+ CCLINK?= -lm -pthread
+@@ -19,9 +22,9 @@
+ CCLINK+= -ltcmalloc
+ CFLAGS+= -DUSE_TCMALLOC
+ endif
+-CCOPT= $(CFLAGS) $(CCLINK) $(ARCH) $(PROF)
++CCOPT= $(CFLAGS) $(CCLINK) $(PROF)
+
+-PREFIX= /usr/local
++PREFIX?= $(PREFIX)
+ INSTALL_BIN= $(PREFIX)/bin
+ INSTALL= cp -p
+
+@@ -109,10 +112,10 @@
+ dependencies:
+ cd ../deps/hiredis && $(MAKE) static ARCH="$(ARCH)"
+ cd ../deps/linenoise && $(MAKE) ARCH="$(ARCH)"
+- cd ../deps/lua && $(MAKE) ARCH="$(ARCH)" ansi
++# cd ../deps/lua && $(MAKE) ARCH="$(ARCH)" ansi
+
+ redis-server: $(OBJ)
+- $(CC) -o $(PRGNAME) $(CCOPT) $(DEBUG) $(OBJ) ../deps/lua/src/liblua.a
++ $(CC) -o $(PRGNAME) $(CCOPT) $(DEBUG) $(OBJ)
+
+ redis-benchmark: dependencies $(BENCHOBJ)
+ cd ../deps/hiredis && $(MAKE) static
diff --git a/databases/redis-scripting/files/patch-src::mkreleasehdr.sh b/databases/redis-scripting/files/patch-src::mkreleasehdr.sh
new file mode 100644
index 000000000000..2d818f69198b
--- /dev/null
+++ b/databases/redis-scripting/files/patch-src::mkreleasehdr.sh
@@ -0,0 +1,11 @@
+--- src/mkreleasehdr.sh.orig 2010-12-24 09:37:11.000000000 +0300
++++ src/mkreleasehdr.sh 2010-12-24 09:37:16.000000000 +0300
+@@ -1,6 +1,6 @@
+ #!/bin/sh
+-GIT_SHA1=`(git show-ref --head --hash=8 2> /dev/null || echo 00000000) | head -n1`
+-GIT_DIRTY=`git diff 2> /dev/null | wc -l`
++GIT_SHA1="00000000"
++GIT_DIRTY="0"
+ test -f release.h || touch release.h
+ (cat release.h | grep SHA1 | grep $GIT_SHA1) && \
+ (cat release.h | grep DIRTY | grep $GIT_DIRTY) && exit 0 # Already uptodate
diff --git a/databases/redis-scripting/files/pkg-message.in b/databases/redis-scripting/files/pkg-message.in
new file mode 100644
index 000000000000..fd3763137ea3
--- /dev/null
+++ b/databases/redis-scripting/files/pkg-message.in
@@ -0,0 +1,8 @@
+
+===> CONFIGURATION NOTE:
+
+ To setup "%%PORTNAME%%" you need to edit the configuration file:
+ %%PREFIX%%/etc/%%PORTNAME%%.conf
+
+ To run redis from startup, add %%PORTNAME%%_enable="YES"
+ in your /etc/rc.conf.
diff --git a/databases/redis-scripting/files/redis.sh.in b/databases/redis-scripting/files/redis.sh.in
new file mode 100644
index 000000000000..0e232f79f251
--- /dev/null
+++ b/databases/redis-scripting/files/redis.sh.in
@@ -0,0 +1,34 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: redis
+# REQUIRE: LOGIN
+# BEFORE: securelevel
+# KEYWORD: shutdown
+
+# Add the following line to /etc/rc.conf to enable `redis':
+#
+#redis_enable="YES"
+#
+
+. /etc/rc.subr
+
+name="redis"
+rcvar=`set_rcvar`
+
+extra_commands="reload"
+
+command="%%PREFIX%%/bin/redis-server"
+config_file="%%PREFIX%%/etc/$name.conf"
+command_args="${config_file}"
+pidfile="%%REDIS_RUNDIR%%/$name.pid"
+required_files="${config_file}"
+
+# read configuration and set defaults
+load_rc_config "$name"
+: ${redis_enable="NO"}
+: ${redis_user="%%REDIS_USER%%"}
+
+run_rc_command "$1"
diff --git a/databases/redis-scripting/pkg-descr b/databases/redis-scripting/pkg-descr
new file mode 100644
index 000000000000..e034aa3723ba
--- /dev/null
+++ b/databases/redis-scripting/pkg-descr
@@ -0,0 +1,19 @@
+Redis is an open source, advanced key-value store. It is often referred
+to as a data structure server since keys can contain strings, hashes,
+lists, sets and sorted sets.
+
+You can run atomic operations on these types, like appending to a string;
+incrementing the value in a hash; pushing to a list; computing set
+intersection, union and difference; or getting the member with highest
+ranking in a sorted set.
+
+In order to achieve its outstanding performance, Redis works with an
+in-memory dataset. Depending on your use case, you can persist it either
+by dumping the dataset to disk every once in a while, or by appending each
+command to a log.
+
+Redis also supports trivial-to-setup master-slave replication, with very
+fast non-blocking first synchronization, auto-reconnection on net split
+and so forth.
+
+WWW: http://redis.io/
diff --git a/databases/redis-scripting/pkg-plist b/databases/redis-scripting/pkg-plist
new file mode 100644
index 000000000000..44ea4d80f6e5
--- /dev/null
+++ b/databases/redis-scripting/pkg-plist
@@ -0,0 +1,17 @@
+bin/redis-benchmark
+bin/redis-check-aof
+bin/redis-check-dump
+bin/redis-cli
+bin/redis-server
+@unexec (cmp -s %D/etc/redis.conf %D/etc/redis.conf.sample && rm -f %D/etc/redis.conf) || true
+etc/redis.conf.sample
+@exec [ -f %B/redis.conf ] || cp %B/%f %B/redis.conf
+@exec [ -d %%REDIS_DBDIR%% ] || mkdir -p %%REDIS_DBDIR%%
+@exec chown %%REDIS_USER%%:%%REDIS_GROUP%% %%REDIS_DBDIR%%
+@unexec if [ -z ${UPGRADE_PORT} ] ; then rmdir %%REDIS_DBDIR%% 2>/dev/null; fi
+@exec [ -d %%REDIS_LOGDIR%% ] || mkdir -p %%REDIS_LOGDIR%%
+@exec chown %%REDIS_USER%%:%%REDIS_GROUP%% %%REDIS_LOGDIR%%
+@unexec if [ -z ${UPGRADE_PORT} ] ; then rmdir %%REDIS_LOGDIR%% 2>/dev/null; fi
+@exec [ -d %%REDIS_RUNDIR%% ] || mkdir -p %%REDIS_RUNDIR%%
+@exec chown %%REDIS_USER%%:%%REDIS_GROUP%% %%REDIS_RUNDIR%%
+@unexec if [ -z ${UPGRADE_PORT} ] ; then rmdir %%REDIS_RUNDIR%% 2>/dev/null; fi
diff --git a/databases/redis/Makefile b/databases/redis/Makefile
index 7803d495125d..2dc2874bbade 100644
--- a/databases/redis/Makefile
+++ b/databases/redis/Makefile
@@ -7,7 +7,7 @@
PORTNAME= redis
PORTVERSION= 2.2.11
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= databases
MASTER_SITES= GOOGLE_CODE
@@ -18,6 +18,8 @@ LIB_DEPENDS= execinfo.1:${PORTSDIR}/devel/libexecinfo
CFLAGS+= -I${LOCALBASE}/include
+CONFLICTS?= redis-scripting-2.*
+
USE_GMAKE= yes
USE_RC_SUBR= redis.sh
BIN_FILES= redis-benchmark redis-check-aof redis-check-dump \