[38517] trunk/dports/net

macsforever2000 at macports.org macsforever2000 at macports.org
Wed Jul 23 07:56:36 PDT 2008


Revision: 38517
          http://trac.macosforge.org/projects/macports/changeset/38517
Author:   macsforever2000 at macports.org
Date:     2008-07-23 07:56:36 -0700 (Wed, 23 Jul 2008)
Log Message:
-----------
Added new port rabbitmq-server by tonyg-macports at lshift.net with help from z at wzph.com

Added Paths:
-----------
    trunk/dports/net/rabbitmq-server/
    trunk/dports/net/rabbitmq-server/Portfile
    trunk/dports/net/rabbitmq-server/files/
    trunk/dports/net/rabbitmq-server/files/rabbitmq-defaults
    trunk/dports/net/rabbitmq-server/files/rabbitmqctl_wrapper

Added: trunk/dports/net/rabbitmq-server/Portfile
===================================================================
--- trunk/dports/net/rabbitmq-server/Portfile	                        (rev 0)
+++ trunk/dports/net/rabbitmq-server/Portfile	2008-07-23 14:56:36 UTC (rev 38517)
@@ -0,0 +1,79 @@
+# $Id: Portfile,v 1.1 2008-02-06 23:31:59 tonyg Exp $ -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
+
+PortSystem      1.0
+name            rabbitmq-server
+version         1.3.0
+revision        0
+categories      net 
+maintainers     tonyg at rabbitmq.com
+platforms       darwin
+description     The RabbitMQ AMQP Server
+long_description    \
+    RabbitMQ is an implementation of AMQP, the emerging standard for \
+    high performance enterprise messaging. The RabbitMQ server is a \
+    robust and scalable implementation of an AMQP broker.
+
+homepage        http://www.rabbitmq.com/
+master_sites    http://www.rabbitmq.com/releases/source/
+
+distname        rabbitmq-${version}
+
+checksums \
+    md5 3206716f78a22e5c1d82529c660410d5 \
+    sha1 2f8584daaaab1af55037478b77b9927b81bb919d \
+    rmd160 24c6be02f3680a36023586211187337243b13955
+
+depends_build   port:erlang
+depends_run     port:erlang
+
+use_configure   no
+
+worksrcdir      rabbitmq-${version}/erlang/rabbit
+
+use_parallel_build yes
+
+destroot.destdir \
+    DIST_DIR=${destroot}${prefix}/lib/erlang/lib/rabbitmq_server-${version} \
+    SBIN_DIR=${destroot}${prefix}/sbin
+destroot.target dist-unix
+
+destroot.keepdirs \
+    ${destroot}${prefix}/var/lib/rabbitmq/pids \
+    ${destroot}${prefix}/var/log/rabbitmq \
+    ${destroot}${prefix}/var/lib/rabbitmq/mnesia
+
+pre-destroot {
+    addgroup rabbitmq
+    adduser rabbitmq gid=[existsgroup rabbitmq] realname=RabbitMQ\ Server home=${prefix}/var/lib/rabbitmq
+}
+
+post-destroot {
+    xinstall -d ${destroot}${prefix}/etc/default
+    xinstall -d -g [existsgroup rabbitmq] -m 775 ${destroot}${prefix}/var/log/rabbitmq
+    xinstall -d -g [existsgroup rabbitmq] -m 775 ${destroot}${prefix}/var/lib/rabbitmq
+    xinstall -d -g [existsgroup rabbitmq] -m 775 ${destroot}${prefix}/var/lib/rabbitmq/pids
+    xinstall -d -g [existsgroup rabbitmq] -m 775 ${destroot}${prefix}/var/lib/rabbitmq/mnesia
+    file rename ${destroot}${prefix}/sbin/rabbitmqctl ${destroot}${prefix}/sbin/rabbitmqctl_real
+    xinstall -m 555 ${filespath}/rabbitmqctl_wrapper ${destroot}${prefix}/sbin
+    file rename ${destroot}${prefix}/sbin/rabbitmqctl_wrapper ${destroot}${prefix}/sbin/rabbitmqctl
+    file copy ${filespath}/rabbitmq-defaults ${destroot}${prefix}/etc/default/rabbitmq
+    reinplace "s:^CLUSTER_CONFIG_FILE=:CLUSTER_CONFIG_FILE=${prefix}:" \
+        ${destroot}${prefix}/sbin/rabbitmq-multi \
+        ${destroot}${prefix}/sbin/rabbitmq-server \
+        ${destroot}${prefix}/sbin/rabbitmqctl \
+        ${destroot}${prefix}/sbin/rabbitmqctl_real
+    reinplace "s:^CONFIG_FILE=:CONFIG_FILE=${prefix}:" \
+        ${destroot}${prefix}/sbin/rabbitmq-multi \
+        ${destroot}${prefix}/sbin/rabbitmq-server \
+        ${destroot}${prefix}/sbin/rabbitmqctl \
+        ${destroot}${prefix}/sbin/rabbitmqctl_real
+    reinplace "s|@PREFIX@|${prefix}|" \
+        ${destroot}${prefix}/sbin/rabbitmqctl \
+        ${destroot}${prefix}/etc/default/rabbitmq
+}
+
+startupitem.create      yes
+startupitem.init        "PATH=${prefix}/bin:${prefix}/sbin:\$PATH; export PATH"
+startupitem.start       "su rabbitmq -c rabbitmq-server 2>&1"
+startupitem.stop        "rabbitmqctl stop 2>&1"
+startupitem.logfile     ${prefix}/var/log/rabbitmq/startupitem.log

Added: trunk/dports/net/rabbitmq-server/files/rabbitmq-defaults
===================================================================
--- trunk/dports/net/rabbitmq-server/files/rabbitmq-defaults	                        (rev 0)
+++ trunk/dports/net/rabbitmq-server/files/rabbitmq-defaults	2008-07-23 14:56:36 UTC (rev 38517)
@@ -0,0 +1,7 @@
+#!/bin/sh
+# defaults file for rabbitmq-server
+#
+
+PIDS_FILE=@PREFIX@/var/lib/rabbitmq/pids
+LOG_BASE=@PREFIX@/var/log/rabbitmq
+MNESIA_BASE=@PREFIX@/var/lib/rabbitmq/mnesia

Added: trunk/dports/net/rabbitmq-server/files/rabbitmqctl_wrapper
===================================================================
--- trunk/dports/net/rabbitmq-server/files/rabbitmqctl_wrapper	                        (rev 0)
+++ trunk/dports/net/rabbitmq-server/files/rabbitmqctl_wrapper	2008-07-23 14:56:36 UTC (rev 38517)
@@ -0,0 +1,13 @@
+#!/bin/bash
+# Escape spaces and quotes, because shell is revolting.
+for arg in "$@" ; do
+	# Escape quotes in parameters, so that they're passed through cleanly.
+	arg=$(sed -e 's/"/\\"/' <<-END
+		$arg
+		END
+	)
+	CMDLINE="${CMDLINE} \"${arg}\""
+done
+
+cd /
+exec su rabbitmq -c "@PREFIX@/sbin/rabbitmqctl_real ${CMDLINE}"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080723/78102852/attachment.html 


More information about the macports-changes mailing list