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

github.setup        roddhjav pass-update 2.2.1 v
github.tarball_from releases
revision            0

categories          security
supported_archs     noarch
platforms           any
license             GPL-2
maintainers         {judaew @judaew} openmaintainer

description         A pass extension that provides a convenient solution to update an existing password.
long_description    {*}${description}

depends_lib         port:pass

checksums           rmd160  a99920c550840d3b61d615731fbea8b60111fce5 \
                    sha256  d0b0e1b561539847a2ee9ad7ea25c08f8d073abd632b634ce0c6bdf0fc6a7249 \
                    size    51214

depends_build       port:coreutils
depends_run         port:pass

post-patch {
    reinplace -E "s|install -D|${prefix}/bin/ginstall -D|g" ${worksrcpath}/Makefile
}

use_configure       no
build {}

destroot.env-append PREFIX=${prefix}
destroot.env-append BASHCOMPDIR=${prefix}/share/bash-completion/completions

notes {
    To use pass-update bash completion, add the following lines at the end of your .bash_profile:
        [[ -r "${prefix}/share/bash-completion/completions/pass-update" ]] && source "${prefix}/share/bash-completion/completions/pass-update"
}
