source: trunk/dports/sysutils/ansible/Portfile @ 139409

Last change on this file since 139409 was 139409, checked in by adfernandes@…, 4 years ago

ansible: fixed wonky epoch/revision (trivial) goof

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