source: trunk/dports/net/rabbitmq-server/Portfile @ 50984

Last change on this file since 50984 was 50984, checked in by and.damore@…, 10 years ago

Maintainer email change, second batch, mail without @macports.org domain are put in domain:user form.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.7 KB
Line 
1# -*- 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# $Id: Portfile 50984 2009-05-14 21:08:43Z and.damore@macports.org $
3
4PortSystem      1.0
5
6name            rabbitmq-server
7version         1.5.3
8categories      net
9maintainers     rabbitmq.com:tonyg
10platforms       darwin
11description     The RabbitMQ AMQP Server
12long_description    \
13    RabbitMQ is an implementation of AMQP, the emerging standard for \
14    high performance enterprise messaging. The RabbitMQ server is a \
15    robust and scalable implementation of an AMQP broker.
16
17
18homepage        http://www.rabbitmq.com/
19master_sites    http://www.rabbitmq.com/releases/rabbitmq-server/v${version}/
20
21checksums \
22    md5 3242a67885c2471b5ab62254bf024679 \
23    sha1 f4d6a01eaa2c74fa32f567fe410d21d9be1b43aa \
24    rmd160 1a1c4b97d765548028c161d1617905151ca9e040
25
26depends_build   port:erlang port:py25-simplejson
27depends_run     port:erlang
28
29set serveruser  rabbitmq
30set servergroup rabbitmq
31set serverhome ${prefix}/var/lib/rabbitmq
32set logdir ${prefix}/var/log/rabbitmq
33set mnesiadbdir ${prefix}/var/lib/rabbitmq/mnesia
34set plistloc ${prefix}/etc/LaunchDaemons/org.macports.rabbitmq-server
35
36use_configure   no
37
38use_parallel_build yes
39
40build.args      PYTHON=${prefix}/bin/python2.5
41
42destroot.destdir \
43    TARGET_DIR=${destroot}${prefix}/lib/erlang/lib/rabbitmq_server-${version} \
44    SBIN_DIR=${destroot}${prefix}/sbin \
45    MAN_DIR=${destroot}${prefix}/share/man
46
47destroot.keepdirs \
48    ${destroot}${logdir} \
49    ${destroot}${mnesiadbdir}
50
51pre-destroot {
52    addgroup ${servergroup}
53    adduser ${serveruser} gid=[existsgroup ${servergroup}] realname=RabbitMQ\ Server home=${serverhome}
54}
55
56post-destroot {
57    xinstall -d -g [existsgroup ${servergroup}] -m 775 ${destroot}${logdir}
58    xinstall -d -g [existsgroup ${servergroup}] -m 775 ${destroot}${serverhome}
59    xinstall -d -g [existsgroup ${servergroup}] -m 775 ${destroot}${mnesiadbdir}
60
61    reinplace -E "s:(/etc/rabbitmq/rabbitmq.conf):${prefix}\\1:g" \
62        ${destroot}${prefix}/sbin/rabbitmq-multi \
63        ${destroot}${prefix}/sbin/rabbitmq-server \
64        ${destroot}${prefix}/sbin/rabbitmqctl
65    reinplace -E "s:(RABBITMQ_CLUSTER_CONFIG_FILE)=/:\\1=${prefix}/:" \
66        ${destroot}${prefix}/sbin/rabbitmq-multi \
67        ${destroot}${prefix}/sbin/rabbitmq-server \
68        ${destroot}${prefix}/sbin/rabbitmqctl
69    reinplace -E "s:(RABBITMQ_LOG_BASE)=/:\\1=${prefix}/:" \
70        ${destroot}${prefix}/sbin/rabbitmq-multi \
71        ${destroot}${prefix}/sbin/rabbitmq-server \
72        ${destroot}${prefix}/sbin/rabbitmqctl
73    reinplace -E "s:(RABBITMQ_MNESIA_BASE)=/:\\1=${prefix}/:" \
74        ${destroot}${prefix}/sbin/rabbitmq-multi \
75        ${destroot}${prefix}/sbin/rabbitmq-server \
76        ${destroot}${prefix}/sbin/rabbitmqctl
77    reinplace -E "s:(RABBITMQ_PIDS_FILE)=/:\\1=${prefix}/:" \
78        ${destroot}${prefix}/sbin/rabbitmq-multi \
79        ${destroot}${prefix}/sbin/rabbitmq-server \
80        ${destroot}${prefix}/sbin/rabbitmqctl
81
82    file rename ${destroot}${prefix}/sbin/rabbitmqctl ${destroot}${prefix}/sbin/rabbitmqctl_real
83    xinstall -m 555 ${filespath}/rabbitmqctl_wrapper ${destroot}${prefix}/sbin
84    file rename ${destroot}${prefix}/sbin/rabbitmqctl_wrapper ${destroot}${prefix}/sbin/rabbitmqctl
85
86    reinplace -E "s:@PREFIX@:${prefix}:" \
87        ${destroot}${prefix}/sbin/rabbitmqctl
88}
89
90pre-install {
91    system "cd ${destroot}${plistloc}; patch <${filespath}/patch-org.macports.rabbitmq-server.plist.diff"
92}
93
94startupitem.create      yes
95startupitem.init        "PATH=${prefix}/bin:${prefix}/sbin:\$PATH; export PATH"
96startupitem.start       "rabbitmq-server 2>&1"
97startupitem.stop        "rabbitmqctl stop 2>&1"
98startupitem.logfile     ${prefix}/var/log/rabbitmq/startupitem.log
Note: See TracBrowser for help on using the repository browser.