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

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

ansible: follow up to r139409, restore epoch and remove 'v' from port version.

The 'v' is needed for the github tag, so keep it.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.7 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 139410 2015-08-16 16:30:26Z blair@macports.org $
3
4PortSystem      1.0
5PortGroup       python 1.0
6PortGroup       github 1.0
7
8name            ansible
9epoch           1
10version         1.9.2
11categories      sysutils
12
13github.setup    ${name} ${name} ${version}-1 v
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.default_version  27
33depends_lib-append      port:py${python.version}-httplib2 \
34                        port:py${python.version}-jinja2 \
35                        port:py${python.version}-paramiko \
36                        port:py${python.version}-yaml
37
38post-fetch {
39    # fetch submodules (https://github.com/ansible/ansible/issues/11199)
40    system -W ${worksrcpath} "git submodule update --init"
41}
42
43patch {
44    fs-traverse f ${worksrcpath} {
45        if {[file isfile ${f}] && ![regexp {\.(ico|png|eot|ttf|woff)$} ${f} match] && ![regexp {\.git} ${f} match] && ![regexp {v2/test/test.yml} ${f} match]} {
46            reinplace "s#/etc/ansible#${prefix}/etc/ansible#g" ${f}
47            reinplace "s#/usr/share/ansible#${prefix}/share/ansible#g" ${f}
48        }
49    }
50}
51
52post-destroot {
53    # Documentation and examples.
54    xinstall -m 644 -W ${worksrcpath} README.md COPYING \
55        ${destroot}${prefix}/share/doc/${name}
56
57    xinstall -m 755 -d ${destroot}${prefix}/share/doc/examples
58    xinstall -m 755 ${worksrcpath}/examples/ansible.cfg \
59        ${destroot}${prefix}/share/doc/${name}/examples
60    xinstall -m 755 ${worksrcpath}/examples/hosts \
61        ${destroot}${prefix}/share/doc/${name}/examples
62
63    # Man pages.
64    eval xinstall -m 755 [glob ${worksrcpath}/docs/man/man1/*.1] \
65        ${destroot}${prefix}/share/man/man1
66
67    # Install sample config and hosts file.
68    xinstall -m 755 -d ${destroot}${prefix}/etc/ansible
69    xinstall -b -m 755 ${worksrcpath}/examples/ansible.cfg \
70        ${destroot}${prefix}/etc/ansible/ansible.cfg.default
71    xinstall -b -m 755 ${worksrcpath}/examples/hosts \
72        ${destroot}${prefix}/etc/ansible/hosts.default
73}
74
75python.link_binaries_suffix
Note: See TracBrowser for help on using the repository browser.