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 111705 2013-09-29 02:43:41Z blair@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup python 1.0 |
---|
6 | |
---|
7 | name ansible |
---|
8 | version 1.4 |
---|
9 | categories sysutils |
---|
10 | supported_archs noarch |
---|
11 | |
---|
12 | maintainers blair |
---|
13 | |
---|
14 | homepage http://ansible.cc/ |
---|
15 | description SSH-based configuration management and deployment system |
---|
16 | long_description \ |
---|
17 | Ansible is a radically simple model-driven configuration \ |
---|
18 | management, multi-node deployment, and remote task execution \ |
---|
19 | system. Ansible works over SSH and does not require any software \ |
---|
20 | or daemons to be installed on remote nodes. Extension modules can \ |
---|
21 | be written in any language and are transferred to managed machines \ |
---|
22 | automatically. |
---|
23 | |
---|
24 | license GPL-3+ |
---|
25 | |
---|
26 | platforms darwin |
---|
27 | |
---|
28 | master_sites http://www.ansibleworks.com/releases/ |
---|
29 | checksums rmd160 3055e8bf21ef8728306d7955b9513de4fdeb46a4 \ |
---|
30 | sha256 6fa72d5975ea6aabddcdf1ed73c9a6e484ef0449ecec343b609c174067ac04a7 |
---|
31 | |
---|
32 | python.default_version 27 |
---|
33 | depends_lib-append port:py${python.version}-jinja2 \ |
---|
34 | port:py${python.version}-paramiko \ |
---|
35 | port:py${python.version}-yaml |
---|
36 | |
---|
37 | patch { |
---|
38 | fs-traverse f ${worksrcpath} { |
---|
39 | if {[file isfile ${f}]} { |
---|
40 | reinplace "s#/etc/ansible#${prefix}/etc/ansible#g" ${f} |
---|
41 | reinplace "s#/usr/share/ansible#${prefix}/share/ansible#g" ${f} |
---|
42 | } |
---|
43 | } |
---|
44 | } |
---|
45 | |
---|
46 | post-destroot { |
---|
47 | # Documentation and examples. |
---|
48 | xinstall -m 644 -W ${worksrcpath} README.md COPYING \ |
---|
49 | ${destroot}${prefix}/share/doc/${name} |
---|
50 | |
---|
51 | xinstall -m 755 -d ${destroot}${prefix}/share/doc/examples |
---|
52 | xinstall -m 755 ${worksrcpath}/examples/ansible.cfg \ |
---|
53 | ${destroot}${prefix}/share/doc/${name}/examples |
---|
54 | xinstall -m 755 ${worksrcpath}/examples/hosts \ |
---|
55 | ${destroot}${prefix}/share/doc/${name}/examples |
---|
56 | |
---|
57 | file copy ${worksrcpath}/examples/playbooks \ |
---|
58 | ${destroot}${prefix}/share/doc/${name}/examples/ |
---|
59 | |
---|
60 | # Man pages. |
---|
61 | xinstall -d 644 ${destroot}${prefix}/share/man/man1 |
---|
62 | eval xinstall -m 755 [glob ${worksrcpath}/docs/man/man1/*.1] \ |
---|
63 | ${destroot}${prefix}/share/man/man1 |
---|
64 | xinstall -d 644 ${destroot}${prefix}/share/man/man3 |
---|
65 | eval xinstall -m 755 [glob ${worksrcpath}/docs/man/man3/*.3] \ |
---|
66 | ${destroot}${prefix}/share/man/man3 |
---|
67 | |
---|
68 | # Install sample config and hosts file. |
---|
69 | xinstall -m 755 -d ${destroot}${prefix}/etc/ansible |
---|
70 | xinstall -b -m 755 ${worksrcpath}/examples/ansible.cfg \ |
---|
71 | ${destroot}${prefix}/etc/ansible/ansible.cfg.default |
---|
72 | xinstall -b -m 755 ${worksrcpath}/examples/hosts \ |
---|
73 | ${destroot}${prefix}/etc/ansible/hosts.default |
---|
74 | } |
---|
75 | |
---|
76 | python.link_binaries_suffix |
---|