# -*- 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 102427 2013-02-02 18:26:31Z ryandesign@macports.org $

PortSystem                  1.0
PortGroup                   github 1.0
PortGroup                   xcode 1.0

github.setup                BlueM cliclick 2.2
categories                  sysutils
maintainers                 ryandesign
license                     BSD

description                 a command-line utility for simulating mouse clicks

long_description            ${name} emulates mouse clicks or series of mouse \
                            clicks (including double-clicks and Control-clicks) \
                            at arbitrary screen coordinates

homepage                    http://www.bluem.net/en/mac/cliclick/

checksums                   rmd160  f934bfee0a79a412a20dedbfe72cb1bec7dd9f58 \
                            sha256  11b26f3789b2f86b1248e994b61d981a9035425b3fa57206f3596dd9d47bdc34

pre-fetch {
    if {${os.major} < 9} {
        ui_error "${name} requires OS X 10.5 or greater."
        return -code error "incompatible OS X version"
    }
}

patchfiles                  patch-cliclick.xcodeproj-project.pbxproj.diff

xcode.configuration         Release

destroot {
    xinstall ${worksrcpath}/build/${xcode.configuration}/${name} ${destroot}${prefix}/bin
    xinstall -d ${destroot}${prefix}/share/doc/${name}
    xinstall -m 644 -W ${worksrcpath} README.markdown ${destroot}${prefix}/share/doc/${name}
}
