# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 83832 2011-09-11 15:30:47Z ryandesign@macports.org $

PortSystem      1.0

name            gnome-keyring
epoch           1
version         2.30.3
revision        3
set branch      [join [lrange [split ${version} .] 0 1] .]
maintainers     devans openmaintainer
categories      gnome
platforms       darwin
license         GPL-2+
description     GNOME program for storing passwords.

long_description \
    gnome-keyring is a program that keep password and other secrets \
    for users. It is run as a daemon in the session, similar to \
    ssh-agent, andother applications can locate it by an environment \
    variable.

homepage        http://live.gnome.org/GnomeKeyring/
master_sites    gnome:sources/${name}/${branch}/
use_bzip2       yes

checksums       md5     54cb1835c02a40f27fda73e58da17cc6 \
                sha1    0e0a2a1f4127dc6a01583fb3e81386370d9335f0 \
                rmd160  9bd3cea25e10e1dcd93cfbc75a6a448e8ab338ca

patchfiles      patch-pkcs11-secret-store-Makefile.am.diff \
                patch-configure.in.diff \
                patch-pam-gkr-pam-module.c.diff

depends_build   port:pkgconfig \
                port:intltool \
                port:gtk-doc

depends_lib     port:libgcrypt \
                port:libtasn1 \
                port:gconf

use_autoreconf  yes

configure.args  --with-pam-dir=/usr/lib/pam \
                --disable-schemas-install

test.run        yes
test.target     check

pre-test {
    if {! [variant_isset test]} {
        return -code 1 "You must enable test variant to test this port."
    }
}

variant test description {Enable build of tests} {
    configure.args-append   --enable-tests
}

destroot.violate_mtree yes

post-destroot {
    file delete ${destroot}/usr/lib/pam/pam_gnome_keyring.la
}

post-activate    {
    system "export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` && \
        gconftool-2 --makefile-install-rule ${prefix}/etc/gconf/schemas/*.schemas"
}

livecheck.type  regex
livecheck.url   http://ftp.gnome.org/pub/gnome/sources/${name}/${branch}/
livecheck.regex {LATEST-IS-(\d+(?:\.\d+)*)}
