# -*- 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               java 1.0
PortGroup               github 1.0

github.setup            kaikramer keystore-explorer 5.6.1 v
github.tarball_from     archive
revision                0

categories              security
license                 GPL-3
maintainers             nomaintainer

description             KeyStore Explorer is a free GUI replacement for the Java command-line utilities keytool and jarsigner
long_description        {*}${description} with the following features: \
                        \n* Create, load, save and convert between various KeyStore types: JKS, JCEKS, PKCS#12, BKS (V1 and V2) and UBER \
                        \n* Change KeyStore and KeyStore entry passwords \
                        \n* Delete or rename KeyStore entries \
                        \n* Cut/copy/paste KeyStore entries \
                        \n* Append certificates to key pair certificate chains \
                        \n* Generate RSA, ECC and DSA key pairs with self-signed X.509 certificates \
                        \n* Apply X.509 certificate extensions to generated key pairs and Certificate Signing Requests (CSRs) \
                        \n* View X.509 Certificate, CRL and CRL entry X.509 V3 extensions \
                        \n* Import and export keys and certificates in many formats: PKCS#12, PKCS#8, PKCS#7, DER/PEM X.509 certificate files, Microsoft PVK, SPC, PKI Path, OpenSSL \
                        \n* Generate, view and sign CSRs in PKCS #10 and SPKAC formats \
                        \n* Sign JAR files \
                        \n* Configure a CA Certs KeyStore for use with KeyStore operations

homepage                https://keystore-explorer.org/

checksums               rmd160  5091dbe8055a0dd456c815fe4c9d3c4a4cb6c249 \
                        sha256  d84bb4435c8f052b991a6d92b4317c082d3dcc7a05a78a4c0a5f45353b308071 \
                        size    3455579

java.version            17
java.fallback           openjdk17

use_configure           no

depends_build-append    port:gradle

build.env-append        GRADLE_USER_HOME=${worksrcpath}/kse
build.cmd               ${prefix}/bin/gradle
build.args              --no-daemon -i -p ${worksrcpath}/kse
build.target            clean appbundler

destroot {
    copy "${worksrcpath}/kse/build/appBundle/KeyStore Explorer.app" ${destroot}${applications_dir}
}

# run livecheck against upstream
livecheck.version       ${version}
livecheck.url           https://github.com/kaikramer/keystore-explorer/tags
livecheck.regex         archive/refs/tags/v${github.livecheck.regex}\\.tar\\.gz
