[Midnightbsd-cvs] mports [20616] trunk/databases: add redis port based on freebsd port

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sat Oct 31 23:36:02 EDT 2015


Revision: 20616
          http://svnweb.midnightbsd.org/mports/?rev=20616
Author:   laffer1
Date:     2015-10-31 23:36:02 -0400 (Sat, 31 Oct 2015)
Log Message:
-----------
add redis port based on freebsd port

Modified Paths:
--------------
    trunk/databases/Makefile

Added Paths:
-----------
    trunk/databases/redis/
    trunk/databases/redis/Makefile
    trunk/databases/redis/distinfo
    trunk/databases/redis/files/
    trunk/databases/redis/files/extra-patch-src-Makefile.lua
    trunk/databases/redis/files/extra-patch-src-Makefile.luajit
    trunk/databases/redis/files/patch-deps-Makefile
    trunk/databases/redis/files/patch-deps-hiredis-Makefile
    trunk/databases/redis/files/patch-deps-hiredis-net.c
    trunk/databases/redis/files/patch-deps-linenoise-Makefile
    trunk/databases/redis/files/patch-redis.conf
    trunk/databases/redis/files/patch-src-Makefile
    trunk/databases/redis/files/patch-src-config.h
    trunk/databases/redis/files/patch-src-mkreleasehdr.sh
    trunk/databases/redis/files/pkg-message.in
    trunk/databases/redis/files/redis.in
    trunk/databases/redis/pkg-descr
    trunk/databases/redis/pkg-plist

Modified: trunk/databases/Makefile
===================================================================
--- trunk/databases/Makefile	2015-11-01 03:30:35 UTC (rev 20615)
+++ trunk/databases/Makefile	2015-11-01 03:36:02 UTC (rev 20616)
@@ -94,6 +94,7 @@
 SUBDIR += qt4-pgsql-plugin
 SUBDIR += qt4-sql
 SUBDIR += qt4-sqlite3-plugin
+SUBDIR += redis
 SUBDIR += rrdtool
 SUBDIR += ruby-bdb
 SUBDIR += ruby-bdb1

