mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Update Macports Portfile
This update came out of a discussion on the macports bug available at https://trac.macports.org/ticket/46107.
This commit is contained in:
parent
ced4bfccf1
commit
122e253960
1 changed files with 31 additions and 19 deletions
|
@ -1,17 +1,19 @@
|
|||
# -*- 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
|
||||
# $Id: Portfile 112969 2013-11-05 19:09:52Z ryandesign@macports.org $
|
||||
# $Id$
|
||||
|
||||
PortSystem 1.0
|
||||
PortGroup github 1.0
|
||||
PortGroup python 1.0
|
||||
|
||||
github.setup saltstack salt 2014.1.7 v
|
||||
github.setup saltstack salt 2014.1.13 v
|
||||
name salt
|
||||
categories sysutils
|
||||
platforms darwin
|
||||
maintainers saltstack.com:cr
|
||||
license Apache-2
|
||||
supported_archs noarch
|
||||
distname v2014.1.13
|
||||
revision 1
|
||||
|
||||
description Salt is a Python-based remote execution, automation, \
|
||||
configuration, and orchestration engine.
|
||||
|
@ -25,22 +27,20 @@ homepage http://saltstack.com/
|
|||
python.default_version 27
|
||||
python.link_binaries_suffix
|
||||
|
||||
checksums rmd160 bed86f177ad383e46b2e7435a41d84c56900eadf \
|
||||
sha256 83845c84dcfc2528e42628de44a20a82a6d008c3514a3337dccd43aa94ec6a02
|
||||
checksums rmd160 2695fc2e63ae73b1b63eaa30cae8f15fd4784466 \
|
||||
sha256 5ce29633a6d290ce11c375b5af6bfd84aecc5b41b2cc3272342ecc56f8c63375
|
||||
|
||||
depends_build port:py${python.version}-setuptools
|
||||
|
||||
depends_lib-append port:py${python.version}-crypto \
|
||||
port:py${python.version}-m2crypto \
|
||||
port:py${python.version}-jinja2 \
|
||||
port:py${python.version}-msgpack \
|
||||
port:py${python.version}-pip \
|
||||
port:py${python.version}-yaml \
|
||||
port:py${python.version}-zmq \
|
||||
port:swig-python
|
||||
|
||||
livecheck.type regex
|
||||
livecheck.regex {topics/releases/([0-9]+\.[0-9]+\.[0-9]+)\.html}
|
||||
|
||||
startupitem.create yes
|
||||
startupitem.name salt-minion
|
||||
startupitem.netchange yes
|
||||
|
@ -48,30 +48,44 @@ startupitem.logevents yes
|
|||
startupitem.logfile ${prefix}/var/log/salt/minion
|
||||
startupitem.executable ${prefix}/bin/salt-minion
|
||||
|
||||
|
||||
|
||||
post-activate {
|
||||
|
||||
file mkdir ${prefix}/etc/salt
|
||||
|
||||
if ![file exists /etc/salt] {
|
||||
file link /etc/salt ${prefix}/etc/salt
|
||||
ln -s ${prefix}/etc/salt /etc/salt
|
||||
}
|
||||
|
||||
if ![file exists /opt/local/etc/salt/minion] {
|
||||
file copy ${worksrcpath}/conf/minion /opt/local/etc/salt
|
||||
if ![file exists ${prefix}/etc/salt/minion] {
|
||||
copy ${worksrcpath}/conf/minion ${prefix}/etc/salt
|
||||
}
|
||||
|
||||
if ![file exists ${prefix}/etc/salt/master] {
|
||||
file copy ${worksrcpath}/conf/master /opt/local/etc/salt
|
||||
copy ${worksrcpath}/conf/master ${prefix}/etc/salt
|
||||
}
|
||||
|
||||
|
||||
file copy -force ${worksrcpath}/pkg/darwin/com.saltstack.salt.master.plist /Library/LaunchDaemons
|
||||
file copy -force ${worksrcpath}/pkg/darwin/com.saltstack.salt.syndic.plist /Library/LaunchDaemons
|
||||
|
||||
}
|
||||
|
||||
post-destroot {
|
||||
notes-append "
|
||||
|
||||
if ![file exists ${destroot}/Library/LaunchDaemons] {
|
||||
file mkdir ${destroot}/Library/LaunchDaemons
|
||||
}
|
||||
copy ${worksrcpath}/pkg/darwin/com.saltstack.salt.master.plist ${destroot}/Library/LaunchDaemons
|
||||
copy ${worksrcpath}/pkg/darwin/com.saltstack.salt.syndic.plist ${destroot}/Library/LaunchDaemons
|
||||
|
||||
}
|
||||
|
||||
pre-deactivate {
|
||||
|
||||
if { [file type /etc/salt] == "link" } {
|
||||
file delete /etc/salt
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
notes "
|
||||
This port configures a LaunchItem for salt-minion.
|
||||
|
||||
It also installs LaunchItems for the salt-master and the salt-syndic.
|
||||
|
@ -92,6 +106,4 @@ or
|
|||
sudo launchctl unload -w /Library/LaunchDaemons/com.saltstack.salt.syndic.plist
|
||||
|
||||
"
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue