# -*- 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

PortSystem          1.0
PortGroup           python 1.0
PortGroup           select 1.0

name                py-ansible
version             3.0.0
license             GPL-3+

categories-append   sysutils
platforms           darwin
supported_archs     noarch

maintainers         {adfernandes @adfernandes} {gmail.com:pedro.salgado @steenzout} openmaintainer

master_sites        pypi:a/ansible
homepage            https://github.com/ansible/ansible
description         SSH-based configuration management and deployment system

distname            ansible-${version}
checksums           rmd160  807892f5f884f4a3ecde82b736d3a10d7eaf1fb2 \
                    sha256  843aa807813318b0c8a6684a2895c74a4ccfb3c01d2bb41a53856b2434ebaaec \
                    size    30760609

conflicts           ansible

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.

python.versions 27 35 36 37 38 39

if {${name} ne ${subport}} {
    patch {
        fs-traverse f ${worksrcpath} {
            if {[file isfile ${f}] && [regexp {\.(py|yml|yaml)$} ${f} match]} {
                reinplace -q "s#/etc/ansible#${prefix}/etc/ansible#g" ${f}
                reinplace -q "s#/usr/share/ansible#${prefix}/share/ansible#g" ${f}
            }
        }
    }
    depends_lib-append  port:py${python.version}-ansible-base
    livecheck.type  none
} else {
    livecheck.name  ansible
}