Added: trunk/databases/redis/Makefile
===================================================================
--- trunk/databases/redis/Makefile	                        (rev 0)
+++ trunk/databases/redis/Makefile	2015-11-01 03:36:02 UTC (rev 20616)
@@ -0,0 +1,96 @@
+# $MidnightBSD$
+
+PORTNAME=	redis
+DISTVERSION=	3.0.3
+CATEGORIES=	databases
+MASTER_SITES=	http://download.redis.io/releases/
+
+MAINTAINER=	ports at MidnightBSD.org
+COMMENT=	Persistent key-value database with built-in net interface
+
+LICENSE=	bsd3
+
+USES=		execinfo
+
+OPTIONS_DEFINE=	TESTS
+OPTIONS_RADIO=	EXTLUA
+OPTIONS_RADIO_EXTLUA=	LUA LUAJIT
+LUA_DESC=	Use lang/lua instead of builtin lua
+LUAJIT_DESC=	Use lang/luajit instead of builtin lua
+TESTS_DESC=	Install lang/tcl for redis unit tests
+
+.include <bsd.mport.options.mk>
+
+.if ${PORT_OPTIONS:MLUA}
+USES+=		lua:51
+EXTRA_PATCHES+=	${PATCHDIR}/extra-patch-src-Makefile.lua
+.endif
+
+.if ${PORT_OPTIONS:MLUAJIT}
+LIB_DEPENDS+=	libluajit-5.1.so:${PORTSDIR}/lang/luajit
+EXTRA_PATCHES+=	${PATCHDIR}/extra-patch-src-Makefile.luajit
+.endif
+
+.if ${PORT_OPTIONS:MLUA} || ${PORT_OPTIONS:MLUAJIT}
+CFLAGS+=	-fPIC
+LDFLAGS+=	-Wl,-E
+.endif
+
+.if ${PORT_OPTIONS:MTESTS}
+USES+=		tcl:build
+.endif
+
+CFLAGS+=	-I${LOCALBASE}/include
+LDFLAGS+=	-L${LOCALBASE}/lib -lpthread -lm -lexecinfo
+
+CONFLICTS?=	redis-devel-3.*
+
+USES+=		gmake
+MAKE_ENV=	"V=yo"
+USE_RC_SUBR=	redis
+BIN_FILES=	redis-benchmark redis-check-aof redis-check-dump \
+		redis-cli redis-sentinel 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_DBDIR=${REDIS_DBDIR} \
+	REDIS_LOGDIR=${REDIS_LOGDIR} \
+	REDIS_RUNDIR=${REDIS_RUNDIR}
+
+PLIST_SUB+=	REDIS_USER=${USERS} \
+	REDIS_GROUP=${GROUPS} \
+	REDIS_LOGDIR=${REDIS_LOGDIR} \
+	REDIS_DBDIR=${REDIS_DBDIR} \
+	REDIS_RUNDIR=${REDIS_RUNDIR}
+
+.if ${PORT_OPTIONS:MLUAJIT} || ${PORT_OPTIONS:MLUA}
+post-patch:
+	@cd ${WRKSRC}/deps/lua/src && ${CP} fpconv.* lua_* strbuf.* ${WRKSRC}/src/
+.endif
+
+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/!} ${STAGEDIR}${PREFIX}/bin/
+	${INSTALL_DATA} ${WRKDIR}/redis.conf ${STAGEDIR}${PREFIX}/etc/redis.conf.sample
+	${INSTALL_DATA} ${WRKSRC}/sentinel.conf ${STAGEDIR}${PREFIX}/etc/sentinel.conf.sample
+	${MKDIR} ${STAGEDIR}${REDIS_LOGDIR} \
+		${STAGEDIR}${REDIS_DBDIR} \
+		${STAGEDIR}${REDIS_RUNDIR}
+
+regression-test: build
+	@cd ${WRKSRC} && ${TCLSH} tests/test_helper.tcl
+
+.include <bsd.port.mk>


Property changes on: trunk/databases/redis/Makefile
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/databases/redis/distinfo
===================================================================
--- trunk/databases/redis/distinfo	                        (rev 0)
+++ trunk/databases/redis/distinfo	2015-11-01 03:36:02 UTC (rev 20616)
@@ -0,0 +1,2 @@
+SHA256 (redis-3.0.3.tar.gz) = 1d08fa665b16d0950274dfbd47fbbcf3485e43e901021338640a0334666e9da5
+SIZE (redis-3.0.3.tar.gz) = 1360959


