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 112969 2013-11-05 19:09:52Z ryandesign@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup github 1.0 |
---|
6 | PortGroup python 1.0 |
---|
7 | |
---|
8 | github.setup saltstack salt 2014.7.0 v |
---|
9 | name salt |
---|
10 | categories sysutils |
---|
11 | platforms darwin |
---|
12 | maintainers saltstack.com:cr |
---|
13 | license Apache-2 |
---|
14 | supported_archs noarch |
---|
15 | distname v2014.7.0 |
---|
16 | |
---|
17 | description Salt is a Python-based remote execution, automation, \ |
---|
18 | configuration, and orchestration engine. |
---|
19 | |
---|
20 | long_description SaltStack is fast, scalable and flexible software for data \ |
---|
21 | center automation, from infrastructure and any cloud, \ |
---|
22 | to the entire application stack. |
---|
23 | |
---|
24 | homepage http://saltstack.com/ |
---|
25 | |
---|
26 | python.default_version 27 |
---|
27 | |
---|
28 | checksums rmd160 f6a9707642ee97a86732d24e6962251b80d6b6fa \ |
---|
29 | sha256 f64fc33329abac41bc787de8fb17f0b59c5c0fd95da3f6a03600e606f28620f8 |
---|
30 | |
---|
31 | depends_build port:py${python.version}-setuptools |
---|
32 | |
---|
33 | depends_lib-append port:py${python.version}-crypto \ |
---|
34 | port:py${python.version}-m2crypto \ |
---|
35 | port:py${python.version}-jinja2 \ |
---|
36 | port:py${python.version}-msgpack \ |
---|
37 | port:py${python.version}-pip \ |
---|
38 | port:py${python.version}-yaml \ |
---|
39 | port:py${python.version}-zmq \ |
---|
40 | port:swig-python |
---|
41 | |
---|
42 | startupitem.create yes |
---|
43 | startupitem.name salt-minion |
---|
44 | startupitem.netchange yes |
---|
45 | startupitem.logevents yes |
---|
46 | startupitem.logfile ${prefix}/var/log/salt/minion |
---|
47 | startupitem.executable ${prefix}/bin/salt-minion |
---|
48 | |
---|
49 | variant raet description {Enable the RAET transport for Salt.} { |
---|
50 | depends_lib-append port:py${python.version}-raet |
---|
51 | } |
---|
52 | |
---|
53 | post-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 | |
---|
70 | 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 | |
---|
80 | pre-deactivate { |
---|
81 | |
---|
82 | if { [file type /etc/salt] == "link" } { |
---|
83 | file delete /etc/salt |
---|
84 | } |
---|
85 | |
---|
86 | } |
---|
87 | |
---|
88 | notes " |
---|
89 | This port configures a LaunchItem for salt-minion. |
---|
90 | |
---|
91 | It also installs LaunchItems for the salt-master and the salt-syndic. |
---|
92 | |
---|
93 | To start the salt-master via launchd, run |
---|
94 | |
---|
95 | sudo launchctl load -w /Library/LaunchDaemons/com.saltstack.salt.master.plist |
---|
96 | |
---|
97 | To start the salt-syndic via launchd, run |
---|
98 | |
---|
99 | sudo launchctl load -w /Library/LaunchDaemons/com.saltstack.salt.syndic.plist |
---|
100 | |
---|
101 | To disable launchd management for the master or syndic, run the appropriate |
---|
102 | unload command: |
---|
103 | |
---|
104 | sudo launchctl unload -w /Library/LaunchDaemons/com.saltstack.salt.master.plist |
---|
105 | or |
---|
106 | sudo launchctl unload -w /Library/LaunchDaemons/com.saltstack.salt.syndic.plist |
---|
107 | |
---|
108 | " |
---|
109 | |
---|