1 | # $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 |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | name rabbitmq-server |
---|
5 | version 1.2.0 |
---|
6 | revision 0 |
---|
7 | categories net |
---|
8 | maintainers tonyg@rabbitmq.com |
---|
9 | platforms darwin |
---|
10 | description The RabbitMQ AMQP Server |
---|
11 | long_description \ |
---|
12 | RabbitMQ is an implementation of AMQP, the emerging standard for \ |
---|
13 | high performance enterprise messaging. The RabbitMQ server is a \ |
---|
14 | robust and scalable implementation of an AMQP broker. |
---|
15 | |
---|
16 | homepage http://www.rabbitmq.com/ |
---|
17 | master_sites http://www.rabbitmq.com/releases/source/ |
---|
18 | |
---|
19 | distname rabbitmq-${version} |
---|
20 | |
---|
21 | checksums \ |
---|
22 | md5 46ee6dbbacdc67b25cc6ccd9c394b6f2 \ |
---|
23 | sha1 67e1e640136a1993567ace97dc5f67b1ad8e6304 \ |
---|
24 | rmd160 9e92502d36ab5cd1e3f0d39a46bb512b9440f35a |
---|
25 | |
---|
26 | depends_build port:erlang |
---|
27 | depends_run port:erlang |
---|
28 | |
---|
29 | use_configure no |
---|
30 | |
---|
31 | worksrcdir rabbitmq-${version}/erlang/rabbit |
---|
32 | |
---|
33 | use_parallel_build yes |
---|
34 | |
---|
35 | destroot.destdir \ |
---|
36 | DIST_DIR=${destroot}${prefix}/lib/erlang/lib/rabbitmq_server-${version} \ |
---|
37 | SBIN_DIR=${destroot}${prefix}/sbin |
---|
38 | destroot.target dist-unix |
---|
39 | |
---|
40 | destroot.keepdirs \ |
---|
41 | ${destroot}${prefix}/var/lib/rabbitmq/pids \ |
---|
42 | ${destroot}${prefix}/var/log/rabbitmq \ |
---|
43 | ${destroot}${prefix}/var/lib/rabbitmq/mnesia |
---|
44 | |
---|
45 | pre-destroot { |
---|
46 | addgroup rabbitmq |
---|
47 | adduser rabbitmq gid=[existsgroup rabbitmq] realname=RabbitMQ\ Server home=${prefix}/var/lib/rabbitmq |
---|
48 | } |
---|
49 | |
---|
50 | post-destroot { |
---|
51 | xinstall -d ${destroot}${prefix}/etc/default |
---|
52 | xinstall -d -g [existsgroup rabbitmq] -m 775 ${destroot}${prefix}/var/log/rabbitmq |
---|
53 | xinstall -d -g [existsgroup rabbitmq] -m 775 ${destroot}${prefix}/var/lib/rabbitmq |
---|
54 | xinstall -d -g [existsgroup rabbitmq] -m 775 ${destroot}${prefix}/var/lib/rabbitmq/pids |
---|
55 | xinstall -d -g [existsgroup rabbitmq] -m 775 ${destroot}${prefix}/var/lib/rabbitmq/mnesia |
---|
56 | file rename ${destroot}${prefix}/sbin/rabbitmqctl ${destroot}${prefix}/sbin/rabbitmqctl_real |
---|
57 | xinstall -m 555 ${filespath}/rabbitmqctl_wrapper ${destroot}${prefix}/sbin |
---|
58 | file rename ${destroot}${prefix}/sbin/rabbitmqctl_wrapper ${destroot}${prefix}/sbin/rabbitmqctl |
---|
59 | file copy ${filespath}/rabbitmq-defaults ${destroot}${prefix}/etc/default/rabbitmq |
---|
60 | reinplace "s:^CLUSTER_CONFIG_FILE=:CLUSTER_CONFIG_FILE=${prefix}:" \ |
---|
61 | ${destroot}${prefix}/sbin/rabbitmq-multi \ |
---|
62 | ${destroot}${prefix}/sbin/rabbitmq-server \ |
---|
63 | ${destroot}${prefix}/sbin/rabbitmqctl \ |
---|
64 | ${destroot}${prefix}/sbin/rabbitmqctl_real |
---|
65 | reinplace "s:^CONFIG_FILE=:CONFIG_FILE=${prefix}:" \ |
---|
66 | ${destroot}${prefix}/sbin/rabbitmq-multi \ |
---|
67 | ${destroot}${prefix}/sbin/rabbitmq-server \ |
---|
68 | ${destroot}${prefix}/sbin/rabbitmqctl \ |
---|
69 | ${destroot}${prefix}/sbin/rabbitmqctl_real |
---|
70 | reinplace "s|@PREFIX@|${prefix}|" \ |
---|
71 | ${destroot}${prefix}/sbin/rabbitmqctl \ |
---|
72 | ${destroot}${prefix}/etc/default/rabbitmq |
---|
73 | } |
---|
74 | |
---|
75 | startupitem.create yes |
---|
76 | startupitem.init "PATH=${prefix}/bin:${prefix}/sbin:\$PATH; export PATH" |
---|
77 | startupitem.start "su rabbitmq -c rabbitmq-server 2>&1" |
---|
78 | startupitem.stop "rabbitmqctl stop 2>&1" |
---|
79 | startupitem.logfile ${prefix}/var/log/rabbitmq/startupitem.log |
---|