# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=portfile:et:sw=4:ts=4:sts=4

PortSystem      1.0
PortGroup       xcode 1.0

name            Lingon
version         2.1.1
revision        1
license         Apache-2
categories      aqua sysutils
maintainers     nomaintainer
homepage        http://sourceforge.net/projects/lingon
description     Graphical interface for creating launchd configurations

long_description    Lingon is a graphical interface for creating launchd configuration \
                    files and controlling them through launchctl.

master_sites    sourceforge:lingon
checksums       md5 ddd342d070c117314117209296cceb75 \
                sha1 70ae697e1340e343c97bdab879e66d14c50f945d

use_zip         yes
distname        ${name}Source-${version}

pre-fetch {
    if {${os.major} < 9} {
        return -code error "${name} ${version} only builds on Mac OS X >= Leopard (10.5.x). Sorry."
    }
}

post-patch {
    reinplace "s|http://tuppis.com/lingon|${homepage}|g" ${worksrcpath}/Classes/LINMainController.m
    reinplace "s|http://tuppis.com/lingon|${homepage}|g" ${worksrcpath}/Credits.rtf
}

worksrcdir          ${name}Source
xcode.target        Lingon
xcode.configuration Release

