# -*- 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 82184 2011-08-10 00:56:29Z ryandesign@macports.org $

PortSystem          1.0

name                contacts
version             1.1
revision            1
categories          sysutils
platforms           darwin
maintainers         nomaintainer
license             GPL-2

description         command line tool to access Mac OS X's Address Book

long_description    The utility contacts gives you access to view and \
                    search all your records in Mac OS X's Address Book \
                    database.

homepage            http://gnufoo.org/contacts/
master_sites        ${homepage}
distname            ${name}${version}
extract.suffix      .tgz

checksums           md5     37b6a6a0312dabc4ad2ddd8805f93e12

patchfiles          patch-FormatHelper.m

use_configure       no
variant universal {}

build {
    system -W ${worksrcpath} "${configure.cc} [get_canonical_archflags] -framework AppKit -framework Foundation -framework AddressBook -o contacts contacts.m FormatHelper.m"
}

destroot {
    xinstall ${worksrcpath}/contacts ${destroot}${prefix}/bin
    xinstall -m 644 ${worksrcpath}/contacts.1 ${destroot}${prefix}/share/man/man1
}
