diff options
author | sunpoet <sunpoet@FreeBSD.org> | 2011-09-08 01:25:06 +0800 |
---|---|---|
committer | sunpoet <sunpoet@FreeBSD.org> | 2011-09-08 01:25:06 +0800 |
commit | 9aa4bbd9cde679e491341922c0d2d3c6b0d1a0ef (patch) | |
tree | 59b6a155f20283217e6a0f9461e53b4d70c942f9 /databases/cassandra | |
parent | d018e7ddc8c35d9c969647572f04326767ec318e (diff) | |
download | freebsd-ports-gnome-9aa4bbd9cde679e491341922c0d2d3c6b0d1a0ef.tar.gz freebsd-ports-gnome-9aa4bbd9cde679e491341922c0d2d3c6b0d1a0ef.tar.zst freebsd-ports-gnome-9aa4bbd9cde679e491341922c0d2d3c6b0d1a0ef.zip |
- Fix rc.d script
- Remove stop-server
- Link cassandra-cli and nodetool to LOCALBASE/bin
- Bump PORTREVISION for package change
PR: ports/160428
Submitted by: Radim Kolar <hsn@sendmail.cz>
Approved by: Gea-Suan Lin <gslin@gslin.org> (maintainer)
Diffstat (limited to 'databases/cassandra')
-rw-r--r-- | databases/cassandra/Makefile | 15 | ||||
-rw-r--r-- | databases/cassandra/files/cassandra.in | 7 | ||||
-rw-r--r-- | databases/cassandra/pkg-plist | 3 |
3 files changed, 19 insertions, 6 deletions
diff --git a/databases/cassandra/Makefile b/databases/cassandra/Makefile index 95ffafc247df..a0a980d0f1a6 100644 --- a/databases/cassandra/Makefile +++ b/databases/cassandra/Makefile @@ -7,6 +7,7 @@ PORTNAME= cassandra PORTVERSION= 0.8.4 +PORTREVISION= 1 CATEGORIES= databases java MASTER_SITES= ${MASTER_SITE_APACHE} MASTER_SITE_SUBDIR= cassandra/${PORTVERSION} @@ -19,22 +20,30 @@ COMMENT= Open source distributed database management system LICENSE= ASL JAVA_VERSION= 1.6+ +NO_BUILD= yes USE_JAVA= yes USE_RC_SUBR= cassandra +REINPLACE_ARGS= -i '' CONFIGS= cassandra.yaml log4j-server.properties access.properties \ log4j-tools.properties passwd.properties \ cassandra-topology.properties -do-build: +post-extract: + @${RM} ${WRKSRC}/bin/*.bat ${WRKSRC}/bin/stop-server .for i in ${CONFIGS} @${MV} ${WRKSRC}/conf/${i} ${WRKSRC}/conf/${i}.sample .endfor +do-patch: + @${REINPLACE_CMD} -e 's|/usr/share/cassandra|${DATADIR}/bin|' ${WRKSRC}/bin/cassandra-cli ${WRKSRC}/bin/nodetool + @${REINPLACE_CMD} -e 's|\`dirname \$$\0\`/..|${DATADIR}|' ${WRKSRC}/bin/cassandra.in.sh + do-install: @${MKDIR} ${DATADIR} - @${CP} -R ${WRKSRC}/* ${DATADIR} - @${RM} ${DATADIR}/bin/*.bat + @cd ${WRKSRC}/ && ${COPYTREE_SHARE} . ${DATADIR} + @${LN} -s ${DATADIR}/bin/cassandra-cli ${PREFIX}/bin/cassandra-cli + @${LN} -s ${DATADIR}/bin/nodetool ${PREFIX}/bin/nodetool post-install: @PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL diff --git a/databases/cassandra/files/cassandra.in b/databases/cassandra/files/cassandra.in index f755e595ea08..e229e70bd285 100644 --- a/databases/cassandra/files/cassandra.in +++ b/databases/cassandra/files/cassandra.in @@ -25,6 +25,7 @@ # DAMAGE. # PROVIDE: cassandra +# REQUIRE: LOGIN # KEYWORD: shutdown # # $FreeBSD$ @@ -32,6 +33,8 @@ . /etc/rc.subr name="cassandra" +rcvar=`set_rcvar` +load_rc_config $name cassandra_enable=${cassandra_enable:-"NO"} cassandra_vmargs=${cassandra_vmargs:-"-XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:+CMSIncrementalPacing -XX:CMSIncrementalDutyCycleMin=0 -XX:+CMSIncrementalDutyCycle=10"} @@ -42,8 +45,8 @@ command_args="-p /var/run/cassandra.pid >/dev/null" procname="java" pidfile=/var/run/cassandra.pid -rcvar=`set_rcvar` -load_rc_config $name export MAX_HEAP_SIZE="$cassandra_memory" export HEAP_NEWSIZE="$cassandra_newgen" +export PATH=$PATH:%%LOCALBASE%%/bin + run_rc_command "$1" diff --git a/databases/cassandra/pkg-plist b/databases/cassandra/pkg-plist index 7f4dc95082e5..fea333caa9a2 100644 --- a/databases/cassandra/pkg-plist +++ b/databases/cassandra/pkg-plist @@ -1,4 +1,6 @@ @comment $FreeBSD$ +bin/cassandra-cli +bin/nodetool %%DATADIR%%/CHANGES.txt %%DATADIR%%/LICENSE.txt %%DATADIR%%/NEWS.txt @@ -12,7 +14,6 @@ %%DATADIR%%/bin/sstable2json %%DATADIR%%/bin/sstablekeys %%DATADIR%%/bin/sstableloader -%%DATADIR%%/bin/stop-server %%DATADIR%%/conf/README.txt %%DATADIR%%/conf/access.properties.sample %%DATADIR%%/conf/cassandra-env.sh |