Index: head/databases/tarantool/Makefile =================================================================== --- head/databases/tarantool/Makefile (revision 334647) +++ head/databases/tarantool/Makefile (revision 334648) @@ -1,76 +1,84 @@ # Created by: Veniamin Gvozdikov # $FreeBSD$ PORTNAME= tarantool PORTVERSION= 1.5.1 +PORTREVISION= 1 CATEGORIES= databases MASTER_SITES= http://tarantool.org/dist/ DISTNAME= ${PORTNAME}-${PORTVERSION}-${TR_REV}-src MAINTAINER= vg@FreeBSD.org COMMENT= High performance key/value storage server LICENSE= BSD -TR_REV= 96-gae1ec01 +TR_REV= 248-g1f7eab2 MAKE_JOBS_UNSAFE=yes USES= cmake gettext:build gmake iconv perl5 compiler:c++11-lang USE_LDCONFIG= yes USE_RC_SUBR= ${PORTNAME} SUB_FILES= pkg-message -CMAKE_ARGS= -DCMAKE_MAN_DIR=man +CMAKE_ARGS= -DCMAKE_MAN_DIR=man \ + -DCMAKE_SYSCONF_DIR=${ETCDIR} \ + -DCMAKE_LOCALSTATE_DIR=${DATADIR} -OPTIONS_DEFINE= CLIENT MYSQL PGSQL +OPTIONS_DEFINE= CLIENT +OPTIONS_GROUP= PLUGINS +OPTIONS_GROUP_PLUGINS= MYSQL PGSQL +PLUGINS_DESC= Plugins list CLIENT_DESC= Enable client DEBUG_DESC= Enable debug MYSQL_DESC= Install MySQL plugin PGSQL_DESC= Install PostgreSQL plugin OPTIONS_DEFAULT=CLIENT MAN1= tarantool_box.1 -NO_STAGE= yes - .include .if ${PORT_OPTIONS:MCLIENT} CMAKE_ARGS+= -DENABLE_CLIENT=true PLIST_SUB+= CLIENT="" MAN1+= tarantool.1 .else PLIST_SUB+= CLIENT="@comment " .endif .if ${PORT_OPTIONS:MDEBUG} CMAKE_ARGS+= -DCMAKE_BUILD_TYPE=RelWithDebugInfo \ -DENABLE_BACKTRACE=ON .else CMAKE_ARGS+= -DCMAKE_BUILD_TYPE=Rel \ -DENABLE_BACKTRACE=OFF .endif .if ${PORT_OPTIONS:MMYSQL} -CMAKE_ARGS+= -DWITH_MYSQL=ON \ - -DMYSQL_INCLUDE_DIR=${LOCALBASE}/include/mysql \ - -DMYSQL_LIBRARIES=${LOCALBASE}/lib/mysql +CMAKE_ARGS+= -DWITH_MYSQL=ON PLIST_SUB+= MYSQL="" USE_MYSQL= yes .else CMAKE_ARGS+= -DWITH_MYSQL=OFF PLIST_SUB+= MYSQL="@comment " .endif .if ${PORT_OPTIONS:MPGSQL} CMAKE_ARGS+= -DWITH_POSTGRESQL=ON PLIST_SUB+= PGSQL="" USE_PGSQL= yes .else CMAKE_ARGS+= -DWITH_POSTGRESQL=OFF PLIST_SUB+= PGSQL="@comment " +.endif + +.if ${PORT_OPTIONS:MMYSQL} || ${PORT_OPTIONS:MPGSQL} +PLIST_SUB+= PLUGINS="" +.else +PLIST_SUB+= PLUGINS="@comment " .endif post-install: @${CAT} ${PKGMESSAGE} .include Index: head/databases/tarantool/distinfo =================================================================== --- head/databases/tarantool/distinfo (revision 334647) +++ head/databases/tarantool/distinfo (revision 334648) @@ -1,2 +1,2 @@ -SHA256 (tarantool-1.5.1-96-gae1ec01-src.tar.gz) = f9e927904a0e2097771ea3e53a62ee48cff6cd08c83621836a69edcfe410e8a1 -SIZE (tarantool-1.5.1-96-gae1ec01-src.tar.gz) = 2786139 +SHA256 (tarantool-1.5.1-248-g1f7eab2-src.tar.gz) = 7586ceaba1528e690220b9504222434f6d2dd249b709356f8be015a0eeb262d0 +SIZE (tarantool-1.5.1-248-g1f7eab2-src.tar.gz) = 2816462 Index: head/databases/tarantool/files/patch-src_CMakeLists.txt =================================================================== --- head/databases/tarantool/files/patch-src_CMakeLists.txt (revision 334647) +++ head/databases/tarantool/files/patch-src_CMakeLists.txt (nonexistent) @@ -1,12 +0,0 @@ ---- src/CMakeLists.txt.orig 2013-09-30 17:30:23.623968376 +0000 -+++ src/CMakeLists.txt 2013-09-30 17:30:50.254969720 +0000 -@@ -153,7 +153,8 @@ - endif() - - if (TARGET_OS_FREEBSD AND NOT TARGET_OS_DEBIAN_FREEBSD) -- set (common_libraries ${common_libraries} intl) -+ find_library (INTL intl) -+ set (common_libraries ${common_libraries} ${INTL}) - endif() - - if (ENABLE_BACKTRACE AND HAVE_BFD) Property changes on: head/databases/tarantool/files/patch-src_CMakeLists.txt ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/databases/tarantool/files/patch-CMakeLists.txt =================================================================== --- head/databases/tarantool/files/patch-CMakeLists.txt (nonexistent) +++ head/databases/tarantool/files/patch-CMakeLists.txt (revision 334648) @@ -0,0 +1,11 @@ +--- CMakeLists.txt.orig 2013-11-22 16:46:37.651143426 +0400 ++++ CMakeLists.txt 2013-11-22 16:50:55.948120860 +0400 +@@ -147,7 +147,7 @@ if (NOT DEFINED CMAKE_SYSCONF_DIR) + set (CMAKE_SYSCONF_DIR "etc") + endif() + if (NOT DEFINED CMAKE_LOCALSTATE_DIR) +- set (CMAKE_LOCALSTATE_DIR "var") ++ set (CMAKE_LOCALSTATE_DIR "var/lib/tarantool") + endif() + if (NOT DEFINED CMAKE_MAN_DIR) + set (CMAKE_MAN_DIR "man") Property changes on: head/databases/tarantool/files/patch-CMakeLists.txt ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property 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 Index: head/databases/tarantool/files/patch-test_CMakeLists.txt =================================================================== --- head/databases/tarantool/files/patch-test_CMakeLists.txt (revision 334647) +++ head/databases/tarantool/files/patch-test_CMakeLists.txt (revision 334648) @@ -1,11 +1,18 @@ ---- test/CMakeLists.txt.orig 2013-09-08 19:12:21.819118224 +0000 -+++ test/CMakeLists.txt 2013-09-08 19:13:09.021114858 +0000 -@@ -22,7 +22,5 @@ if (ENABLE_RPM) - else() - install (FILES ${CMAKE_SOURCE_DIR}/test/share/tarantool_tgz.cfg - DESTINATION "${CMAKE_SYSCONF_DIR}" +--- test/CMakeLists.txt.orig 2013-11-22 15:05:16.000000000 +0400 ++++ test/CMakeLists.txt 2013-11-22 19:07:51.591802946 +0400 +@@ -16,7 +16,7 @@ + macro(install_cfg type_cfg dest) + install (FILES ${CMAKE_SOURCE_DIR}/test/share/tarantool_${type_cfg}.cfg + DESTINATION ${dest} - RENAME "tarantool.cfg") -- install (FILES ${CMAKE_SOURCE_DIR}/test/box/00000000000000000001.snap -- DESTINATION "${CMAKE_LOCALSTATE_DIR}/lib/tarantool") + RENAME "tarantool.cfg.sample") + endmacro(install_cfg) + + if (ENABLE_RPM) +@@ -31,5 +31,5 @@ + endif() + + install (FILES ${CMAKE_SOURCE_DIR}/test/box/00000000000000000001.snap +- DESTINATION "${CMAKE_LOCALSTATE_DIR}/lib/tarantool") ++ DESTINATION "${CMAKE_LOCALSTATE_DIR}") endif() Index: head/databases/tarantool/files/patch-test_share_tarantool_tgz.cfg =================================================================== --- head/databases/tarantool/files/patch-test_share_tarantool_tgz.cfg (nonexistent) +++ head/databases/tarantool/files/patch-test_share_tarantool_tgz.cfg (revision 334648) @@ -0,0 +1,22 @@ +--- test/share/tarantool_tgz.cfg.orig 2013-11-22 20:37:20.623185968 +0400 ++++ test/share/tarantool_tgz.cfg 2013-11-22 20:38:47.452245623 +0400 +@@ -11,11 +11,11 @@ + # + # Store the pid in this file. Relative to + # startup dir. +-pid_file = "box.pid" ++pid_file = "/var/run/tarantool.pid" + + # + # Pipe all the logs to the console +-#logger="" ++logger="cat - >> /var/log/tarantool.log" + + # + # Read only and read-write port. +@@ -46,4 +46,4 @@ + + # + # working directory (daemon will chdir(2) to it) +-work_dir = "var/lib/tarantool" ++work_dir = "/var/db/tarantool" Property changes on: head/databases/tarantool/files/patch-test_share_tarantool_tgz.cfg ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property 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 Index: head/databases/tarantool/files/pkg-message.in =================================================================== --- head/databases/tarantool/files/pkg-message.in (revision 334647) +++ head/databases/tarantool/files/pkg-message.in (revision 334648) @@ -1,13 +1,21 @@ ######################################################### # # # After install you'll need: # -# Edit example config: -# %%ETCDIR%%/tarantool.cfg.sample -# Init storage: -# %%PREFIX%%/bin/tarantool_box --init-storage \ -# -c %%ETCDIR%%/tarantool.cfg +# Edit/copy example config: +# %%ETCDIR%%/tarantool.cfg.sample to +# %%ETCDIR%%/tarantool.cfg +# +# Configuration at /etc/rc.conf: +# +# * Enable tarantool on startup: +# tarantool_enable="YES" +# * Change config (Default %%ETCDIR%%/tarantool.cfg): +# tarantool_config="%%ETCDIR%%/tarantool.cfg" +# * Path to storage, depended by option work_dir at: +# %%ETCDIR%%/tarantool.cfg +# tarantool_data="/var/db/tarantool" # # ######################################################### Property changes on: head/databases/tarantool/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 Index: head/databases/tarantool/files/tarantool.in =================================================================== --- head/databases/tarantool/files/tarantool.in (revision 334647) +++ head/databases/tarantool/files/tarantool.in (revision 334648) @@ -1,27 +1,53 @@ #!/bin/sh # # $FreeBSD$ # PROVIDE: tarantool # REQUIRE: LOGIN # KEYWORD: shutdown # # tarantool_enable="YES" # tarantool_config="" +# tarantool_data="/var/db/tarantool" # . /etc/rc.subr name="tarantool" rcvar=tarantool_enable load_rc_config "$name" tarantool_enable=${tarantool_enable:-"NO"} tarantool_config=${tarantool_config:-"%%ETCDIR%%/$name.cfg"} +tarantool_data=${tarantool_data:-"/var/db/tarantool"} command="%%PREFIX%%/bin/tarantool_box" -command_args="--daemonize --config ${tarantool_config}" +command_args="--config=${tarantool_config} --background" pidfile="/var/run/$name.pid" + +start_precmd="${name}_prestart" + +tarantool_prestart() +{ + if ! [ -d ${tarantool_data} ] + then + eval mkdir -p ${tarantool_data} + fi + + if ! [ -f "${tarantool_data}/00000000000000000001.snap" ] + then + if ! [ -f ${tarantool_config} ] + then + echo "===> Install default config file." + eval cp "%%ETCDIR%%/tarantool.cfg.sample" ${tarantool_config} + echo "===> Install default snapshot." + eval cp "%%DATADIR%%/00000000000000000001.snap" ${tarantool_data} + else + echo "===> Init tarantool storage by ${tarantool_config}" + eval ${command} --config=${tarantool_config} --init-storage + fi + fi +} run_rc_command "$1" Property changes on: head/databases/tarantool/files/tarantool.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 Index: head/databases/tarantool/pkg-plist =================================================================== --- head/databases/tarantool/pkg-plist (revision 334647) +++ head/databases/tarantool/pkg-plist (revision 334648) @@ -1,59 +1,62 @@ bin/tarancheck bin/tarantar bin/tarantool_box %%CLIENT%%bin/tarantool -etc/tarantool.cfg.sample +%%ETCDIR%%/tarantool.cfg.sample include/tarantool/tnt.h include/tarantool/tnt_buf.h include/tarantool/tnt_call.h include/tarantool/tnt_delete.h include/tarantool/tnt_dir.h include/tarantool/tnt_enc.h include/tarantool/tnt_insert.h include/tarantool/tnt_io.h include/tarantool/tnt_iob.h include/tarantool/tnt_iter.h include/tarantool/tnt_lex.h include/tarantool/tnt_log.h include/tarantool/tnt_mem.h include/tarantool/tnt_net.h include/tarantool/tnt_opt.h include/tarantool/tnt_ping.h include/tarantool/tnt_proto.h include/tarantool/tnt_queue.h include/tarantool/tnt_reply.h include/tarantool/tnt_request.h include/tarantool/tnt_rpl.h include/tarantool/tnt_select.h include/tarantool/tnt_snapshot.h include/tarantool/tnt_sql.h include/tarantool/tnt_stream.h include/tarantool/tnt_tuple.h include/tarantool/tnt_update.h include/tarantool/tnt_utf8.h include/tarantool/tnt_xlog.h lib/libtarantoolnet.so.1.1 lib/libtarantoolrpl.so.1 lib/libtarantoolnet.a lib/libtarantoolnet.so lib/libtarantool.a lib/libtarantoolnet.so.1 lib/libtarantoolrpl.so lib/libtarantoolsql.so.1.1 lib/libtarantoolsql.a lib/libtarantoolsql.so.1 lib/libtarantoolrpl.so.1.1 lib/libtarantool.so.1 lib/libtarantoolsql.so lib/libtarantool.so.1.1 lib/libtarantool.so lib/libtarantoolrpl.a %%MYSQL%%lib/tarantool/plugins/libmysql.so %%PGSQL%%lib/tarantool/plugins/libpg.so %%DOCSDIR%%/README.md %%DOCSDIR%%/box-protocol.txt %%DOCSDIR%%/LICENSE -@dirrm %%DOCSDIR%% +%%DATADIR%%/00000000000000000001.snap +@dirrmtry %%ETCDIR%% @dirrm include/tarantool -@dirrmtry lib/tarantool/plugins -@dirrmtry lib/tarantool +%%PLUGINS%%@dirrm lib/tarantool/plugins +%%PLUGINS%%@dirrm lib/tarantool +@dirrm %%DOCSDIR%% +@dirrm %%DATADIR%%