summaryrefslogtreecommitdiff
path: root/net/rabbitmq
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2008-09-03 15:51:10 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2008-09-03 15:51:10 +0000
commitfeba621254c9831d67cc5238d7d6fe581c571c69 (patch)
tree1e55333181f2a6ec062491fc07e261f621ea7409 /net/rabbitmq
parent- Enable 3D boards (diff)
- Change rabbitmq to rabbitmq_server in TARGET_DIR to match rabbitmq install docs recommendation
- Fix rcscript - Create var/etc dirs on package installation and correctly dirrmtry them on deinstallation PR: 127033 Submitted by: Barry Pederson <bp at barryp dot org> Approved by: "Phillip N." <pneumann at gmail dot com> (maintainer)
Notes
Notes: svn path=/head/; revision=219782
Diffstat (limited to 'net/rabbitmq')
-rw-r--r--net/rabbitmq/Makefile9
-rw-r--r--net/rabbitmq/files/rabbitmq.in5
-rw-r--r--net/rabbitmq/pkg-plist176
3 files changed, 99 insertions, 91 deletions
diff --git a/net/rabbitmq/Makefile b/net/rabbitmq/Makefile
index ffaf48be5f81..e2ea0f1253d7 100644
--- a/net/rabbitmq/Makefile
+++ b/net/rabbitmq/Makefile
@@ -7,6 +7,7 @@
PORTNAME= rabbitmq
PORTVERSION= 1.4.0
+PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= http://www.rabbitmq.com/releases/rabbitmq-server/v${PORTVERSION}/
DISTNAME= ${PORTNAME}-server-${PORTVERSION}
@@ -19,16 +20,18 @@ RUN_DEPENDS= erlc:${PORTSDIR}/lang/erlang-lite
USE_GMAKE= yes
USE_PYTHON= yes
-MAKE_ENV+= TARGET_DIR="${PREFIX}/lib/erlang/lib/rabbitmq-${PORTVERSION}" SBIN_DIR="${PREFIX}/sbin/"
+MAKE_ENV+= TARGET_DIR="${PREFIX}/lib/erlang/lib/rabbitmq_server-${PORTVERSION}" SBIN_DIR="${PREFIX}/sbin/"
SCRIPTS_DIR= ${WRKSRC}/scripts/
USE_RC_SUBR= rabbitmq
PLIST_SUB= "VERSION=${PORTVERSION}"
post-patch:
- @${REINPLACE_CMD} -e 's|/etc/default|${PREFIX}/etc/rabbitmq|g ; s|/var/lib|/var/db|g' \
+ @${REINPLACE_CMD} -e 's|/etc/default|${PREFIX}/etc/rabbitmq|g ; s|/var/lib|/var/db|g ; s|erl|${PREFIX}/bin/erl|g' \
${SCRIPTS_DIR}/rabbitmq-multi ${SCRIPTS_DIR}/rabbitmq-server ${SCRIPTS_DIR}/rabbitmqctl
- @${MKDIR} /var/log/rabbitmq /var/db/rabbitmq/mnesia ${PREFIX}/etc/rabbitmq
@${FIND} ${WRKSRC} -name "*.bak" | ${XARGS} ${RM}
+post-install:
+ @${MKDIR} /var/log/rabbitmq /var/db/rabbitmq/mnesia ${PREFIX}/etc/rabbitmq
+
.include <bsd.port.mk>
diff --git a/net/rabbitmq/files/rabbitmq.in b/net/rabbitmq/files/rabbitmq.in
index 4d68bb03a3e4..0b26934aebb3 100644
--- a/net/rabbitmq/files/rabbitmq.in
+++ b/net/rabbitmq/files/rabbitmq.in
@@ -17,19 +17,20 @@
# Set some defaults
rabbitmq_enable=${rabbitmq_enable:-"NO"}
+prefix=%%PREFIX%%
name=rabbitmq
start_cmd="${name}_start"
stop_cmd="${name}_stop"
rabbitmq_start()
{
- rabbitmq-server -detached
+ ${prefix}/sbin/rabbitmq-server -detached
echo "RabbitMQ started"
}
rabbitmq_stop()
{
- rabbitmqctl stop
+ ${prefix}/sbin/rabbitmqctl stop
}
rcvar=`set_rcvar`
diff --git a/net/rabbitmq/pkg-plist b/net/rabbitmq/pkg-plist
index 36812a1ecb1d..ae6bb397562d 100644
--- a/net/rabbitmq/pkg-plist
+++ b/net/rabbitmq/pkg-plist
@@ -1,90 +1,94 @@
sbin/rabbitmq-multi
sbin/rabbitmq-server
sbin/rabbitmqctl
-lib/erlang/lib/rabbitmq-%%VERSION%%/INSTALL
-lib/erlang/lib/rabbitmq-%%VERSION%%/LICENSE
-lib/erlang/lib/rabbitmq-%%VERSION%%/LICENSE-MPL-RabbitMQ
-lib/erlang/lib/rabbitmq-%%VERSION%%/ebin/buffering_proxy.beam
-lib/erlang/lib/rabbitmq-%%VERSION%%/ebin/rabbit.app
-lib/erlang/lib/rabbitmq-%%VERSION%%/ebin/rabbit.beam
-lib/erlang/lib/rabbitmq-%%VERSION%%/ebin/rabbit.rel
-lib/erlang/lib/rabbitmq-%%VERSION%%/ebin/rabbit_access_control.beam
-lib/erlang/lib/rabbitmq-%%VERSION%%/ebin/rabbit_amqqueue.beam
-lib/erlang/lib/rabbitmq-%%VERSION%%/ebin/rabbit_amqqueue_process.beam
-lib/erlang/lib/rabbitmq-%%VERSION%%/ebin/rabbit_amqqueue_sup.beam
-lib/erlang/lib/rabbitmq-%%VERSION%%/ebin/rabbit_binary_generator.beam
-lib/erlang/lib/rabbitmq-%%VERSION%%/ebin/rabbit_binary_parser.beam
-lib/erlang/lib/rabbitmq-%%VERSION%%/ebin/rabbit_channel.beam
-lib/erlang/lib/rabbitmq-%%VERSION%%/ebin/rabbit_control.beam
-lib/erlang/lib/rabbitmq-%%VERSION%%/ebin/rabbit_error_logger.beam
-lib/erlang/lib/rabbitmq-%%VERSION%%/ebin/rabbit_exchange.beam
-lib/erlang/lib/rabbitmq-%%VERSION%%/ebin/rabbit_framing.beam
-lib/erlang/lib/rabbitmq-%%VERSION%%/ebin/rabbit_framing_channel.beam
-lib/erlang/lib/rabbitmq-%%VERSION%%/ebin/rabbit_heartbeat.beam
-lib/erlang/lib/rabbitmq-%%VERSION%%/ebin/rabbit_load.beam
-lib/erlang/lib/rabbitmq-%%VERSION%%/ebin/rabbit_log.beam
-lib/erlang/lib/rabbitmq-%%VERSION%%/ebin/rabbit_misc.beam
-lib/erlang/lib/rabbitmq-%%VERSION%%/ebin/rabbit_mnesia.beam
-lib/erlang/lib/rabbitmq-%%VERSION%%/ebin/rabbit_multi.beam
-lib/erlang/lib/rabbitmq-%%VERSION%%/ebin/rabbit_networking.beam
-lib/erlang/lib/rabbitmq-%%VERSION%%/ebin/rabbit_node_monitor.beam
-lib/erlang/lib/rabbitmq-%%VERSION%%/ebin/rabbit_persister.beam
-lib/erlang/lib/rabbitmq-%%VERSION%%/ebin/rabbit_reader.beam
-lib/erlang/lib/rabbitmq-%%VERSION%%/ebin/rabbit_realm.beam
-lib/erlang/lib/rabbitmq-%%VERSION%%/ebin/rabbit_router.beam
-lib/erlang/lib/rabbitmq-%%VERSION%%/ebin/rabbit_sup.beam
-lib/erlang/lib/rabbitmq-%%VERSION%%/ebin/rabbit_tests.beam
-lib/erlang/lib/rabbitmq-%%VERSION%%/ebin/rabbit_ticket.beam
-lib/erlang/lib/rabbitmq-%%VERSION%%/ebin/rabbit_tracer.beam
-lib/erlang/lib/rabbitmq-%%VERSION%%/ebin/rabbit_writer.beam
-lib/erlang/lib/rabbitmq-%%VERSION%%/ebin/tcp_acceptor.beam
-lib/erlang/lib/rabbitmq-%%VERSION%%/ebin/tcp_acceptor_sup.beam
-lib/erlang/lib/rabbitmq-%%VERSION%%/ebin/tcp_client_sup.beam
-lib/erlang/lib/rabbitmq-%%VERSION%%/ebin/tcp_listener.beam
-lib/erlang/lib/rabbitmq-%%VERSION%%/ebin/tcp_listener_sup.beam
-lib/erlang/lib/rabbitmq-%%VERSION%%/include/rabbit.hrl
-lib/erlang/lib/rabbitmq-%%VERSION%%/include/rabbit_framing.hrl
-lib/erlang/lib/rabbitmq-%%VERSION%%/include/rabbit_framing_spec.hrl
-lib/erlang/lib/rabbitmq-%%VERSION%%/src/buffering_proxy.erl
-lib/erlang/lib/rabbitmq-%%VERSION%%/src/rabbit.erl
-lib/erlang/lib/rabbitmq-%%VERSION%%/src/rabbit_access_control.erl
-lib/erlang/lib/rabbitmq-%%VERSION%%/src/rabbit_amqqueue.erl
-lib/erlang/lib/rabbitmq-%%VERSION%%/src/rabbit_amqqueue_process.erl
-lib/erlang/lib/rabbitmq-%%VERSION%%/src/rabbit_amqqueue_sup.erl
-lib/erlang/lib/rabbitmq-%%VERSION%%/src/rabbit_binary_generator.erl
-lib/erlang/lib/rabbitmq-%%VERSION%%/src/rabbit_binary_parser.erl
-lib/erlang/lib/rabbitmq-%%VERSION%%/src/rabbit_channel.erl
-lib/erlang/lib/rabbitmq-%%VERSION%%/src/rabbit_control.erl
-lib/erlang/lib/rabbitmq-%%VERSION%%/src/rabbit_error_logger.erl
-lib/erlang/lib/rabbitmq-%%VERSION%%/src/rabbit_exchange.erl
-lib/erlang/lib/rabbitmq-%%VERSION%%/src/rabbit_framing.erl
-lib/erlang/lib/rabbitmq-%%VERSION%%/src/rabbit_framing_channel.erl
-lib/erlang/lib/rabbitmq-%%VERSION%%/src/rabbit_heartbeat.erl
-lib/erlang/lib/rabbitmq-%%VERSION%%/src/rabbit_load.erl
-lib/erlang/lib/rabbitmq-%%VERSION%%/src/rabbit_log.erl
-lib/erlang/lib/rabbitmq-%%VERSION%%/src/rabbit_misc.erl
-lib/erlang/lib/rabbitmq-%%VERSION%%/src/rabbit_mnesia.erl
-lib/erlang/lib/rabbitmq-%%VERSION%%/src/rabbit_multi.erl
-lib/erlang/lib/rabbitmq-%%VERSION%%/src/rabbit_networking.erl
-lib/erlang/lib/rabbitmq-%%VERSION%%/src/rabbit_node_monitor.erl
-lib/erlang/lib/rabbitmq-%%VERSION%%/src/rabbit_persister.erl
-lib/erlang/lib/rabbitmq-%%VERSION%%/src/rabbit_reader.erl
-lib/erlang/lib/rabbitmq-%%VERSION%%/src/rabbit_realm.erl
-lib/erlang/lib/rabbitmq-%%VERSION%%/src/rabbit_router.erl
-lib/erlang/lib/rabbitmq-%%VERSION%%/src/rabbit_sup.erl
-lib/erlang/lib/rabbitmq-%%VERSION%%/src/rabbit_tests.erl
-lib/erlang/lib/rabbitmq-%%VERSION%%/src/rabbit_ticket.erl
-lib/erlang/lib/rabbitmq-%%VERSION%%/src/rabbit_tracer.erl
-lib/erlang/lib/rabbitmq-%%VERSION%%/src/rabbit_writer.erl
-lib/erlang/lib/rabbitmq-%%VERSION%%/src/tcp_acceptor.erl
-lib/erlang/lib/rabbitmq-%%VERSION%%/src/tcp_acceptor_sup.erl
-lib/erlang/lib/rabbitmq-%%VERSION%%/src/tcp_client_sup.erl
-lib/erlang/lib/rabbitmq-%%VERSION%%/src/tcp_listener.erl
-lib/erlang/lib/rabbitmq-%%VERSION%%/src/tcp_listener_sup.erl
-@dirrm lib/erlang/lib/rabbitmq-%%VERSION%%/src
-@dirrm lib/erlang/lib/rabbitmq-%%VERSION%%/include
-@dirrm lib/erlang/lib/rabbitmq-%%VERSION%%/ebin
-@dirrm lib/erlang/lib/rabbitmq-%%VERSION%%
-@dirrmtry /var/log/rabbitmq
-@dirrmtry /var/db/rabbitmq/mnesia
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/INSTALL
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/LICENSE
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/LICENSE-MPL-RabbitMQ
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/ebin/buffering_proxy.beam
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/ebin/rabbit.app
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/ebin/rabbit.beam
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/ebin/rabbit.rel
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/ebin/rabbit_access_control.beam
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/ebin/rabbit_amqqueue.beam
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/ebin/rabbit_amqqueue_process.beam
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/ebin/rabbit_amqqueue_sup.beam
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/ebin/rabbit_binary_generator.beam
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/ebin/rabbit_binary_parser.beam
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/ebin/rabbit_channel.beam
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/ebin/rabbit_control.beam
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/ebin/rabbit_error_logger.beam
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/ebin/rabbit_exchange.beam
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/ebin/rabbit_framing.beam
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/ebin/rabbit_framing_channel.beam
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/ebin/rabbit_heartbeat.beam
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/ebin/rabbit_load.beam
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/ebin/rabbit_log.beam
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/ebin/rabbit_misc.beam
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/ebin/rabbit_mnesia.beam
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/ebin/rabbit_multi.beam
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/ebin/rabbit_networking.beam
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/ebin/rabbit_node_monitor.beam
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/ebin/rabbit_persister.beam
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/ebin/rabbit_reader.beam
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/ebin/rabbit_realm.beam
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/ebin/rabbit_router.beam
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/ebin/rabbit_sup.beam
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/ebin/rabbit_tests.beam
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/ebin/rabbit_ticket.beam
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/ebin/rabbit_tracer.beam
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/ebin/rabbit_writer.beam
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/ebin/tcp_acceptor.beam
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/ebin/tcp_acceptor_sup.beam
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/ebin/tcp_client_sup.beam
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/ebin/tcp_listener.beam
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/ebin/tcp_listener_sup.beam
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/include/rabbit.hrl
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/include/rabbit_framing.hrl
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/include/rabbit_framing_spec.hrl
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/src/buffering_proxy.erl
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/src/rabbit.erl
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/src/rabbit_access_control.erl
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/src/rabbit_amqqueue.erl
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/src/rabbit_amqqueue_process.erl
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/src/rabbit_amqqueue_sup.erl
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/src/rabbit_binary_generator.erl
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/src/rabbit_binary_parser.erl
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/src/rabbit_channel.erl
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/src/rabbit_control.erl
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/src/rabbit_error_logger.erl
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/src/rabbit_exchange.erl
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/src/rabbit_framing.erl
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/src/rabbit_framing_channel.erl
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/src/rabbit_heartbeat.erl
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/src/rabbit_load.erl
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/src/rabbit_log.erl
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/src/rabbit_misc.erl
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/src/rabbit_mnesia.erl
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/src/rabbit_multi.erl
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/src/rabbit_networking.erl
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/src/rabbit_node_monitor.erl
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/src/rabbit_persister.erl
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/src/rabbit_reader.erl
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/src/rabbit_realm.erl
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/src/rabbit_router.erl
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/src/rabbit_sup.erl
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/src/rabbit_tests.erl
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/src/rabbit_ticket.erl
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/src/rabbit_tracer.erl
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/src/rabbit_writer.erl
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/src/tcp_acceptor.erl
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/src/tcp_acceptor_sup.erl
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/src/tcp_client_sup.erl
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/src/tcp_listener.erl
+lib/erlang/lib/rabbitmq_server-%%VERSION%%/src/tcp_listener_sup.erl
+@dirrm lib/erlang/lib/rabbitmq_server-%%VERSION%%/src
+@dirrm lib/erlang/lib/rabbitmq_server-%%VERSION%%/include
+@dirrm lib/erlang/lib/rabbitmq_server-%%VERSION%%/ebin
+@dirrm lib/erlang/lib/rabbitmq_server-%%VERSION%%
@dirrmtry etc/rabbitmq
+@unexec rmdir /var/log/rabbitmq 2>/dev/null || true
+@unexec rmdir /var/db/rabbitmq/mnesia 2>/dev/null || true
+@unexec rmdir /var/db/rabbitmq 2>/dev/null || true
+@exec mkdir -p /var/log/rabbitmq
+@exec mkdir -p /var/db/rabbitmq/mnesia
+@exec mkdir -p %D/etc/rabbitmq