# -*- 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 2.8.2 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 http://www.rabbitmq.com/ master_sites http://www.rabbitmq.com/releases/rabbitmq-server/v${version}/ distfiles ${name}-${version}${extract.suffix} \ ${name}-generic-unix-${version}${extract.suffix} checksums \ ${name}-${version}${extract.suffix} \ sha1 3d0da2996a30747c5875cfbf887c61d80d765ef4 \ rmd160 89509488902089d3c457dfcf3cc44a6b615b33cf \ ${name}-generic-unix-${version}${extract.suffix} \ sha1 b564d3277af5531f120bff822560b157432b2fa7 \ rmd160 b2e38f9163e05bc73fa793f6120c99940239a7f1 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 confdir ${prefix}/etc/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 build.env-append HOME=${workpath} build.env-append VERSION=${version} destroot.env-append VERSION=${version} 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}${confdir} \ ${destroot}${logdir} \ ${destroot}${mnesiadbdir} pre-destroot { addgroup ${servergroup} adduser ${serveruser} gid=[existsgroup ${servergroup}] realname=RabbitMQ\ Server home=${serverhome} } post-destroot { xinstall -d -m 775 ${destroot}${confdir} 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:^SYS_PREFIX=\${RABBITMQ_HOME}$:SYS_PREFIX=${prefix}:" \ ${realsbin}/rabbitmq-defaults reinplace -E "s:^SYS_PREFIX=$:SYS_PREFIX=${prefix}:" \ ${realsbin}/rabbitmq-defaults xinstall -m 555 ${filespath}/rabbitmq-script-wrapper \ ${wrappersbin}/rabbitmq-server reinplace -E "s:@MACPORTS_PREFIX@:${prefix}:g" \ ${wrappersbin}/rabbitmq-server reinplace -E "s:/usr/lib/rabbitmq/bin/:${prefix}/lib/rabbitmq/bin/:g" \ ${wrappersbin}/rabbitmq-server reinplace -E "s:/var/lib/rabbitmq:${prefix}/var/lib/rabbitmq:g" \ ${wrappersbin}/rabbitmq-server file copy ${wrappersbin}/rabbitmq-server ${wrappersbin}/rabbitmqctl file copy ${wrappersbin}/rabbitmq-server ${wrappersbin}/rabbitmq-plugins xinstall -m 644 -W ${mansrc}/man1 rabbitmq-server.1.gz rabbitmqctl.1.gz rabbitmq-plugins.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