diff --git a/dports/net/rabbitmq-server/Portfile b/dports/net/rabbitmq-server/Portfile
a
|
b
|
|
2 | 2 | # $Id$ |
3 | 3 | |
4 | 4 | PortSystem 1.0 |
5 | 5 | |
6 | 6 | name rabbitmq-server |
7 | | version 3.5.7 |
| 7 | version 3.6.5 |
8 | 8 | categories net |
9 | 9 | platforms darwin |
10 | 10 | maintainers gmail.com:hayder.net |
11 | 11 | license MPL-1.1 MIT Apache-2 |
12 | 12 | supported_archs noarch |
… |
… |
long_description \ |
18 | 18 | robust and scalable implementation of an AMQP broker. |
19 | 19 | |
20 | 20 | homepage http://www.rabbitmq.com/ |
21 | 21 | master_sites http://www.rabbitmq.com/releases/rabbitmq-server/v${version}/ |
22 | 22 | |
23 | | distfiles ${name}-${version}${extract.suffix} \ |
24 | | ${name}-generic-unix-${version}${extract.suffix} |
| 23 | use_xz yes |
25 | 24 | |
26 | | checksums \ |
27 | | ${name}-${version}${extract.suffix} \ |
28 | | rmd160 4b89e8ed8d5af2333b93d2ad8276f4f6cf29a40c \ |
29 | | sha256 380c9cab8f24add440a0aead3b70a0830e0f32a531139828003ae18e08b72028 \ |
30 | | ${name}-generic-unix-${version}${extract.suffix} \ |
31 | | rmd160 8b4af6925bd4ce97acff82bef9b5304ddad27529 \ |
32 | | sha256 821b6349554a89ef038c56c7b1e0ceb8553645597142b8c3d564b3a8fa371b8b |
| 25 | distfiles ${name}-generic-unix-${version}${extract.suffix} |
| 26 | worksrcdir [string map {- _} $name]-$version |
33 | 27 | |
| 28 | checksums rmd160 6133c55ae339c5e0b86895830ec42524530521f1 \ |
| 29 | sha256 232d558addf74cb371fc65ca10a7b3a2b6b31951b39baa1610488135d0f8ebf1 |
34 | 30 | |
35 | 31 | depends_lib port:erlang |
36 | | depends_build port:libxslt \ |
37 | | port:git |
38 | | # no code from git is incorporated, so its license doesn't prevent distribution |
39 | | set license_noconflict git |
| 32 | depends_build port:libxslt |
40 | 33 | |
41 | 34 | platform darwin 8 { |
42 | 35 | depends_build-append port:py26-simplejson |
43 | 36 | build.args PYTHON=${prefix}/bin/python2.6 |
44 | 37 | } |
45 | 38 | |
46 | 39 | platform darwin 9 { |
47 | 40 | depends_build-append port:py26-simplejson |
48 | 41 | build.args PYTHON=${prefix}/bin/python2.6 |
49 | 42 | } |
| 43 | |
50 | 44 | # no need for simplejson on Snow Leopard or higher |
51 | | |
52 | 45 | if {${os.major} > 9 && ${os.platform} eq "darwin"} { |
53 | 46 | # python3.X doesn't work |
54 | 47 | build.args PYTHON=python2.7 |
55 | 48 | } |
56 | 49 | |
… |
… |
set servergroup rabbitmq |
59 | 52 | set serverhome ${prefix}/var/lib/rabbitmq |
60 | 53 | set logdir ${prefix}/var/log/rabbitmq |
61 | 54 | set confdir ${prefix}/etc/rabbitmq |
62 | 55 | set mnesiadbdir ${prefix}/var/lib/rabbitmq/mnesia |
63 | 56 | set plistloc ${prefix}/etc/LaunchDaemons/org.macports.rabbitmq-server |
64 | | set sbindir ${destroot}${prefix}/lib/rabbitmq/bin |
| 57 | set rootdest ${prefix}/lib/rabbitmq |
| 58 | set rootserver ${rootdest}/lib/${worksrcdir} |
| 59 | set sbindir ${destroot}${rootdest}/bin |
65 | 60 | set wrappersbin ${destroot}${prefix}/sbin |
66 | | set realsbin ${destroot}${prefix}/lib/rabbitmq/lib/rabbitmq_server-${version}/sbin |
67 | | set mansrc ${workpath}/rabbitmq_server-${version}/share/man |
| 61 | set realsbin ${destroot}${rootserver}/sbin |
| 62 | set mansrc ${workpath}/${worksrcdir}/share/man |
68 | 63 | set mandest ${destroot}${prefix}/share/man |
69 | 64 | |
| 65 | add_users ${serveruser} group=${servergroup} realname=RabbitMQ\ Server home=${serverhome} |
| 66 | |
70 | 67 | use_configure no |
71 | 68 | |
72 | | use_parallel_build no |
73 | | |
74 | | build.env-append HOME=${workpath} |
75 | | |
76 | | build.env-append VERSION=${version} |
77 | | |
78 | | destroot.env-append VERSION=${version} |
79 | | |
80 | | destroot.target install_bin |
81 | | |
82 | | destroot.destdir \ |
83 | | TARGET_DIR=${destroot}${prefix}/lib/rabbitmq/lib/rabbitmq_server-${version} \ |
84 | | SBIN_DIR=${sbindir} \ |
85 | | MAN_DIR=${destroot}${prefix}/share/man |
| 69 | build {} |
86 | 70 | |
87 | 71 | destroot.keepdirs \ |
88 | 72 | ${destroot}${confdir} \ |
89 | 73 | ${destroot}${logdir} \ |
90 | 74 | ${destroot}${mnesiadbdir} |
91 | 75 | |
92 | | add_users ${serveruser} group=${servergroup} realname=RabbitMQ\ Server home=${serverhome} |
93 | | |
94 | | post-destroot { |
| 76 | destroot { |
95 | 77 | # This is a hack: We need to patch the startupitem, so generate it manually |
96 | 78 | # here, then define the function to empty to avoid overwriting it later |
97 | 79 | package require portstartupitem 1.0 |
98 | 80 | portstartupitem::startupitem_create |
99 | 81 | proc portstartupitem::startupitem_create {args} {} |
100 | 82 | system -W "${destroot}${plistloc}" "patch <${filespath}/patch-org.macports.rabbitmq-server.plist.diff" |
101 | 83 | |
102 | | |
103 | 84 | xinstall -d -m 775 ${destroot}${confdir} |
104 | 85 | xinstall -d -g [existsgroup ${servergroup}] -m 775 ${destroot}${logdir} |
105 | 86 | xinstall -d -g [existsgroup ${servergroup}] -m 775 ${destroot}${serverhome} |
106 | 87 | xinstall -d -g [existsgroup ${servergroup}] -m 775 ${destroot}${mnesiadbdir} |
| 88 | xinstall -d -g [existsgroup ${servergroup}] -m 775 ${destroot}${rootserver} |
| 89 | xinstall -d -g [existsgroup ${servergroup}] -m 775 ${destroot} |
| 90 | xinstall -d -g [existsgroup ${servergroup}] -m 775 ${sbindir} |
| 91 | |
| 92 | copy {*}[glob ${worksrcpath}/*] ${destroot}${rootserver}/ |
107 | 93 | |
108 | 94 | reinplace -E "s:^SYS_PREFIX=\${RABBITMQ_HOME}$:SYS_PREFIX=${prefix}:" \ |
109 | 95 | ${realsbin}/rabbitmq-defaults |
110 | 96 | reinplace -E "s:^SYS_PREFIX=$:SYS_PREFIX=${prefix}:" \ |
111 | 97 | ${realsbin}/rabbitmq-defaults |
… |
… |
post-destroot { |
117 | 103 | reinplace -E "s:/usr/lib/rabbitmq/bin/:${prefix}/lib/rabbitmq/bin/:g" \ |
118 | 104 | ${wrappersbin}/rabbitmq-server |
119 | 105 | reinplace -E "s:/var/lib/rabbitmq:${prefix}/var/lib/rabbitmq:g" \ |
120 | 106 | ${wrappersbin}/rabbitmq-server |
121 | 107 | |
122 | | file copy ${wrappersbin}/rabbitmq-server ${wrappersbin}/rabbitmqctl |
123 | | file copy ${wrappersbin}/rabbitmq-server ${wrappersbin}/rabbitmq-plugins |
| 108 | copy ${wrappersbin}/rabbitmq-server ${wrappersbin}/rabbitmqctl |
| 109 | copy ${wrappersbin}/rabbitmq-server ${wrappersbin}/rabbitmq-plugins |
124 | 110 | file attributes ${destroot}${serverhome} -owner ${serveruser} -group ${servergroup} |
125 | 111 | file attributes ${destroot}${logdir} -owner ${serveruser} -group ${servergroup} |
126 | 112 | |
| 113 | foreach script {rabbitmq-defaults rabbitmq-env rabbitmq-plugins rabbitmq-server rabbitmqctl} { |
| 114 | ln -s ../lib/${worksrcdir}/sbin/${script} ${sbindir}/${script} |
| 115 | } |
| 116 | |
127 | 117 | xinstall -m 644 -W ${mansrc}/man1 rabbitmq-server.1.gz rabbitmqctl.1.gz rabbitmq-plugins.1.gz \ |
128 | 118 | ${mandest}/man1/ |
129 | 119 | xinstall -m 644 -W ${mansrc}/man5 rabbitmq-env.conf.5.gz ${mandest}/man5/ |
130 | 120 | } |
131 | 121 | |