Property changes on: trunk/databases/redis/distinfo
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/databases/redis/files/extra-patch-src-Makefile.lua
===================================================================
--- trunk/databases/redis/files/extra-patch-src-Makefile.lua	                        (rev 0)
+++ trunk/databases/redis/files/extra-patch-src-Makefile.lua	2015-11-01 03:36:02 UTC (rev 20616)
@@ -0,0 +1,47 @@
+--- src/Makefile.orig	2014-05-26 20:06:48.000000000 +0400
++++ src/Makefile	2014-06-02 00:19:36.000000000 +0400
+@@ -15,7 +15,7 @@
+ release_hdr := $(shell sh -c './mkreleasehdr.sh')
+ uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
+ OPTIMIZATION?=-O2
+-DEPENDENCY_TARGETS=hiredis linenoise lua
++DEPENDENCY_TARGETS=hiredis linenoise
+ 
+ # Default settings
+ STD=-std=c99 -pedantic
+@@ -49,7 +49,7 @@
+ # Override default settings if possible
+ -include .make-settings
+ 
+-FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS)
++FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS)
+ FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG)
+ FINAL_LIBS=-lm
+ DEBUG=-g -ggdb
+@@ -88,6 +88,9 @@
+ 	FINAL_LIBS+= ../deps/jemalloc/lib/libjemalloc.a -ldl
+ endif
+ 
++FINAL_CFLAGS+= -I${PREFIX}/include/lua51
++FINAL_LIBS+= -L${PREFIX}/lib -llua-5.1
++
+ REDIS_CC=$(QUIET_CC)$(CC) $(FINAL_CFLAGS)
+ REDIS_LD=$(QUIET_LINK)$(CC) $(FINAL_LDFLAGS)
+ REDIS_INSTALL=$(QUIET_INSTALL)$(INSTALL)
+@@ -108,6 +111,7 @@
+ REDIS_SERVER_NAME=redis-server
+ REDIS_SENTINEL_NAME=redis-sentinel
+ REDIS_SERVER_OBJ=adlist.o ae.o anet.o dict.o redis.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o networking.o util.o object.o db.o replication.o rdb.o t_string.o t_list.o t_set.o t_zset.o t_hash.o config.o aof.o pubsub.o multi.o debug.o sort.o intset.o syncio.o cluster.o crc16.o endianconv.o slowlog.o scripting.o bio.o rio.o rand.o memtest.o crc64.o bitops.o sentinel.o notify.o setproctitle.o blocked.o hyperloglog.o latency.o sparkline.o
++REDIS_SERVER_OBJ+=fpconv.o lua_bit.o lua_cjson.o lua_cmsgpack.o lua_struct.o strbuf.o
+ REDIS_CLI_NAME=redis-cli
+ REDIS_CLI_OBJ=anet.o sds.o adlist.o redis-cli.o zmalloc.o release.o anet.o ae.o crc64.o
+ REDIS_BENCHMARK_NAME=redis-benchmark
+@@ -162,7 +166,7 @@
+ 
+ # redis-server
+ $(REDIS_SERVER_NAME): $(REDIS_SERVER_OBJ)
+-	$(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/lua/src/liblua.a $(FINAL_LIBS)
++	$(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a $(FINAL_LIBS)
+ 
+ # redis-sentinel
+ $(REDIS_SENTINEL_NAME): $(REDIS_SERVER_NAME)


Property changes on: trunk/databases/redis/files/extra-patch-src-Makefile.lua
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/databases/redis/files/extra-patch-src-Makefile.luajit
===================================================================
--- trunk/databases/redis/files/extra-patch-src-Makefile.luajit	                        (rev 0)
+++ trunk/databases/redis/files/extra-patch-src-Makefile.luajit	2015-11-01 03:36:02 UTC (rev 20616)
@@ -0,0 +1,47 @@
+--- src/Makefile.orig	2014-07-29 12:17:48.000000000 +0400
++++ src/Makefile	2014-09-10 02:30:38.000000000 +0400
+@@ -15,7 +15,7 @@
+ release_hdr := $(shell sh -c './mkreleasehdr.sh')
+ uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
+ OPTIMIZATION?=-O2
+-DEPENDENCY_TARGETS=hiredis linenoise lua
++DEPENDENCY_TARGETS=hiredis linenoise
+ 
+ # Default settings
+ STD=-std=c99 -pedantic
+@@ -49,7 +49,7 @@
+ # Override default settings if possible
+ -include .make-settings
+ 
+-FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS)
++FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS)
+ FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG)
+ FINAL_LIBS=-lm
+ DEBUG=-g -ggdb
+@@ -88,6 +88,9 @@
+ 	FINAL_LIBS+= ../deps/jemalloc/lib/libjemalloc.a -ldl
+ endif
+ 
++FINAL_CFLAGS+= -I${PREFIX}/include/luajit-2.0
++FINAL_LIBS+= -L${PREFIX}/lib -lluajit-5.1
++
+ REDIS_CC=$(QUIET_CC)$(CC) $(FINAL_CFLAGS)
+ REDIS_LD=$(QUIET_LINK)$(CC) $(FINAL_LDFLAGS)
+ REDIS_INSTALL=$(QUIET_INSTALL)$(INSTALL)
+@@ -108,6 +111,7 @@
+ REDIS_SERVER_NAME=redis-server
+ REDIS_SENTINEL_NAME=redis-sentinel
+ REDIS_SERVER_OBJ=adlist.o ae.o anet.o dict.o redis.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o networking.o util.o object.o db.o replication.o rdb.o t_string.o t_list.o t_set.o t_zset.o t_hash.o config.o aof.o pubsub.o multi.o debug.o sort.o intset.o syncio.o cluster.o crc16.o endianconv.o slowlog.o scripting.o bio.o rio.o rand.o memtest.o crc64.o bitops.o sentinel.o notify.o setproctitle.o blocked.o hyperloglog.o latency.o sparkline.o
++REDIS_SERVER_OBJ+=fpconv.o lua_bit.o lua_cjson.o lua_cmsgpack.o lua_struct.o strbuf.o
+ REDIS_CLI_NAME=redis-cli
+ REDIS_CLI_OBJ=anet.o sds.o adlist.o redis-cli.o zmalloc.o release.o anet.o ae.o crc64.o
+ REDIS_BENCHMARK_NAME=redis-benchmark
+@@ -162,7 +166,7 @@
+ 
+ # redis-server
+ $(REDIS_SERVER_NAME): $(REDIS_SERVER_OBJ)
+-	$(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/lua/src/liblua.a $(FINAL_LIBS)
++	$(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a $(FINAL_LIBS)
+ 
+ # redis-sentinel
+ $(REDIS_SENTINEL_NAME): $(REDIS_SERVER_NAME)


Property changes on: trunk/databases/redis/files/extra-patch-src-Makefile.luajit
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/databases/redis/files/patch-deps-Makefile
===================================================================
--- trunk/databases/redis/files/patch-deps-Makefile	                        (rev 0)
+++ trunk/databases/redis/files/patch-deps-Makefile	2015-11-01 03:36:02 UTC (rev 20616)
@@ -0,0 +1,20 @@
+--- deps/Makefile.orig	2014-09-01 19:00:38.000000000 +0400
++++ deps/Makefile	2014-09-09 05:33:10.000000000 +0400
+@@ -58,7 +58,7 @@
+ 	LUA_CFLAGS= -D__C99FEATURES__=1
+ endif
+ 
+-LUA_CFLAGS+= -O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL $(CFLAGS)
++LUA_CFLAGS+= -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL $(CFLAGS)
+ LUA_LDFLAGS+= $(LDFLAGS)
+ # lua's Makefile defines AR="ar rcu", which is unusual, and makes it more
+ # challenging to cross-compile lua (and redis).  These defines make it easier
+@@ -68,7 +68,7 @@
+ 
+ lua: .make-prerequisites
+ 	@printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR)
+-	cd lua/src && $(MAKE) all CFLAGS="$(LUA_CFLAGS)" MYLDFLAGS="$(LUA_LDFLAGS)" AR="$(AR) $(ARFLAGS)"
++	cd lua/src && $(MAKE) all CC="$(CC)" CFLAGS="$(LUA_CFLAGS)" MYLDFLAGS="$(LUA_LDFLAGS)" AR="$(AR) $(ARFLAGS)"
+ 
+ .PHONY: lua
+ 


Property changes on: trunk/databases/redis/files/patch-deps-Makefile
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/databases/redis/files/patch-deps-hiredis-Makefile
===================================================================
--- trunk/databases/redis/files/patch-deps-hiredis-Makefile	                        (rev 0)
+++ trunk/databases/redis/files/patch-deps-hiredis-Makefile	2015-11-01 03:36:02 UTC (rev 20616)
@@ -0,0 +1,41 @@
+--- deps/hiredis/Makefile.orig	2014-07-29 12:17:48.000000000 +0400
++++ deps/hiredis/Makefile	2014-09-10 02:32:25.000000000 +0400
+@@ -25,10 +25,10 @@
+ 
+ # Fallback to gcc when $CC is not in $PATH.
+ CC:=$(shell sh -c 'type $(CC) >/dev/null 2>/dev/null && echo $(CC) || echo gcc')
+-OPTIMIZATION?=-O3
++#OPTIMIZATION?=-O3
+ WARNINGS=-Wall -W -Wstrict-prototypes -Wwrite-strings
+-DEBUG?= -g -ggdb
+-REAL_CFLAGS=$(OPTIMIZATION) -fPIC $(CFLAGS) $(WARNINGS) $(DEBUG) $(ARCH)
++#DEBUG?= -g -ggdb
++REAL_CFLAGS=$(OPTIMIZATION) -fPIC $(CFLAGS) $(WARNINGS) $(DEBUG)
+ REAL_LDFLAGS=$(LDFLAGS) $(ARCH)
+ 
+ DYLIBSUFFIX=so
+@@ -47,6 +47,15 @@
+   DYLIB_MAKE_CMD=$(CC) -G -o $(DYLIBNAME) -h $(DYLIB_MINOR_NAME) $(LDFLAGS)
+   INSTALL= cp -r
+ endif
++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}
++endif
+ ifeq ($(uname_S),Darwin)
+   DYLIBSUFFIX=dylib
+   DYLIB_MINOR_NAME=$(LIBNAME).$(HIREDIS_MAJOR).$(HIREDIS_MINOR).$(DYLIBSUFFIX)
+@@ -124,7 +133,7 @@
+ 	$(CC) -MM *.c
+ 
+ # Installation related variables and target
+-PREFIX?=/usr/local
++PREFIX?=${PREFIX}
+ INSTALL_INCLUDE_PATH= $(PREFIX)/include/hiredis
+ INSTALL_LIBRARY_PATH= $(PREFIX)/lib
+ 


