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

Last change on this file since 142815 was 142815, checked in by jmr@…, 3 years ago

various ports: remove redundant clearing of python.link_binaries_suffix, the portgroup now handles this

  • 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 142815 2015-11-24 03:22:35Z jmr@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
28
29checksums           rmd160 2695fc2e63ae73b1b63eaa30cae8f15fd4784466 \
30                    sha256 5ce29633a6d290ce11c375b5af6bfd84aecc5b41b2cc3272342ecc56f8c63375
31
32depends_build       port:py${python.version}-setuptools
33
34depends_lib-append  port:py${python.version}-crypto \
35                    port:py${python.version}-m2crypto \
36                    port:py${python.version}-jinja2 \
37                    port:py${python.version}-msgpack \
38                    port:py${python.version}-pip \
39                    port:py${python.version}-yaml \
40                    port:py${python.version}-zmq \
41                    port:swig-python
42
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
69post-destroot {
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
Note: See TracBrowser for help on using the repository browser.