Ticket #41492: Portfile

File Portfile, 2.8 KB (added by a.vermeer@…, 11 years ago)

Working port file for 1.4

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 111705 2013-09-29 02:43:41Z blair@macports.org $
3
4PortSystem      1.0
5PortGroup       python 1.0
6
7name            ansible
8version         1.4
9categories      sysutils
10supported_archs noarch
11
12maintainers     blair
13
14homepage        http://ansible.cc/
15description     SSH-based configuration management and deployment system
16long_description \
17    Ansible is a radically simple model-driven configuration \
18    management, multi-node deployment, and remote task execution \
19    system.  Ansible works over SSH and does not require any software \
20    or daemons to be installed on remote nodes.  Extension modules can \
21    be written in any language and are transferred to managed machines \
22    automatically.
23
24license         GPL-3+
25
26platforms       darwin
27
28master_sites    http://www.ansibleworks.com/releases/
29checksums       rmd160 3055e8bf21ef8728306d7955b9513de4fdeb46a4 \
30                sha256 6fa72d5975ea6aabddcdf1ed73c9a6e484ef0449ecec343b609c174067ac04a7
31
32python.default_version  27
33depends_lib-append      port:py${python.version}-jinja2 \
34                        port:py${python.version}-paramiko \
35                        port:py${python.version}-yaml
36
37patch {
38    fs-traverse f ${worksrcpath} {
39        if {[file isfile ${f}]} {
40            reinplace "s#/etc/ansible#${prefix}/etc/ansible#g" ${f}
41            reinplace "s#/usr/share/ansible#${prefix}/share/ansible#g" ${f}
42        }
43    }
44}
45
46post-destroot {
47    # Documentation and examples.
48    xinstall -m 644 -W ${worksrcpath} README.md COPYING \
49        ${destroot}${prefix}/share/doc/${name}
50
51    xinstall -m 755 -d ${destroot}${prefix}/share/doc/examples
52    xinstall -m 755 ${worksrcpath}/examples/ansible.cfg \
53        ${destroot}${prefix}/share/doc/${name}/examples
54    xinstall -m 755 ${worksrcpath}/examples/hosts \
55        ${destroot}${prefix}/share/doc/${name}/examples
56
57    file copy ${worksrcpath}/examples/playbooks \
58        ${destroot}${prefix}/share/doc/${name}/examples/
59
60    # Man pages.
61    xinstall -d 644 ${destroot}${prefix}/share/man/man1
62    eval xinstall -m 755 [glob ${worksrcpath}/docs/man/man1/*.1] \
63        ${destroot}${prefix}/share/man/man1
64    xinstall -d 644 ${destroot}${prefix}/share/man/man3
65    eval xinstall -m 755 [glob ${worksrcpath}/docs/man/man3/*.3] \
66        ${destroot}${prefix}/share/man/man3
67
68    # Install sample config and hosts file.
69    xinstall -m 755 -d ${destroot}${prefix}/etc/ansible
70    xinstall -b -m 755 ${worksrcpath}/examples/ansible.cfg \
71        ${destroot}${prefix}/etc/ansible/ansible.cfg.default
72    xinstall -b -m 755 ${worksrcpath}/examples/hosts \
73        ${destroot}${prefix}/etc/ansible/hosts.default
74}
75
76python.link_binaries_suffix