# $Id: Portfile 45610 2009-01-18 22:00:27Z blb@macports.org $

PortSystem              1.0
PortGroup               xcode 1.0

name                    ihook
set my_name             iHook
version                 1.1.0
categories              aqua
maintainers             nomaintainer

description             A graphical interface frontend for commandline executables
long_description        iHook is a graphical frontend for any commandline \
                        executable. It gives scripts a pleasant Aqua face, \
                        allows script writers to provide graphical feedback \
                        without having to learn one of the higher APIs \
                        available for Mac OS X. 

homepage                http://rsug.itd.umich.edu/software/ihook/
master_sites            ${homepage}files/

distname                ${name}-${version}-src
worksrcdir              ${name}-${version}
extract.suffix          .tgz

checksums               md5     5d8582eaa62f633095eb5d4ee31d10b9 \
                        sha1    73f434d9bd9238a7c36014c1dd656f9b9eba1616 \
                        rmd160  5b384f008739ba8cffd5380aa8ea7bcf3c6d7eec

post-destroot {
    fs-traverse dir ${destroot} {
        if {[file isdirectory ${dir}]} {
            file attributes ${dir} -permissions u+w
        }
    }
    move ${destroot}${applications_dir}/shookexec \
        ${destroot}${applications_dir}/${my_name}.app/Contents/Resources
}

variant universal {}
if {! [variant_isset universal]} {
    set arch ${os.arch}
    if {! [string compare ${os.arch} powerpc]} {
        set arch ppc
    }

    xcode.build.settings        ARCHS=${arch}
    xcode.destroot.settings     ARCHS=${arch}
}

livecheck.check         regex
livecheck.url           ${homepage}
livecheck.regex         "${my_name} (\\d+(?:\\.\\d+)*)"
