HornetQ is an open source project to build a multi-protocol, embeddable,

very high performance, clustered, asynchronous messaging system, designed
with usability in mind.

HornetQ is an example of Message Oriented Middleware (MoM)

WWW:	http://www.jboss.org/hornetq

PR:		ports/167952
Submitted by:	Radim Kolar
This commit is contained in:
Martin Wilke 2012-05-25 15:24:26 +00:00
parent 7454984b34
commit ed9c37dec7
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=297432
12 changed files with 2239 additions and 0 deletions

View file

@ -219,6 +219,7 @@
SUBDIR += hinfo
SUBDIR += hlmaster
SUBDIR += honeyd
SUBDIR += hornetq
SUBDIR += hostapd
SUBDIR += howl
SUBDIR += hping

63
net/hornetq/Makefile Normal file
View file

@ -0,0 +1,63 @@
# New ports collection makefile for: hornetq
# Date created: 2012-03-16
# Whom: Radim Kolar
#
# $FreeBSD$
#
PORTNAME= hornetq
PORTVERSION= 2.2.14
CATEGORIES= net java
MASTER_SITES= http://downloads.jboss.org/hornetq/
DISTNAME= ${PORTNAME}-${PORTVERSION}.Final
MAINTAINER= hsn@sendmail.cz
COMMENT= Multi-protocol asynchronous messaging system
LICENSE= LGPL21
PORTDOCS= quickstart-guide api rest-api user-manual \
rest-interface-manual README.html
USE_RC_SUBR= hornetq
USE_JAVA= yes
JAVA_VERSION= 1.6
JAVA_VENDOR= openjdk
NO_BUILD= yes
CONFIG_DIRS= clustered non-clustered
CONFIG_FILES= hornetq-beans.xml hornetq-users.xml hornetq-configuration.xml \
jndi.properties hornetq-jms.xml logging.properties
CONFIGURE_WRKSRC= ${WRKSRC}/native-src
LIBTOOLFILES= native-src/aclocal.m4
ACLOCAL_ARGS= --acdir=${ACLOCAL_DIR} -I ${LOCALBASE}/share/aclocal/
AUTOMAKE_ARGS= --add-missing -c
post-extract:
${RM} -r ${WRKSRC}/tools ${WRKSRC}/native-src ${WRKSRC}/config/jboss-as*
${RM} ${WRKSRC}/bin/*.bat ${WRKSRC}/bin/*.so ${WRKSRC}/bin/build.sh
${MV} ${WRKSRC}/schemas ${WRKSRC}/config
.for dir in ${CONFIG_DIRS}
.for config in ${CONFIG_FILES}
${MV} ${WRKSRC}/config/stand-alone/${dir}/${config} ${WRKSRC}/config/stand-alone/${dir}/${config}.sample
.endfor
.endfor
do-install:
${MKDIR} ${DATADIR}
${MKDIR} ${DATADIR}/bin
${INSTALL_SCRIPT} ${WRKSRC}/bin/*.sh ${DATADIR}/bin
${MKDIR} ${DOCSDIR}
cd ${WRKSRC}/docs && ${COPYTREE_SHARE} . ${DOCSDIR}
cd ${WRKSRC} && ${COPYTREE_SHARE} lib ${DATADIR}
${RM} -f ${WRKSRC}/config/stand-alone/clustered/*.orig
${RM} -f ${WRKSRC}/config/stand-alone/non-clustered/*.orig
cd ${WRKSRC} && ${COPYTREE_SHARE} config ${DATADIR}
${MKDIR} ${EXAMPLESDIR}
cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${EXAMPLESDIR}
post-install:
PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.include <bsd.port.mk>

2
net/hornetq/distinfo Normal file
View file

@ -0,0 +1,2 @@
SHA256 (hornetq-2.2.14.Final.tar.gz) = 40f4878949f80b894db7f7d951f3eadf16116879d37a84f2009a8e02cb4574f0
SIZE (hornetq-2.2.14.Final.tar.gz) = 17208133

View file

@ -0,0 +1,77 @@
#!/bin/sh
#
# Copyright (c) 2012, Radim Kolar
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
# DAMAGE.
# PROVIDE: hornetq
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# $FreeBSD$
. /etc/rc.subr
name="hornetq"
rcvar=hornetq_enable
load_rc_config $name
hornetq_enable=${hornetq_enable:-"NO"}
hornetq_config=${hornetq_config:-"non-clustered"}
hornetq_deployment=${hornetq_deployment:-"hornetq-beans.xml"}
hornetq_data=${hornetq_data:-"/var/spool/hornetq"}
command=%%DATADIR%%/bin/run.sh
command_args="%%DATADIR%%/config/stand-alone/${hornetq_config} ${hornetq_deployment}"
stop_precmd="${name}_prestop"
start_cmd="${name}_start"
sig_stop="KILL"
command_interpreter="/bin/sh"
pidfile=/var/run/hornetq.pid
export PATH=$PATH:%%LOCALBASE%%/bin
export HORNETQ_HOME=%%DATADIR%%
export CLUSTER_PROPS=-Ddata.dir=${hornetq_data}
export JAVA_VENDOR=openjdk
export JAVA_VERSION=1.6
hornetq_prestop() {
$HORNETQ_HOME/bin/stop.sh %%DATADIR%%/config/stand-alone/${hornetq_config}
sleep 10
return 0
}
hornetq_start()
{
if [ -z "$rc_pid" ]; then
echo -n "Starting $name"
mkdir -p ${hornetq_data}
${command} ${command_args} &
echo -n $! > $pidfile
echo "."
else
echo "$name is already running with pid=$rc_pid."
fi
}
run_rc_command "$1"

View file

@ -0,0 +1,15 @@
--- config/stand-alone/clustered/logging.properties.sample.orig 2012-04-13 18:43:44.000000000 +0200
+++ config/stand-alone/clustered/logging.properties.sample 2012-05-16 09:21:49.552599669 +0200
@@ -15,10 +15,10 @@
# Note that these classes must be on the system classpath.
# By default we only configure a ConsoleHandler, which will only
# show messages at the INFO and above levels.
-handlers=java.util.logging.ConsoleHandler,java.util.logging.FileHandler
+handlers=java.util.logging.FileHandler
java.util.logging.ConsoleHandler.formatter=org.hornetq.integration.logging.HornetQLoggerFormatter
java.util.logging.FileHandler.level=INFO
-java.util.logging.FileHandler.pattern=../logs/hornetq.log
+java.util.logging.FileHandler.pattern=/var/log/hornetq.log
java.util.logging.FileHandler.formatter=org.hornetq.integration.logging.HornetQLoggerFormatter
# Default global logging level.
# This specifies which kinds of events are logged across

View file

@ -0,0 +1,16 @@
--- config/stand-alone/non-clustered/logging.properties.sample.orig 2012-04-13 18:43:44.000000000 +0200
+++ config/stand-alone/non-clustered/logging.properties.sample 2012-05-16 09:28:24.333462186 +0200
@@ -15,11 +15,11 @@
# Note that these classes must be on the system classpath.
# By default we only configure a ConsoleHandler, which will only
# show messages at the INFO and above levels.
-handlers=java.util.logging.ConsoleHandler,java.util.logging.FileHandler
+handlers=java.util.logging.FileHandler
java.util.logging.ConsoleHandler.formatter=org.hornetq.integration.logging.HornetQLoggerFormatter
java.util.logging.FileHandler.level=INFO
java.util.logging.FileHandler.formatter=org.hornetq.integration.logging.HornetQLoggerFormatter
-java.util.logging.FileHandler.pattern=../logs/hornetq.log
+java.util.logging.FileHandler.pattern=/var/log/hornetq.log
# Default global logging level.
# This specifies which kinds of events are logged across
# all loggers. For any given facility this global level

View file

@ -0,0 +1,19 @@
--- bin/run.sh.orig 2012-04-13 18:43:44.000000000 +0200
+++ bin/run.sh 2012-05-16 06:16:41.267520836 +0200
@@ -1,7 +1,6 @@
-#!/bin/sh
+#!/bin/sh -T
-export HORNETQ_HOME=..
-mkdir -p ../logs
+if [ -z $HORNETQ_HOME ]; then export HORNETQ_HOME=..; fi
# By default, the server is started in the non-clustered standalone configuration
if [ a"$1" = a ]; then CONFIG_DIR=$HORNETQ_HOME/config/stand-alone/non-clustered; else CONFIG_DIR="$1"; fi
@@ -20,4 +19,4 @@
echo "***********************************************************************************"
echo "java $JVM_ARGS -classpath $CLASSPATH org.hornetq.integration.bootstrap.HornetQBootstrapServer $FILENAME"
echo "***********************************************************************************"
-java $JVM_ARGS -classpath $CLASSPATH -Dcom.sun.management.jmxremote org.hornetq.integration.bootstrap.HornetQBootstrapServer $FILENAME
\ No newline at end of file
+java $JVM_ARGS -classpath $CLASSPATH -Dcom.sun.management.jmxremote org.hornetq.integration.bootstrap.HornetQBootstrapServer $FILENAME

View file

@ -0,0 +1,10 @@
--- bin/stop.sh.orig 2012-04-13 18:43:44.000000000 +0200
+++ bin/stop.sh 2012-05-15 18:46:47.292027604 +0200
@@ -1,5 +1,5 @@
#!/bin/sh
-export HORNETQ_HOME=..
+if [ -z $HORNETQ_HOME ]; then export HORNETQ_HOME=..;fi
if [ a"$1" = a ]; then CONFIG_DIR=$HORNETQ_HOME/config/stand-alone/non-clustered; else CONFIG_DIR="$1"; fi
touch $CONFIG_DIR/STOP_ME;
\ No newline at end of file

17
net/hornetq/pkg-deinstall Normal file
View file

@ -0,0 +1,17 @@
#!/bin/sh
#
# Removes unchanged configuration files
#
if [ "$2" = "DEINSTALL" ]; then
if [ ! -d $PKG_PREFIX/share/hornetq/config/stand-alone ]; then exit 1; fi
cd $PKG_PREFIX/share/hornetq/config/stand-alone
for cfgdir in clustered non-clustered; do
for cfgfile in hornetq-beans.xml hornetq-users.xml \
hornetq-configuration.xml jndi.properties \
hornetq-jms.xml logging.properties; do
if cmp -s $cfgdir/$cfgfile.sample $cfgdir/$cfgfile; then
rm $cfgdir/$cfgfile
fi
done
done
fi

7
net/hornetq/pkg-descr Normal file
View file

@ -0,0 +1,7 @@
HornetQ is an open source project to build a multi-protocol, embeddable,
very high performance, clustered, asynchronous messaging system, designed
with usability in mind.
HornetQ is an example of Message Oriented Middleware (MoM)
WWW: http://www.jboss.org/hornetq

18
net/hornetq/pkg-install Normal file
View file

@ -0,0 +1,18 @@
#!/bin/sh
#
# Copy sample hornetq config files to real ones if real ones does not exists
#
if [ "$2" = "POST-INSTALL" ]; then
if [ ! -d $PKG_PREFIX/share/hornetq/config/stand-alone ]; then exit 1; fi
umask 027
cd $PKG_PREFIX/share/hornetq/config/stand-alone
for cfgdir in clustered non-clustered; do
for cfgfile in hornetq-beans.xml hornetq-users.xml \
hornetq-configuration.xml jndi.properties \
hornetq-jms.xml logging.properties; do
if [ ! -f $cfgdir/$cfgfile ]; then
cp -p $cfgdir/$cfgfile.sample $cfgdir/$cfgfile
fi
done
done
fi

1994
net/hornetq/pkg-plist Normal file

File diff suppressed because it is too large Load diff