# -*- 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        AdityaGarg8 git-credential-email 5.5 v
github.tarball_from archive
revision            0
categories          security
license             Apache-2
maintainers         {makr @mohd-akram} openmaintainer

description         git credential helpers for email providers

long_description    Git credential helpers for Microsoft Outlook, Gmail, \
                    Yahoo, AOL and Proton Mail accounts.

checksums           rmd160  50d5b1c6f0d20cc564f395d9231791f8b3c507ba \
                    sha256  7fcef406d24e2c60154a9bfc16361bb70c3cb6e647739cf64eed0f0dfeb47e20 \
                    size    50848

set py_ver          3.13
set py_ver_nodot    [string map {. {}} ${py_ver}]

depends_lib         port:python${py_ver_nodot} \
                    port:py${py_ver_nodot}-keyring \
                    port:py${py_ver_nodot}-requests

configure.python    ${prefix}/bin/python${py_ver}

use_configure       no
build {}
destroot {
    copy {*}[glob ${worksrcpath}/git-*] ${destroot}${prefix}/bin
    reinplace "s|^#!/usr/bin/env python3|#!${configure.python}|" \
        {*}[glob ${destroot}${prefix}/bin/*]
}
