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

Last change on this file since 120912 was 120912, checked in by ciserlohn@…, 6 years ago

git, git-core: update to version 2.0.0; rename to git (closes #37279) and update all dependent ports

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.8 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 120912 2014-06-11 13:10:52Z ciserlohn@macports.org $
3
4PortSystem          1.0
5
6name                rabbitmq-server
7version             3.1.5
8revision            1
9categories          net
10platforms           darwin
11license             MPL-1.1 MIT Apache-2
12supported_archs     noarch
13
14maintainers         paperplanes.de:meyer openmaintainer
15
16description         The RabbitMQ AMQP Server
17long_description    \
18    RabbitMQ is an implementation of AMQP, the emerging standard for \
19    high performance enterprise messaging. The RabbitMQ server is a \
20    robust and scalable implementation of an AMQP broker.
21
22homepage            http://www.rabbitmq.com/
23master_sites        http://www.rabbitmq.com/releases/rabbitmq-server/v${version}/
24
25distfiles           ${name}-${version}${extract.suffix} \
26                    ${name}-generic-unix-${version}${extract.suffix}
27
28checksums \
29        ${name}-${version}${extract.suffix} \
30                    rmd160  b486ce1289fb721b63d9401b3f9994adeba1c053 \
31                    sha256  c6952bdd0f0d9551fa4a068e65ad6506583a3e81babbb4e4747e0073366a6c35 \
32        ${name}-generic-unix-${version}${extract.suffix} \
33                    rmd160  84b4cab15893eedfa2fbce80e7dfdbcc9cb4e536 \
34                    sha256  bf76aa8bdb59a412187c66a7a0739f2b18b069fd3af3fc6e1f66b0518d73978f
35
36depends_lib         port:erlang
37depends_build       port:libxslt \
38                    port:git
39
40platform darwin 8 {
41    depends_build-append port:py26-simplejson
42    build.args      PYTHON=${prefix}/bin/python2.6
43}
44
45platform darwin 9 {
46    depends_build-append port:py26-simplejson
47    build.args      PYTHON=${prefix}/bin/python2.6
48}
49# no need for simplejson on Snow Leopard or higher
50
51
52set serveruser      rabbitmq
53set servergroup     rabbitmq
54set serverhome      ${prefix}/var/lib/rabbitmq
55set logdir          ${prefix}/var/log/rabbitmq
56set confdir         ${prefix}/etc/rabbitmq
57set mnesiadbdir     ${prefix}/var/lib/rabbitmq/mnesia
58set plistloc        ${prefix}/etc/LaunchDaemons/org.macports.rabbitmq-server
59set sbindir         ${destroot}${prefix}/lib/rabbitmq/bin
60set wrappersbin     ${destroot}${prefix}/sbin
61set realsbin        ${destroot}${prefix}/lib/rabbitmq/lib/rabbitmq_server-${version}/sbin
62set mansrc          ${workpath}/rabbitmq_server-${version}/share/man
63set mandest         ${destroot}${prefix}/share/man
64
65use_configure       no
66
67use_parallel_build  no
68
69build.env-append    HOME=${workpath}
70
71build.env-append    VERSION=${version}
72
73destroot.env-append VERSION=${version}
74
75destroot.target     install_bin
76
77destroot.destdir \
78    TARGET_DIR=${destroot}${prefix}/lib/rabbitmq/lib/rabbitmq_server-${version} \
79    SBIN_DIR=${sbindir} \
80    MAN_DIR=${destroot}${prefix}/share/man
81
82destroot.keepdirs \
83    ${destroot}${confdir} \
84    ${destroot}${logdir} \
85    ${destroot}${mnesiadbdir}
86
87pre-destroot {
88    addgroup    ${servergroup}
89    add_users   ${serveruser} gid=[existsgroup ${servergroup}] realname=RabbitMQ\ Server home=${serverhome}
90}
91
92post-destroot {
93    xinstall -d -m 775 ${destroot}${confdir}
94    xinstall -d -g [existsgroup ${servergroup}] -m 775 ${destroot}${logdir}
95    xinstall -d -g [existsgroup ${servergroup}] -m 775 ${destroot}${serverhome}
96    xinstall -d -g [existsgroup ${servergroup}] -m 775 ${destroot}${mnesiadbdir}
97
98    reinplace -E "s:^SYS_PREFIX=\${RABBITMQ_HOME}$:SYS_PREFIX=${prefix}:" \
99        ${realsbin}/rabbitmq-defaults
100    reinplace -E "s:^SYS_PREFIX=$:SYS_PREFIX=${prefix}:" \
101        ${realsbin}/rabbitmq-defaults
102
103    xinstall -m 555 ${filespath}/rabbitmq-script-wrapper \
104                ${wrappersbin}/rabbitmq-server
105    reinplace -E "s:@MACPORTS_PREFIX@:${prefix}:g" \
106                ${wrappersbin}/rabbitmq-server
107    reinplace -E "s:/usr/lib/rabbitmq/bin/:${prefix}/lib/rabbitmq/bin/:g" \
108                ${wrappersbin}/rabbitmq-server
109    reinplace -E "s:/var/lib/rabbitmq:${prefix}/var/lib/rabbitmq:g" \
110                ${wrappersbin}/rabbitmq-server
111
112    file copy ${wrappersbin}/rabbitmq-server ${wrappersbin}/rabbitmqctl
113    file copy ${wrappersbin}/rabbitmq-server ${wrappersbin}/rabbitmq-plugins
114
115    xinstall -m 644 -W ${mansrc}/man1 rabbitmq-server.1.gz rabbitmqctl.1.gz rabbitmq-plugins.1.gz \
116        ${mandest}/man1/
117    xinstall -m 644 -W ${mansrc}/man5 rabbitmq-env.conf.5.gz ${mandest}/man5/
118}
119
120pre-install {
121    system "cd ${destroot}${plistloc}; patch <${filespath}/patch-org.macports.rabbitmq-server.plist.diff"
122}
123
124startupitem.create  yes
125startupitem.init    "PATH=${prefix}/bin:${prefix}/sbin:\$PATH; export PATH"
126startupitem.start   "rabbitmq-server 2>&1"
127startupitem.stop    "rabbitmqctl stop 2>&1"
128startupitem.logfile ${prefix}/var/log/rabbitmq/startupitem.log
129
130livecheck.type      regex
131livecheck.url       http://www.rabbitmq.com/releases/rabbitmq-server/current/
132livecheck.regex     "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
Note: See TracBrowser for help on using the repository browser.