# -*- 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
# $Id: Portfile 106915 2013-06-11 18:45:55Z blair@macports.org $

PortSystem      1.0
PortGroup       python 1.0

name            ansible
version         1.2
categories      sysutils
supported_archs noarch

maintainers     blair

homepage        http://ansible.cc/
description     SSH-based configuration management and deployment system
long_description \
    Ansible is a radically simple model-driven configuration \
    management, multi-node deployment, and remote task execution \
    system.  Ansible works over SSH and does not require any software \
    or daemons to be installed on remote nodes.  Extension modules can \
    be written in any language and are transferred to managed machines \
    automatically.

license         GPL-3+

platforms       darwin

master_sites    http://www.ansibleworks.com/releases/
checksums       rmd160 4dba9a5aa182bac07a586f2f54a047c543b2236b \
                sha256 1fb5c697b814c8b4fc4a0dd29cdb09fab190a248e8bedb5ddbf2a1283cabb911

python.default_version  27
depends_lib-append      port:py${python.version}-jinja2 \
                        port:py${python.version}-paramiko \
                        port:py${python.version}-yaml

patch {
    fs-traverse f ${worksrcpath} {
        if {[file isfile ${f}]} {
            reinplace "s#/etc/ansible#${prefix}/etc/ansible#g" ${f}
            reinplace "s#/usr/share/ansible#${prefix}/share/ansible#g" ${f}
        }
    }
}

python.link_binaries_suffix