Property changes on: trunk/databases/redis/files/patch-deps-hiredis-Makefile
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/databases/redis/files/patch-deps-hiredis-net.c
===================================================================
--- trunk/databases/redis/files/patch-deps-hiredis-net.c	                        (rev 0)
+++ trunk/databases/redis/files/patch-deps-hiredis-net.c	2015-11-01 03:36:02 UTC (rev 20616)
@@ -0,0 +1,12 @@
+--- deps/hiredis/net.c.orig	2014-09-12 09:16:58.000000000 -0500
++++ deps/hiredis/net.c	2014-09-16 19:45:20.339820576 -0500
+@@ -138,7 +138,8 @@ int redisKeepAlive(redisContext *c, int 
+         return REDIS_ERR;
+     }
+ #else
+-#ifndef __sun
++#if !defined(__sun) && defined(TCP_KEEPIDLE) && defined(TCP_KEEPINTVL) && \
++    defined(TCP_KEEPCNT)
+     val = interval;
+     if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, &val, sizeof(val)) < 0) {
+         __redisSetError(c,REDIS_ERR_OTHER,strerror(errno));


Property changes on: trunk/databases/redis/files/patch-deps-hiredis-net.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/databases/redis/files/patch-deps-linenoise-Makefile
===================================================================
--- trunk/databases/redis/files/patch-deps-linenoise-Makefile	                        (rev 0)
+++ trunk/databases/redis/files/patch-deps-linenoise-Makefile	2015-11-01 03:36:02 UTC (rev 20616)
@@ -0,0 +1,15 @@
+--- deps/linenoise/Makefile.orig	2015-01-17 22:13:25.000000000 +0300
++++ deps/linenoise/Makefile	2015-01-17 22:13:45.000000000 +0300
+@@ -1,10 +1,10 @@
+ STD=
+ WARN= -Wall
+-OPT= -Os
++#OPT= -Os
+ 
+ R_CFLAGS= $(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS)
+ R_LDFLAGS= $(LDFLAGS)
+-DEBUG= -g
++#DEBUG= -g
+ 
+ R_CC=$(CC) $(R_CFLAGS)
+ R_LD=$(CC) $(R_LDFLAGS)


Property changes on: trunk/databases/redis/files/patch-deps-linenoise-Makefile
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/databases/redis/files/patch-redis.conf
===================================================================
--- trunk/databases/redis/files/patch-redis.conf	                        (rev 0)
+++ trunk/databases/redis/files/patch-redis.conf	2015-11-01 03:36:02 UTC (rev 20616)
@@ -0,0 +1,34 @@
+--- redis.conf.orig	2013-08-13 15:40:42.000000000 +0400
++++ redis.conf	2013-08-13 15:42:50.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.
+ # If port 0 is specified Redis will not listen on a TCP socket.
+@@ -71,7 +71,7 @@
+ # Specify the log file name. Also the emptry string 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 ""
++logfile %%REDIS_LOGDIR%%/redis.log
+ 
+ # To enable logging to the system logger, just set 'syslog-enabled' to yes,
+ # and optionally update the other syslog parameters to suit your needs.
+@@ -155,7 +155,7 @@
+ # The Append Only File will also be created inside this directory.
+ # 
+ # Note that you must specify a directory here, not a file name.
+-dir ./
++dir %%REDIS_DBDIR%%/
+ 
+ ################################# REPLICATION #################################
+ 


Property changes on: trunk/databases/redis/files/patch-redis.conf
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/databases/redis/files/patch-src-Makefile
===================================================================
--- trunk/databases/redis/files/patch-src-Makefile	                        (rev 0)
+++ trunk/databases/redis/files/patch-src-Makefile	2015-11-01 03:36:02 UTC (rev 20616)
@@ -0,0 +1,39 @@
+--- src/Makefile.orig	2015-04-01 17:01:44.000000000 +0300
++++ src/Makefile	2015-04-07 21:30:22.464962000 +0300
+@@ -22,7 +22,7 @@
+ WARN=-Wall -W
+ OPT=$(OPTIMIZATION)
+ 
+-PREFIX?=/usr/local
++PREFIX:=$(PREFIX)
+ INSTALL_BIN=$(PREFIX)/bin
+ INSTALL=install
+ 
+@@ -52,7 +52,6 @@
+ FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS)
+ FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG)
+ FINAL_LIBS=-lm
+-DEBUG=-g -ggdb
+ 
+ ifeq ($(uname_S),SunOS)
+ 	# SunOS
+@@ -63,6 +62,11 @@
+ ifeq ($(uname_S),Darwin)
+ 	# Darwin (nothing to do)
+ else
++ifeq ($(uname_S),FreeBSD)
++        # FreeBSD
++        FINAL_CFLAGS?= $(CFLAGS) $(REDIS_CFLAGS) -I${PREFIX}/include
++        FINAL_LDFLAGS= $(LDFLAGS) -pthread
++else
+ ifeq ($(uname_S),AIX)
+         # AIX
+         FINAL_LDFLAGS+= -Wl,-bexpall
+@@ -75,6 +79,7 @@
+ endif
+ endif
+ endif
++endif
+ # Include paths to dependencies
+ FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src
+ 


