blob: 4a866305d4f0c04287d810e01309b0c95da52038 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
# -*- 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
# $Id$
PortSystem 1.0
name rabbitmq-server
version @VERSION@
categories net
maintainers paperplanes.de:meyer openmaintainer
platforms darwin
supported_archs noarch
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 @BASE_URL@
master_sites @BASE_URL@releases/rabbitmq-server/v${version}/
distfiles ${name}-${version}${extract.suffix} \
${name}-generic-unix-${version}${extract.suffix}
checksums \
${name}-${version}${extract.suffix} \
sha1 @sha1-src@ \
rmd160 @rmd160-src@ \
${name}-generic-unix-${version}${extract.suffix} \
sha1 @sha1-bin@ \
rmd160 @rmd160-bin@
depends_lib port:erlang
depends_build port:libxslt
platform darwin 8 {
depends_build-append port:py26-simplejson
build.args PYTHON=${prefix}/bin/python2.6
}
platform darwin 9 {
depends_build-append port:py26-simplejson
build.args PYTHON=${prefix}/bin/python2.6
}
# no need for simplejson on Snow Leopard or higher
set serveruser rabbitmq
set servergroup rabbitmq
set serverhome ${prefix}/var/lib/rabbitmq
set logdir ${prefix}/var/log/rabbitmq
set mnesiadbdir ${prefix}/var/lib/rabbitmq/mnesia
set plistloc ${prefix}/etc/LaunchDaemons/org.macports.rabbitmq-server
set sbindir ${destroot}${prefix}/lib/rabbitmq/bin
set wrappersbin ${destroot}${prefix}/sbin
set realsbin ${destroot}${prefix}/lib/rabbitmq/lib/rabbitmq_server-${version}/sbin
set mansrc ${workpath}/rabbitmq_server-${version}/share/man
set mandest ${destroot}${prefix}/share/man
use_configure no
use_parallel_build yes
destroot.target install_bin
destroot.destdir \
TARGET_DIR=${destroot}${prefix}/lib/rabbitmq/lib/rabbitmq_server-${version} \
SBIN_DIR=${sbindir} \
MAN_DIR=${destroot}${prefix}/share/man
destroot.keepdirs \
${destroot}${logdir} \
${destroot}${mnesiadbdir}
pre-destroot {
addgroup ${servergroup}
adduser ${serveruser} gid=[existsgroup ${servergroup}] realname=RabbitMQ\ Server home=${serverhome}
}
post-destroot {
xinstall -d -g [existsgroup ${servergroup}] -m 775 ${destroot}${logdir}
xinstall -d -g [existsgroup ${servergroup}] -m 775 ${destroot}${serverhome}
xinstall -d -g [existsgroup ${servergroup}] -m 775 ${destroot}${mnesiadbdir}
reinplace -E "s:(/etc/rabbitmq/rabbitmq):${prefix}\\1:g" \
${realsbin}/rabbitmq-env
foreach var {CONFIG_FILE LOG_BASE MNESIA_BASE} {
reinplace -E "s:^($var)=/:\\1=${prefix}/:" \
${realsbin}/rabbitmq-server \
${realsbin}/rabbitmqctl
}
xinstall -m 555 ${filespath}/rabbitmq-script-wrapper \
${wrappersbin}/rabbitmq-server
reinplace -E "s:MACPORTS_PREFIX/bin:${prefix}/bin:" \
${wrappersbin}/rabbitmq-server
reinplace -E "s:/usr/lib/rabbitmq/bin/:${prefix}/lib/rabbitmq/bin/:" \
${wrappersbin}/rabbitmq-server
reinplace -E "s:/var/lib/rabbitmq:${prefix}/var/lib/rabbitmq:" \
${wrappersbin}/rabbitmq-server
file copy ${wrappersbin}/rabbitmq-server ${wrappersbin}/rabbitmqctl
xinstall -m 644 -W ${mansrc}/man1 rabbitmq-server.1.gz rabbitmqctl.1.gz \
${mandest}/man1/
xinstall -m 644 -W ${mansrc}/man5 rabbitmq-env.conf.5.gz ${mandest}/man5/
}
pre-install {
system "cd ${destroot}${plistloc}; patch <${filespath}/patch-org.macports.rabbitmq-server.plist.diff"
}
startupitem.create yes
startupitem.init "PATH=${prefix}/bin:${prefix}/sbin:\$PATH; export PATH"
startupitem.start "rabbitmq-server 2>&1"
startupitem.stop "rabbitmqctl stop 2>&1"
startupitem.logfile ${prefix}/var/log/rabbitmq/startupitem.log
|