# -*- 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.6
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  406140b713cb0b4831e143cee50eaf1193403ce2 \
                    sha256  23e58da1f3ea7cbe15069e7d3c730277d0cb6a4bec2db76adc20a06acd4c0a42 \
                    size    51990

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.]+)}
