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$ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup ruby 1.0 |
---|
6 | |
---|
7 | name mcollective |
---|
8 | version 1.2.1 |
---|
9 | categories net sysutils |
---|
10 | platforms darwin |
---|
11 | supported_archs noarch |
---|
12 | license Apache-2 |
---|
13 | maintainers nomaintainer |
---|
14 | description The Marionette Collective |
---|
15 | long_description \ |
---|
16 | The Marionette Collective AKA MCollective is a framework to build \ |
---|
17 | server orchestration or parallel job execution systems. |
---|
18 | homepage http://www.puppetlabs.com/mcollective/ |
---|
19 | master_sites http://downloads.puppetlabs.com/mcollective/ |
---|
20 | |
---|
21 | checksums md5 6764799f8183f63b099af167abe749d5 \ |
---|
22 | sha1 ebac6933a1938e3a4aa2933cf0afceb3fa6b5744 \ |
---|
23 | rmd160 812328307885684697021c20dcd76bbc171105b3 |
---|
24 | |
---|
25 | depends_lib port:ruby \ |
---|
26 | port:rb-stomp |
---|
27 | |
---|
28 | extract.suffix .tgz |
---|
29 | use_configure no |
---|
30 | build {} |
---|
31 | test.run no |
---|
32 | |
---|
33 | post-patch { |
---|
34 | # Not 100% sure why I need to change "/usr/bin/env ruby" to "${ruby.bin}" |
---|
35 | reinplace "s|#!.*|#!${ruby.bin}|" \ |
---|
36 | ${worksrcpath}/mcollectived.rb |
---|
37 | reinplace "s|configfile = \"|&${prefix}|" \ |
---|
38 | ${worksrcpath}/mcollectived.rb |
---|
39 | |
---|
40 | reinplace "s|\\(libdir = \\)/usr|\\1${prefix}|" \ |
---|
41 | ${worksrcpath}/etc/client.cfg.dist \ |
---|
42 | ${worksrcpath}/etc/server.cfg.dist |
---|
43 | reinplace "s|plugin.yaml = |&${prefix}|" \ |
---|
44 | ${worksrcpath}/etc/client.cfg.dist \ |
---|
45 | ${worksrcpath}/etc/server.cfg.dist |
---|
46 | reinplace "s|logfile = |&${prefix}|" \ |
---|
47 | ${worksrcpath}/etc/server.cfg.dist |
---|
48 | |
---|
49 | reinplace "s|@rpchelptemplate = \"|&${prefix}|" \ |
---|
50 | ${worksrcpath}/lib/mcollective/config.rb |
---|
51 | |
---|
52 | reinplace "s|:configfile\\] \\|\\| \"|&${prefix}|" \ |
---|
53 | ${worksrcpath}/lib/mcollective/rpc.rb |
---|
54 | |
---|
55 | reinplace "s|config = \"|&${prefix}|g" \ |
---|
56 | ${worksrcpath}/lib/mcollective/util.rb |
---|
57 | } |
---|
58 | |
---|
59 | destroot.keepdirs ${destroot}${prefix}/etc/mcollective/ssl/clients \ |
---|
60 | ${destroot}${prefix}/etc/mcollective/plugin.d \ |
---|
61 | ${destroot}${prefix}/var/log \ |
---|
62 | ${destroot}${prefix}/var/run |
---|
63 | |
---|
64 | destroot { |
---|
65 | xinstall -m 755 -d ${destroot}${ruby.lib} |
---|
66 | xinstall -m 755 -d ${destroot}${prefix}/bin |
---|
67 | xinstall -m 755 -d ${destroot}${prefix}/sbin |
---|
68 | xinstall -m 755 -d ${destroot}${prefix}/libexec/mcollective |
---|
69 | xinstall -m 755 -d ${destroot}${prefix}/etc/mcollective |
---|
70 | xinstall -m 755 -d ${destroot}${prefix}/etc/mcollective/plugin.d |
---|
71 | xinstall -m 755 -d ${destroot}${prefix}/etc/mcollective/ssl/clients |
---|
72 | xinstall -m 755 -d ${destroot}${prefix}/var/log |
---|
73 | xinstall -m 755 -d ${destroot}${prefix}/var/run |
---|
74 | |
---|
75 | xinstall -m 755 ${worksrcpath}/mcollectived.rb ${destroot}${prefix}/sbin/mcollectived |
---|
76 | xinstall -m 640 ${worksrcpath}/etc/server.cfg.dist ${destroot}${prefix}/etc/mcollective/server.cfg |
---|
77 | xinstall -m 644 ${worksrcpath}/etc/client.cfg.dist ${destroot}${prefix}/etc/mcollective/client.cfg |
---|
78 | xinstall -m 444 ${worksrcpath}/etc/facts.yaml.dist ${destroot}${prefix}/etc/mcollective/facts.yaml |
---|
79 | xinstall -m 755 ${worksrcpath}/etc/rpc-help.erb ${destroot}${prefix}/etc/mcollective/rpc-help.erb |
---|
80 | |
---|
81 | eval file copy [glob ${worksrcpath}/lib/*] ${destroot}${ruby.lib} |
---|
82 | eval file copy [glob ${worksrcpath}/plugins/*] ${destroot}${prefix}/libexec/mcollective |
---|
83 | eval xinstall -m 755 [glob ${worksrcpath}/mc-*] ${destroot}${prefix}/sbin |
---|
84 | xinstall -m 755 ${worksrcpath}/mco ${destroot}${prefix}/bin |
---|
85 | } |
---|
86 | |
---|
87 | startupitem.create yes |
---|
88 | startupitem.name mcollectived |
---|
89 | startupitem.executable ${prefix}/sbin/mcollectived --pidfile=${prefix}/var/run/mcollectived.pid --config=${prefix}/etc/mcollective/server.cfg |
---|
90 | startupitem.pidfile auto ${prefix}/var/run/mcollectived.pid |
---|