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 python 1.0 |
---|
6 | |
---|
7 | name salt |
---|
8 | version 2014.1.7 |
---|
9 | categories sysutils |
---|
10 | platforms darwin |
---|
11 | maintainers saltstack.com:cr |
---|
12 | license Apache-2 |
---|
13 | supported_archs noarch |
---|
14 | |
---|
15 | description Salt is a Python-based remote execution, automation, \ |
---|
16 | configuration, and orchestration engine. |
---|
17 | |
---|
18 | long_description SaltStack is fast, scalable and flexible software for data \ |
---|
19 | center automation, from infrastructure and any cloud, \ |
---|
20 | to the entire application stack. |
---|
21 | |
---|
22 | homepage http://docs.saltstack.com/ |
---|
23 | fetch.type git |
---|
24 | git.url git://github.com/saltstack/salt.git |
---|
25 | git.branch v2014.1.7 |
---|
26 | |
---|
27 | # master_sites https://pypi.python.org/packages/source/s/salt/ |
---|
28 | |
---|
29 | # checksums rmd160 4ca8aedca823f4e6d5711ee78777d46036d77a44 \ |
---|
30 | # sha256 bc501c50cef7af9ce857b6f4a7c34b0238cc6a2810e4bd6e3ff7e0bfb082343f |
---|
31 | |
---|
32 | python.default_version 27 |
---|
33 | python.link_binaries_suffix |
---|
34 | |
---|
35 | depends_build port:py${python.version}-setuptools |
---|
36 | |
---|
37 | depends_lib-append port:py${python.version}-crypto \ |
---|
38 | port:py${python.version}-m2crypto \ |
---|
39 | port:py${python.version}-msgpack \ |
---|
40 | port:py${python.version}-pip \ |
---|
41 | port:py${python.version}-yaml \ |
---|
42 | port:py${python.version}-zmq \ |
---|
43 | port:swig-python |
---|
44 | |
---|
45 | livecheck.type regex |
---|
46 | livecheck.regex {topics/releases/([0-9]+\.[0-9]+\.[0-9]+)\.html} |
---|
47 | |
---|
48 | variant minion { |
---|
49 | startupitem.create yes |
---|
50 | startupitem.name salt-minion |
---|
51 | startupitem.netchange yes |
---|
52 | startupitem.logevents yes |
---|
53 | startupitem.logfile ${prefix}/var/log/salt/minion |
---|
54 | startupitem.executable ${prefix}/bin/salt-minion |
---|
55 | |
---|
56 | if ![file exists /opt/local/etc/salt/minion] { |
---|
57 | file copy ${worksrcpath}/conf/minion /opt/local/etc/salt |
---|
58 | } |
---|
59 | } |
---|
60 | |
---|
61 | variant master { |
---|
62 | |
---|
63 | post-destroot { |
---|
64 | file mkdir /opt/local/etc/salt |
---|
65 | if ![file exists /opt/local/etc/salt/master] { |
---|
66 | file copy ${worksrcpath}/conf/master /opt/local/etc/salt |
---|
67 | } |
---|
68 | |
---|
69 | if ![file exists /etc/salt] { |
---|
70 | file link /etc/salt /opt/local/etc/salt |
---|
71 | } |
---|
72 | file delete /Library/LaunchDaemons/com.saltstack.salt.master.plist |
---|
73 | |
---|
74 | file copy ${worksrcpath}/pkg/darwin/com.saltstack.salt.master.plist /Library/LaunchDaemons |
---|
75 | |
---|
76 | reinplace "s|/usr/local|${prefix}|g" /Library/LaunchDaemons/com.saltstack.salt.master.plist |
---|
77 | } |
---|
78 | notes-append " |
---|
79 | This variant is for the salt-master. To start the salt-master via launchd, run |
---|
80 | |
---|
81 | sudo launchctl load -w /Library/LaunchDaemons/com.saltstack.salt.master.plist |
---|
82 | |
---|
83 | To disable launchd management, run |
---|
84 | |
---|
85 | sudo launchctl unload -w /Library/LaunchDaemons/com.saltstack.salt.master.plist |
---|
86 | |
---|
87 | " |
---|
88 | } |
---|
89 | |
---|
90 | variant syndic { |
---|
91 | |
---|
92 | post-destroot { |
---|
93 | file delete /Library/LaunchDaemons/com.saltstack.salt.syndic.plist |
---|
94 | file copy ${worksrcpath}/pkg/darwin/com.saltstack.salt.syndic.plist /Library/LaunchDaemons |
---|
95 | reinplace "s|/usr/local|${prefix}|g" /Library/LaunchDaemons/com.saltstack.salt.syndic.plist |
---|
96 | } |
---|
97 | |
---|
98 | notes-append " |
---|
99 | This variant is for the salt-syndic. To start the salt-syndic via launchd, run |
---|
100 | |
---|
101 | sudo launchctl load -w /Library/LaunchDaemons/org.macports.salt-syndic.plist |
---|
102 | |
---|
103 | To disable launchd management, run |
---|
104 | |
---|
105 | sudo launchctl unload -w /Library/LaunchDaemons/org.macports.salt-syndic.plist |
---|
106 | |
---|
107 | " |
---|
108 | } |
---|
109 | |
---|
110 | post-destroot { |
---|
111 | file mkdir /opt/local/etc/salt |
---|
112 | |
---|
113 | if ![file exists /etc/salt] { |
---|
114 | file link /etc/salt /opt/local/etc/salt |
---|
115 | } |
---|
116 | } |
---|
117 | |
---|
118 | |
---|