diff options
author | Sergey A. Osokin <osa@FreeBSD.org> | 2011-07-22 10:32:41 +0000 |
---|---|---|
committer | Sergey A. Osokin <osa@FreeBSD.org> | 2011-07-22 10:32:41 +0000 |
commit | 80f1925c9128d796fabd558ce39b4567275e23bc (patch) | |
tree | 7087ee08ccb35b8b30002a7d4705222aeab113d0 /databases/redis-scripting/files | |
parent | Add one more third-party module nginx-gridfs 0.8 - module to serve content (diff) |
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.
Notes
Notes:
svn path=/head/; revision=278151
Diffstat (limited to '')
7 files changed, 168 insertions, 0 deletions
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" |