Ticket #18665: Portfile-rabbitmq-server.diff
File Portfile-rabbitmq-server.diff, 5.9 KB (added by cpettitt@…, 16 years ago) |
---|
-
Portfile
old new 1 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 38567 2008-07-25 08:46:05Z ryandesign@macports.org$2 # $Id$ 3 3 4 4 PortSystem 1.0 5 5 6 6 name rabbitmq-server 7 version 1. 3.07 version 1.5.3 8 8 revision 0 9 9 categories net 10 10 maintainers tonyg@rabbitmq.com … … 15 15 high performance enterprise messaging. The RabbitMQ server is a \ 16 16 robust and scalable implementation of an AMQP broker. 17 17 18 18 19 homepage http://www.rabbitmq.com/ 19 master_sites http://www.rabbitmq.com/releases/ source/20 master_sites http://www.rabbitmq.com/releases/rabbitmq-server/v${version}/ 20 21 21 distname rabbitmq- ${version}22 distname rabbitmq-server-${version} 22 23 23 24 checksums \ 24 md5 32 06716f78a22e5c1d82529c660410d5\25 sha1 2f8584daaaab1af55037478b77b9927b81bb919d\26 rmd160 24c6be02f3680a36023586211187337243b1395525 md5 3242a67885c2471b5ab62254bf024679 \ 26 sha1 f4d6a01eaa2c74fa32f567fe410d21d9be1b43aa \ 27 rmd160 1a1c4b97d765548028c161d1617905151ca9e040 27 28 28 depends_build port:erlang 29 depends_build port:erlang port:py25-simplejson 29 30 depends_run port:erlang 30 31 31 use_configure no 32 set serveruser rabbitmq 33 set servergroup rabbitmq 34 set serverhome ${prefix}/var/lib/rabbitmq 35 set logdir ${prefix}/var/log/rabbitmq 36 set mnesiadbdir ${prefix}/var/lib/rabbitmq/mnesia 37 set plistloc ${prefix}/etc/LaunchDaemons/org.macports.rabbitmq-server 32 38 33 worksrcdir rabbitmq-${version}/erlang/rabbit 39 use_configure no 34 40 35 41 use_parallel_build yes 36 42 43 build.args PYTHON=${prefix}/bin/python2.5 44 37 45 destroot.destdir \ 38 DIST_DIR=${destroot}${prefix}/lib/erlang/lib/rabbitmq_server-${version} \39 SBIN_DIR=${destroot}${prefix}/sbin 40 destroot.target dist-unix 46 TARGET_DIR=${destroot}${prefix}/lib/erlang/lib/rabbitmq_server-${version} \ 47 SBIN_DIR=${destroot}${prefix}/sbin \ 48 MAN_DIR=${destroot}${prefix}/share/man 41 49 42 50 destroot.keepdirs \ 43 ${destroot}${prefix}/var/lib/rabbitmq/pids \ 44 ${destroot}${prefix}/var/log/rabbitmq \ 45 ${destroot}${prefix}/var/lib/rabbitmq/mnesia 51 ${destroot}${logdir} \ 52 ${destroot}${mnesiadbdir} 46 53 47 54 pre-destroot { 48 addgroup rabbitmq49 adduser rabbitmq gid=[existsgroup rabbitmq] realname=RabbitMQ\ Server home=${prefix}/var/lib/rabbitmq55 addgroup ${servergroup} 56 adduser ${serveruser} gid=[existsgroup ${servergroup}] realname=RabbitMQ\ Server home=${serverhome} 50 57 } 51 58 52 59 post-destroot { 53 xinstall -d ${destroot}${prefix}/etc/default 54 xinstall -d -g [existsgroup rabbitmq] -m 775 ${destroot}${prefix}/var/log/rabbitmq 55 xinstall -d -g [existsgroup rabbitmq] -m 775 ${destroot}${prefix}/var/lib/rabbitmq 56 xinstall -d -g [existsgroup rabbitmq] -m 775 ${destroot}${prefix}/var/lib/rabbitmq/pids 57 xinstall -d -g [existsgroup rabbitmq] -m 775 ${destroot}${prefix}/var/lib/rabbitmq/mnesia 58 file rename ${destroot}${prefix}/sbin/rabbitmqctl ${destroot}${prefix}/sbin/rabbitmqctl_real 59 xinstall -m 555 ${filespath}/rabbitmqctl_wrapper ${destroot}${prefix}/sbin 60 file rename ${destroot}${prefix}/sbin/rabbitmqctl_wrapper ${destroot}${prefix}/sbin/rabbitmqctl 61 file copy ${filespath}/rabbitmq-defaults ${destroot}${prefix}/etc/default/rabbitmq 62 reinplace "s:^CLUSTER_CONFIG_FILE=:CLUSTER_CONFIG_FILE=${prefix}:" \ 60 xinstall -d -g [existsgroup ${servergroup}] -m 775 ${destroot}${logdir} 61 xinstall -d -g [existsgroup ${servergroup}] -m 775 ${destroot}${serverhome} 62 xinstall -d -g [existsgroup ${servergroup}] -m 775 ${destroot}${mnesiadbdir} 63 64 reinplace -E "s:(/etc/rabbitmq/rabbitmq.conf):${prefix}\\1:g" \ 63 65 ${destroot}${prefix}/sbin/rabbitmq-multi \ 64 66 ${destroot}${prefix}/sbin/rabbitmq-server \ 65 ${destroot}${prefix}/sbin/rabbitmqctl \ 66 ${destroot}${prefix}/sbin/rabbitmqctl_real 67 reinplace "s:^CONFIG_FILE=:CONFIG_FILE=${prefix}:" \ 67 ${destroot}${prefix}/sbin/rabbitmqctl 68 reinplace -E "s:(RABBITMQ_CLUSTER_CONFIG_FILE)=/:\\1=${prefix}/:" \ 68 69 ${destroot}${prefix}/sbin/rabbitmq-multi \ 69 70 ${destroot}${prefix}/sbin/rabbitmq-server \ 70 ${destroot}${prefix}/sbin/rabbitmqctl \ 71 ${destroot}${prefix}/sbin/rabbitmqctl_real 72 reinplace "s|@PREFIX@|${prefix}|" \ 73 ${destroot}${prefix}/sbin/rabbitmqctl \ 74 ${destroot}${prefix}/etc/default/rabbitmq 71 ${destroot}${prefix}/sbin/rabbitmqctl 72 reinplace -E "s:(RABBITMQ_LOG_BASE)=/:\\1=${prefix}/:" \ 73 ${destroot}${prefix}/sbin/rabbitmq-multi \ 74 ${destroot}${prefix}/sbin/rabbitmq-server \ 75 ${destroot}${prefix}/sbin/rabbitmqctl 76 reinplace -E "s:(RABBITMQ_MNESIA_BASE)=/:\\1=${prefix}/:" \ 77 ${destroot}${prefix}/sbin/rabbitmq-multi \ 78 ${destroot}${prefix}/sbin/rabbitmq-server \ 79 ${destroot}${prefix}/sbin/rabbitmqctl 80 reinplace -E "s:(RABBITMQ_PIDS_FILE)=/:\\1=${prefix}/:" \ 81 ${destroot}${prefix}/sbin/rabbitmq-multi \ 82 ${destroot}${prefix}/sbin/rabbitmq-server \ 83 ${destroot}${prefix}/sbin/rabbitmqctl 84 85 file rename ${destroot}${prefix}/sbin/rabbitmqctl ${destroot}${prefix}/sbin/rabbitmqctl_real 86 xinstall -m 555 ${filespath}/rabbitmqctl_wrapper ${destroot}${prefix}/sbin 87 file rename ${destroot}${prefix}/sbin/rabbitmqctl_wrapper ${destroot}${prefix}/sbin/rabbitmqctl 88 89 reinplace -E "s:@PREFIX@:${prefix}:" \ 90 ${destroot}${prefix}/sbin/rabbitmqctl 91 } 92 93 pre-install { 94 system "cd ${destroot}${plistloc}; patch <${filespath}/patch-org.macports.rabbitmq-server.plist.diff" 75 95 } 76 96 77 97 startupitem.create yes 78 98 startupitem.init "PATH=${prefix}/bin:${prefix}/sbin:\$PATH; export PATH" 79 startupitem.start " su rabbitmq -crabbitmq-server 2>&1"99 startupitem.start "rabbitmq-server 2>&1" 80 100 startupitem.stop "rabbitmqctl stop 2>&1" 81 101 startupitem.logfile ${prefix}/var/log/rabbitmq/startupitem.log