Ticket #27519: macports_v2_2_0.patch

File macports_v2_2_0.patch, 9.5 KB (added by rob@…, 14 years ago)
  • rabbitmq-server/Portfile

    diff -Naur --exclude=.svn macports/rabbitmq-server/Portfile rabbitmq/rabbitmq-server/Portfile
    old new  
    33
    44PortSystem 1.0
    55name            rabbitmq-server
    6 version         2.1.1
     6version         2.2.0
    77categories      net
    88maintainers     paperplanes.de:meyer rabbitmq.com:tonyg openmaintainer
    99platforms       darwin
    10 supported_archs noarch
    11 
    1210description     The RabbitMQ AMQP Server
    1311long_description        \
    1412    RabbitMQ is an implementation of AMQP, the emerging standard for \
     
    1917homepage        http://www.rabbitmq.com/
    2018master_sites    http://www.rabbitmq.com/releases/rabbitmq-server/v${version}/
    2119
    22 checksums       sha1 d60bc55f819a56bef00b0bfafd12f707fc985301 \
    23                 rmd160 41d312dd934d017d492f2d1ccecdc9bd428e8a8a
     20distfiles      ${name}-${version}${extract.suffix} \
     21               ${name}-generic-unix-${version}${extract.suffix}
     22
     23checksums \
     24    ${name}-${version}${extract.suffix} md5 65d0644aa4bf24398d13553b6aa6465f \
     25    ${name}-${version}${extract.suffix} sha1 1f426dbc7961a0eac3864e57e623474bf8c46d74 \
     26    ${name}-${version}${extract.suffix} rmd160 7912a9374726cb3d71b09e3ac47f35a2db2c3b1c \
     27    ${name}-generic-unix-${version}${extract.suffix} md5 18b94e2bc4ef649bb9682e14283ecd5f \
     28    ${name}-generic-unix-${version}${extract.suffix} sha1 40d35c4f1c0efd4fb83a8426fce7d8498efd12dc \
     29    ${name}-generic-unix-${version}${extract.suffix} rmd160 c44d631c34e0fc92758396ce514077ab231c0ed2
    2430
    2531depends_lib     port:erlang
    26 depends_build   port:xmlto port:libxslt
     32depends_build   port:libxslt
    2733
     34platform darwin 7 {
     35    depends_build-append port:py25-simplejson
     36    build.args      PYTHON=${prefix}/bin/python2.5
     37}
    2838platform darwin 8 {
    29     depends_build-append port:py26-simplejson
    30     build.args      PYTHON=${prefix}/bin/python2.6
     39    depends_build-append port:py25-simplejson
     40    build.args      PYTHON=${prefix}/bin/python2.5
    3141}
    3242platform darwin 9 {
    33     depends_build-append port:py26-simplejson
    34     build.args      PYTHON=${prefix}/bin/python2.6
     43    depends_build-append port:py25-simplejson
     44    build.args      PYTHON=${prefix}/bin/python2.5
    3545}
    3646# no need for simplejson on Snow Leopard or higher
    3747
     
    4555set sbindir ${destroot}${prefix}/lib/rabbitmq/bin
    4656set wrappersbin ${destroot}${prefix}/sbin
    4757set realsbin ${destroot}${prefix}/lib/rabbitmq/lib/rabbitmq_server-${version}/sbin
     58set mansrc ${workpath}/rabbitmq_server-${version}/share/man
     59set mandest ${destroot}${prefix}/share/man
    4860
    4961use_configure   no
    5062
    5163use_parallel_build yes
    5264
     65destroot.target install_bin
     66
    5367destroot.destdir \
    5468    TARGET_DIR=${destroot}${prefix}/lib/rabbitmq/lib/rabbitmq_server-${version} \
    5569    SBIN_DIR=${sbindir} \
     
    7185
    7286    reinplace -E "s:(/etc/rabbitmq/rabbitmq.conf):${prefix}\\1:g" \
    7387        ${realsbin}/rabbitmq-env
    74     foreach var {CONFIG_FILE CLUSTER_CONFIG_FILE LOG_BASE MNESIA_BASE PIDS_FILE} {
     88    foreach var {CONFIG_FILE LOG_BASE MNESIA_BASE PIDS_FILE} {
    7589        reinplace -E "s:^($var)=/:\\1=${prefix}/:" \
    7690            ${realsbin}/rabbitmq-multi \
    7791            ${realsbin}/rabbitmq-server \
     
    89103                ${wrappersbin}/rabbitmq-multi
    90104    file copy ${wrappersbin}/rabbitmq-multi ${wrappersbin}/rabbitmq-server
    91105    file copy ${wrappersbin}/rabbitmq-multi ${wrappersbin}/rabbitmqctl
     106
     107    file copy ${mansrc}/man1/rabbitmq-multi.1.gz  ${mandest}/man1/
     108    file copy ${mansrc}/man1/rabbitmq-server.1.gz ${mandest}/man1/
     109    file copy ${mansrc}/man1/rabbitmqctl.1.gz     ${mandest}/man1/
     110    file copy ${mansrc}/man5/rabbitmq.conf.5.gz   ${mandest}/man5/
    92111}
    93112
    94113pre-install {
  • rabbitmq-server/Portfile-e

    diff -Naur --exclude=.svn macports/rabbitmq-server/Portfile-e rabbitmq/rabbitmq-server/Portfile-e
    old new  
    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 73760 2010-11-24 10:49:47Z jmr@macports.org $
    3 
    4 PortSystem 1.0
    5 name            rabbitmq-server
    6 version         2.1.1
    7 categories      net
    8 maintainers     paperplanes.de:meyer rabbitmq.com:tonyg openmaintainer
    9 platforms       darwin
    10 supported_archs noarch
    11 
    12 description     The RabbitMQ AMQP Server
    13 long_description        \
    14     RabbitMQ is an implementation of AMQP, the emerging standard for \
    15     high performance enterprise messaging. The RabbitMQ server is a \
    16     robust and scalable implementation of an AMQP broker.
    17 
    18 
    19 homepage        http://www.rabbitmq.com/
    20 master_sites    http://www.rabbitmq.com/releases/rabbitmq-server/v${version}/
    21 
    22 checksums       sha1 d60bc55f819a56bef00b0bfafd12f707fc985301 \
    23                 rmd160 41d312dd934d017d492f2d1ccecdc9bd428e8a8a
    24 
    25 depends_lib     port:erlang
    26 depends_build   port:xmlto port:libxslt
    27 
    28 platform darwin 8 {
    29     depends_build-append port:py26-simplejson
    30     build.args      PYTHON=${prefix}/bin/python2.6
    31 }
    32 platform darwin 9 {
    33     depends_build-append port:py26-simplejson
    34     build.args      PYTHON=${prefix}/bin/python2.6
    35 }
    36 # no need for simplejson on Snow Leopard or higher
    37 
    38 
    39 set serveruser  rabbitmq
    40 set servergroup rabbitmq
    41 set serverhome ${prefix}/var/lib/rabbitmq
    42 set logdir ${prefix}/var/log/rabbitmq
    43 set mnesiadbdir ${prefix}/var/lib/rabbitmq/mnesia
    44 set plistloc ${prefix}/etc/LaunchDaemons/org.macports.rabbitmq-server
    45 set sbindir ${destroot}${prefix}/lib/rabbitmq/bin
    46 set wrappersbin ${destroot}${prefix}/sbin
    47 set realsbin ${destroot}${prefix}/lib/rabbitmq/lib/rabbitmq_server-${version}/sbin
    48 
    49 use_configure   no
    50 
    51 use_parallel_build yes
    52 
    53 destroot.destdir \
    54     TARGET_DIR=${destroot}${prefix}/lib/rabbitmq/lib/rabbitmq_server-${version} \
    55     SBIN_DIR=${sbindir} \
    56     MAN_DIR=${destroot}${prefix}/share/man
    57 
    58 destroot.keepdirs \
    59     ${destroot}${logdir} \
    60     ${destroot}${mnesiadbdir}
    61 
    62 pre-destroot {
    63     addgroup ${servergroup}
    64     adduser ${serveruser} gid=[existsgroup ${servergroup}] realname=RabbitMQ\ Server home=${serverhome}
    65 }
    66 
    67 post-destroot {
    68     xinstall -d -g [existsgroup ${servergroup}] -m 775 ${destroot}${logdir}
    69     xinstall -d -g [existsgroup ${servergroup}] -m 775 ${destroot}${serverhome}
    70     xinstall -d -g [existsgroup ${servergroup}] -m 775 ${destroot}${mnesiadbdir}
    71 
    72     reinplace -E "s:(/etc/rabbitmq/rabbitmq.conf):${prefix}\\1:g" \
    73         ${realsbin}/rabbitmq-env
    74     foreach var {CONFIG_FILE CLUSTER_CONFIG_FILE LOG_BASE MNESIA_BASE PIDS_FILE} {
    75         reinplace -E "s:^($var)=/:\\1=${prefix}/:" \
    76             ${realsbin}/rabbitmq-multi \
    77             ${realsbin}/rabbitmq-server \
    78             ${realsbin}/rabbitmqctl
    79     }
    80 
    81     xinstall -m 555 ${filespath}/rabbitmq-script-wrapper \
    82                 ${wrappersbin}/rabbitmq-multi
    83 
    84     reinplace -E "s:MACPORTS_PREFIX/bin:${prefix}/bin:" \
    85                 ${wrappersbin}/rabbitmq-multi
    86     reinplace -E "s:/usr/lib/rabbitmq/bin/:${prefix}/lib/rabbitmq/bin/:" \
    87                 ${wrappersbin}/rabbitmq-multi
    88     reinplace -E "s:/var/lib/rabbitmq:${prefix}/var/lib/rabbitmq:" \
    89                 ${wrappersbin}/rabbitmq-multi
    90     file copy ${wrappersbin}/rabbitmq-multi ${wrappersbin}/rabbitmq-server
    91     file copy ${wrappersbin}/rabbitmq-multi ${wrappersbin}/rabbitmqctl
    92 }
    93 
    94 pre-install {
    95     system "cd ${destroot}${plistloc}; patch <${filespath}/patch-org.macports.rabbitmq-server.plist.diff"
    96 }
    97 
    98 startupitem.create      yes
    99 startupitem.init        "PATH=${prefix}/bin:${prefix}/sbin:\$PATH; export PATH"
    100 startupitem.start       "rabbitmq-server 2>&1"
    101 startupitem.stop        "rabbitmqctl stop 2>&1"
    102 startupitem.logfile     ${prefix}/var/log/rabbitmq/startupitem.log
  • rabbitmq-server/files/rabbitmq-asroot-script-wrapper

    diff -Naur --exclude=.svn macports/rabbitmq-server/files/rabbitmq-asroot-script-wrapper rabbitmq/rabbitmq-server/files/rabbitmq-asroot-script-wrapper
    old new  
    1 #!/bin/sh
    2 ##   The contents of this file are subject to the Mozilla Public License
    3 ##   Version 1.1 (the "License"); you may not use this file except in
    4 ##   compliance with the License. You may obtain a copy of the License at
    5 ##   http://www.mozilla.org/MPL/
    6 ##
    7 ##   Software distributed under the License is distributed on an "AS IS"
    8 ##   basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
    9 ##   License for the specific language governing rights and limitations
    10 ##   under the License.
    11 ##
    12 ##   The Original Code is RabbitMQ.
    13 ##
    14 ##   The Initial Developers of the Original Code are LShift Ltd,
    15 ##   Cohesive Financial Technologies LLC, and Rabbit Technologies Ltd.
    16 ##
    17 ##   Portions created before 22-Nov-2008 00:00:00 GMT by LShift Ltd,
    18 ##   Cohesive Financial Technologies LLC, or Rabbit Technologies Ltd
    19 ##   are Copyright (C) 2007-2008 LShift Ltd, Cohesive Financial
    20 ##   Technologies LLC, and Rabbit Technologies Ltd.
    21 ##
    22 ##   Portions created by LShift Ltd are Copyright (C) 2007-2010 LShift
    23 ##   Ltd. Portions created by Cohesive Financial Technologies LLC are
    24 ##   Copyright (C) 2007-2010 Cohesive Financial Technologies
    25 ##   LLC. Portions created by Rabbit Technologies Ltd are Copyright
    26 ##   (C) 2007-2010 Rabbit Technologies Ltd.
    27 ##
    28 ##   All Rights Reserved.
    29 ##
    30 ##   Contributor(s): ______________________________________.
    31 ##
    32 
    33 cd /var/lib/rabbitmq
    34 
    35 SCRIPT=`basename $0`
    36 
    37 if [ `id -u` = 0 ] ; then
    38     /usr/lib/rabbitmq/bin/${SCRIPT} "$@"
    39 else
    40     echo
    41     echo "Only root should run ${SCRIPT}"
    42     echo
    43     exit 1
    44 fi
    45