# -*- 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 114324 2013-12-05 08:44:51Z ryandesign@macports.org $

PortSystem          1.0
PortGroup           python 1.0

name                py-appscript
version             1.0.0
categories          python
platforms           darwin
maintainers         internode.on.net:arsptr
description         High-level application scripting package for Python
long_description    Appscript is a high-level, user-friendly MacPython to \
                    Apple event bridge that allows you to control scriptable \
                    Mac OS X applications using ordinary Python scripts. \
                    Appscript makes MacPython a serious alternative to Apple's \
                    own AppleScript language for automating your Mac.

homepage            http://appscript.sourceforge.net/
master_sites        http://pypi.python.org/packages/source/a/appscript/
distname            appscript-${version}

checksums           md5    6619b637037ea0f391f45870c13ae38a \
                    sha256 ed15d00ef41f8705da7e60833c7e4a56633135d903aeaba0231f8b4ca9c91843

python.versions     24 25 26 27 31 32

if {${name} ne ${subport}} {
    depends_lib-append  port:py${python.version}-setuptools
    post-destroot {
        foreach subdir {appscript_2x appscript_3x} {
            xinstall -m 755 -d ${destroot}${prefix}/share/doc/${subport}/${subdir}
            file copy ${worksrcpath}/${subdir}/sample \
                ${destroot}${prefix}/share/doc/${subport}/${subdir}/sample
            file copy ${worksrcpath}/${subdir}/doc \
                ${destroot}${prefix}/share/doc/${subport}/${subdir}/doc
        }
    }
}
