# -*- 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

PortSystem      1.0
PortGroup       github 1.0
PortGroup       makefile 1.0

github.setup    funtoo keychain 2.9.8
github.tarball_from archive
revision        0
categories      sysutils security
license         GPL-2
platforms       any
supported_archs noarch
maintainers     {khindenburg @kurthindenburg} openmaintainer
description     A user-friendly front-end to ssh-agent(1)

long_description \
    Keychain is a shell script which acts as user-friendly front-end to \
    ssh-agent(1), allowing you to have one long-running ssh-agent \
    process per system rather than per login session.

homepage        https://www.funtoo.org/Keychain

checksums           rmd160  7a89de365654026a3d16e96c41d2450c0a44bd17 \
                    sha256  589cf55ae5c4b65af1d977d705beb319006efca5bcdda8352b8558d0dcff5a84 \
                    size    61665

depends_build-append    bin:pod2man:perl5

# Patch keychain's path to pick up any MacPorts binaries, such as
# ssh-agent.
post-patch {
    reinplace \
        -E "s#/usr/bin:/bin#${prefix}/bin:${prefix}/bin#" \
        ${worksrcpath}/keychain.sh
}

destroot {
    xinstall -m 755 ${worksrcpath}/keychain ${destroot}${prefix}/bin
    xinstall -m 444 ${worksrcpath}/keychain.1 ${destroot}${prefix}/share/man/man1
}

# Remove after a few releases
notes "
    The 2.9.x series is the first release in over 7 years.  Check the man
page and homepage for more info.
"

github.livecheck.regex {([0-9.]+)}
