source: trunk/dports/sysutils/salt/Portfile @ 133159

Last change on this file since 133159 was 133159, checked in by cal@…, 4 years ago

salt: don't override, but augment, destroot phase, closes #46107

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.2 KB
Line 
1# -*- 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 133159 2015-02-22 16:54:51Z cal@macports.org $
3
4PortSystem          1.0
5PortGroup           github 1.0
6PortGroup           python 1.0
7
8github.setup        saltstack salt 2014.1.13 v
9name                salt
10categories          sysutils
11platforms           darwin
12maintainers         saltstack.com:cr
13license             Apache-2
14supported_archs     noarch
15distname            v2014.1.13
16revision            1
17
18description         Salt is a Python-based remote execution, automation, \
19                    configuration, and orchestration engine.
20
21long_description    SaltStack is fast, scalable and flexible software for data \
22                    center automation, from infrastructure and any cloud, \
23                    to the entire application stack.
24
25homepage            http://saltstack.com/
26
27python.default_version 27
28python.link_binaries_suffix
29
30checksums           rmd160 2695fc2e63ae73b1b63eaa30cae8f15fd4784466 \
31                    sha256 5ce29633a6d290ce11c375b5af6bfd84aecc5b41b2cc3272342ecc56f8c63375
32
33depends_build       port:py${python.version}-setuptools
34
35depends_lib-append  port:py${python.version}-crypto \
36                    port:py${python.version}-m2crypto \
37                    port:py${python.version}-jinja2 \
38                    port:py${python.version}-msgpack \
39                    port:py${python.version}-pip \
40                    port:py${python.version}-yaml \
41                    port:py${python.version}-zmq \
42                    port:swig-python
43
44startupitem.create        yes
45startupitem.name          salt-minion
46startupitem.netchange     yes
47startupitem.logevents     yes
48startupitem.logfile       ${prefix}/var/log/salt/minion
49startupitem.executable    ${prefix}/bin/salt-minion
50
51
52
53post-activate {
54
55    file mkdir ${prefix}/etc/salt
56
57    if ![file exists /etc/salt] {
58        ln -s ${prefix}/etc/salt /etc/salt
59    }
60
61    if ![file exists ${prefix}/etc/salt/minion] {
62        copy ${worksrcpath}/conf/minion ${prefix}/etc/salt
63    }
64
65    if ![file exists ${prefix}/etc/salt/master] {
66        copy ${worksrcpath}/conf/master ${prefix}/etc/salt
67    }
68}
69
70post-destroot {
71
72    if ![file exists ${destroot}/Library/LaunchDaemons] {
73        file mkdir ${destroot}/Library/LaunchDaemons
74    }
75    copy ${worksrcpath}/pkg/darwin/com.saltstack.salt.master.plist ${destroot}/Library/LaunchDaemons
76    copy ${worksrcpath}/pkg/darwin/com.saltstack.salt.syndic.plist ${destroot}/Library/LaunchDaemons
77
78}
79
80pre-deactivate {
81
82    if { [file type /etc/salt] == "link" } {
83        file delete /etc/salt
84    }
85
86}
87
88notes "
89This port configures a LaunchItem for salt-minion.
90
91It also installs LaunchItems for the salt-master and the salt-syndic.
92
93To start the salt-master via launchd, run
94   
95sudo launchctl load -w /Library/LaunchDaemons/com.saltstack.salt.master.plist
96
97To start the salt-syndic via launchd, run
98
99sudo launchctl load -w /Library/LaunchDaemons/com.saltstack.salt.syndic.plist
100
101To disable launchd management for the master or syndic, run the appropriate
102unload command:
103
104sudo launchctl unload -w /Library/LaunchDaemons/com.saltstack.salt.master.plist
105or
106sudo launchctl unload -w /Library/LaunchDaemons/com.saltstack.salt.syndic.plist
107
108"
109
Note: See TracBrowser for help on using the repository browser.