source: trunk/dports/sysutils/ansible/Portfile

Last change on this file was 153718, checked in by adfernandes@…, 12 months ago

sysutils/ansible: Trivial version update to 2.1.2.0-1

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.0 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 153718 2016-10-08 19:17:29Z ryandesign@macports.org $
3
4PortSystem      1.0
5PortGroup       python 1.0
6PortGroup       github 1.0
7
8name            ansible
9epoch           1
10categories      sysutils
11
12github.setup    ${name} ${name} 2.1.2.0-1 v
13version         [string map {- .} ${version}]
14fetch.type      git
15
16maintainers     adfernandes blair gmail.com:pedro.salgado
17
18homepage        https://github.com/ansible/ansible
19description     SSH-based configuration management and deployment system
20long_description \
21    Ansible is a radically simple model-driven configuration \
22    management, multi-node deployment, and remote task execution \
23    system.  Ansible works over SSH and does not require any software \
24    or daemons to be installed on remote nodes.  Extension modules can \
25    be written in any language and are transferred to managed machines \
26    automatically.
27license         GPL-3+
28
29platforms       darwin
30supported_archs noarch
31
32python.versions 27
33
34depends_lib-append      port:py${python.version}-six \
35                        port:py${python.version}-paramiko \
36                        port:py${python.version}-httplib2 \
37                        port:py${python.version}-jinja2 \
38                        port:py${python.version}-yaml \
39                        port:py${python.version}-setuptools \
40                        port:py${python.version}-crypto
41
42depends_build-append    port:asciidoc \
43                        port:libxslt \
44                        port:docbook-xsl
45
46post-fetch {
47    # fetch submodules (https://github.com/ansible/ansible/issues/11199)
48    system -W "${worksrcpath}" "git submodule update --init"
49}
50
51patch {
52    fs-traverse f ${worksrcpath} {
53        if {[file isfile ${f}] && ![regexp {\.(ico|png|eot|ttf|woff|reg|gz)$} ${f} match] && ![regexp {\.git} ${f} match] && ![regexp {v2/test/test.yml} ${f} match]} {
54            reinplace "s#/etc/ansible#${prefix}/etc/ansible#g" ${f}
55            reinplace "s#/usr/share/ansible#${prefix}/share/ansible#g" ${f}
56        }
57    }
58}
59
60post-build {
61    system -W "${worksrcpath}" "make docs"
62}
63
64post-destroot {
65    # Documentation and examples.
66    xinstall -m 644 -W ${worksrcpath} README.md COPYING \
67        ${destroot}${prefix}/share/doc/${name}
68
69    xinstall -m 755 -d ${destroot}${prefix}/share/doc/examples
70    xinstall -m 755 ${worksrcpath}/examples/ansible.cfg \
71        ${destroot}${prefix}/share/doc/${name}/examples
72    xinstall -m 755 ${worksrcpath}/examples/hosts \
73        ${destroot}${prefix}/share/doc/${name}/examples
74
75    # Man pages.
76    eval xinstall -m 755 [glob ${worksrcpath}/docs/man/man1/*.1] \
77        ${destroot}${prefix}/share/man/man1
78
79    # Install sample config and hosts file.
80    xinstall -m 755 -d ${destroot}${prefix}/etc/ansible
81    xinstall -b -m 755 ${worksrcpath}/examples/ansible.cfg \
82        ${destroot}${prefix}/etc/ansible/ansible.cfg.default
83    xinstall -b -m 755 ${worksrcpath}/examples/hosts \
84        ${destroot}${prefix}/etc/ansible/hosts.default
85}
Note: See TracBrowser for help on using the repository browser.