Property changes on: trunk/databases/redis/files/patch-src-Makefile
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/databases/redis/files/patch-src-config.h
===================================================================
--- trunk/databases/redis/files/patch-src-config.h	                        (rev 0)
+++ trunk/databases/redis/files/patch-src-config.h	2015-11-01 03:36:02 UTC (rev 20616)
@@ -0,0 +1,11 @@
+--- src/config.h.orig	2015-04-07 21:24:36.634829000 +0300
++++ src/config.h	2015-04-07 21:24:53.388849000 +0300
+@@ -62,7 +62,7 @@
+ #endif
+ 
+ /* Test for backtrace() */
+-#if defined(__APPLE__) || (defined(__linux__) && defined(__GLIBC__))
++#if defined(__APPLE__) || (defined(__linux__) && defined(__GLIBC__)) || defined(__FreeBSD__)
+ #define HAVE_BACKTRACE 1
+ #endif
+ 


Property changes on: trunk/databases/redis/files/patch-src-config.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/databases/redis/files/patch-src-mkreleasehdr.sh
===================================================================
--- trunk/databases/redis/files/patch-src-mkreleasehdr.sh	                        (rev 0)
+++ trunk/databases/redis/files/patch-src-mkreleasehdr.sh	2015-11-01 03:36:02 UTC (rev 20616)
@@ -0,0 +1,11 @@
+--- src/mkreleasehdr.sh.orig	2013-08-13 15:39:40.000000000 +0400
++++ src/mkreleasehdr.sh	2013-08-13 15:39:55.000000000 +0400
+@@ -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 --no-ext-diff 2> /dev/null | wc -l`
++GIT_SHA1="00000000"
++GIT_DIRTY="0"
+ BUILD_ID=`uname -n`"-"`date +%s`
+ test -f release.h || touch release.h
+ (cat release.h | grep SHA1 | grep $GIT_SHA1) && \


Property changes on: trunk/databases/redis/files/patch-src-mkreleasehdr.sh
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/databases/redis/files/pkg-message.in
===================================================================
--- trunk/databases/redis/files/pkg-message.in	                        (rev 0)
+++ trunk/databases/redis/files/pkg-message.in	2015-11-01 03:36:02 UTC (rev 20616)
@@ -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.


Property changes on: trunk/databases/redis/files/pkg-message.in
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/databases/redis/files/redis.in
===================================================================
--- trunk/databases/redis/files/redis.in	                        (rev 0)
+++ trunk/databases/redis/files/redis.in	2015-11-01 03:36:02 UTC (rev 20616)
@@ -0,0 +1,33 @@
+#!/bin/sh
+#
+# $MidnightBSD$
+
+# 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="${name}_enable"
+
+extra_commands="reload"
+
+command="%%PREFIX%%/bin/redis-server"
+pidfile="%%REDIS_RUNDIR%%/$name.pid"
+
+# read configuration and set defaults
+load_rc_config "$name"
+: ${redis_enable="NO"}
+: ${redis_user="%%REDIS_USER%%"}
+: ${redis_config="%%PREFIX%%/etc/$name.conf"}
+
+command_args="${redis_config}"
+required_files="${redis_config}"
+run_rc_command "$1"


Property changes on: trunk/databases/redis/files/redis.in
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/databases/redis/pkg-descr
===================================================================
--- trunk/databases/redis/pkg-descr	                        (rev 0)
+++ trunk/databases/redis/pkg-descr	2015-11-01 03:36:02 UTC (rev 20616)
@@ -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/


Property changes on: trunk/databases/redis/pkg-descr
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/databases/redis/pkg-plist
===================================================================
--- trunk/databases/redis/pkg-plist	                        (rev 0)
+++ trunk/databases/redis/pkg-plist	2015-11-01 03:36:02 UTC (rev 20616)
@@ -0,0 +1,11 @@
+bin/redis-benchmark
+bin/redis-check-aof
+bin/redis-check-dump
+bin/redis-cli
+bin/redis-sentinel
+bin/redis-server
+ at sample etc/redis.conf.sample
+ at sample etc/sentinel.conf.sample
+ at dir(%%REDIS_USER%%,%%REDIS_GROUP%%,) %%REDIS_DBDIR%%
+ at dir(%%REDIS_USER%%,%%REDIS_GROUP%%,) %%REDIS_LOGDIR%%
+ at dir(%%REDIS_USER%%,%%REDIS_GROUP%%,) %%REDIS_RUNDIR%%


Property changes on: trunk/databases/redis/pkg-plist
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property


More information about the Midnightbsd-cvs mailing list