Ticket #44300: Portfile-salt.diff

File Portfile-salt.diff, 3.9 KB (added by cro (C. R. Oldham), 9 years ago)

Diff updating portfile to install Salt 2014.1.13

  • Portfile

    old new  
    11# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
    2 # $Id: Portfile 127385 2014-10-26 20:02:37Z snc@macports.org $
     2# $Id: Portfile 112969 2013-11-05 19:09:52Z ryandesign@macports.org $
    33
    44PortSystem          1.0
     5PortGroup           github 1.0
    56PortGroup           python 1.0
    67
     8github.setup        saltstack salt 2014.1.13 v
    79name                salt
    8 version             0.17.1
    9 revision            1
    1010categories          sysutils
    1111platforms           darwin
    1212maintainers         saltstack.com:cr
    1313license             Apache-2
    1414supported_archs     noarch
     15distname            v2014.1.13
    1516
    1617description         Salt is a Python-based remote execution, automation, \
    1718                    configuration, and orchestration engine.
     
    2021                    center automation, from infrastructure and any cloud, \
    2122                    to the entire application stack.
    2223
    23 homepage            http://docs.saltstack.com/
    24 master_sites        https://pypi.python.org/packages/source/s/salt/
    25 
    26 checksums           rmd160  4b4d7c0602b404d56b05af3060208fd23a296cf2 \
    27                     sha256  2f9f0e8b2ed53241ab3e373fd8d4030384b3f78f7b796d185c9907874cceebb9
     24homepage            http://saltstack.com/
    2825
    2926python.default_version 27
    3027python.link_binaries_suffix
    3128
     29checksums           rmd160 2695fc2e63ae73b1b63eaa30cae8f15fd4784466 \
     30                    sha256 5ce29633a6d290ce11c375b5af6bfd84aecc5b41b2cc3272342ecc56f8c63375
     31
    3232depends_build       port:py${python.version}-setuptools
    3333
    3434depends_lib-append  port:py${python.version}-crypto \
    35                     port:py${python.version}-jinja2 \
    3635                    port:py${python.version}-m2crypto \
     36                    port:py${python.version}-jinja2 \
    3737                    port:py${python.version}-msgpack \
    3838                    port:py${python.version}-pip \
    3939                    port:py${python.version}-yaml \
    4040                    port:py${python.version}-zmq \
    4141                    port:swig-python
    4242
    43 livecheck.type      regex
    44 livecheck.regex     {topics/releases/([0-9.]+)\.html}
     43startupitem.create        yes
     44startupitem.name          salt-minion
     45startupitem.netchange     yes
     46startupitem.logevents     yes
     47startupitem.logfile       ${prefix}/var/log/salt/minion
     48startupitem.executable    ${prefix}/bin/salt-minion
     49
     50
     51
     52post-activate {
     53
     54    file mkdir ${prefix}/etc/salt
     55
     56    if ![file exists /etc/salt] {
     57        ln -s ${prefix}/etc/salt /etc/salt
     58    }
     59
     60    if ![file exists ${prefix}/etc/salt/minion] {
     61        copy ${worksrcpath}/conf/minion ${prefix}/etc/salt
     62    }
     63
     64    if ![file exists ${prefix}/etc/salt/master] {
     65        copy ${worksrcpath}/conf/master ${prefix}/etc/salt
     66    }
     67}
     68
     69destroot {
     70
     71    if ![file exists ${destroot}/Library/LaunchDaemons] {
     72        file mkdir ${destroot}/Library/LaunchDaemons
     73    }
     74    copy ${worksrcpath}/pkg/darwin/com.saltstack.salt.master.plist ${destroot}/Library/LaunchDaemons
     75    copy ${worksrcpath}/pkg/darwin/com.saltstack.salt.syndic.plist ${destroot}/Library/LaunchDaemons
     76
     77}
     78
     79pre-deactivate {
     80
     81    if { [file type /etc/salt] == "link" } {
     82        file delete /etc/salt
     83    }
     84
     85}
     86
     87notes "
     88This port configures a LaunchItem for salt-minion.
     89
     90It also installs LaunchItems for the salt-master and the salt-syndic.
     91
     92To start the salt-master via launchd, run
     93   
     94sudo launchctl load -w /Library/LaunchDaemons/com.saltstack.salt.master.plist
     95
     96To start the salt-syndic via launchd, run
     97
     98sudo launchctl load -w /Library/LaunchDaemons/com.saltstack.salt.syndic.plist
     99
     100To disable launchd management for the master or syndic, run the appropriate
     101unload command:
     102
     103sudo launchctl unload -w /Library/LaunchDaemons/com.saltstack.salt.master.plist
     104or
     105sudo launchctl unload -w /Library/LaunchDaemons/com.saltstack.salt.syndic.plist
     106
     107"
     108