# -*- 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            lhaeger keystore-explorer 5.4.4_1 macports-
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from     tarball
version                 5.4.4
revision                1

categories              security
supported_archs         x86_64
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  17cc046dbdf5646dfd280ab02decd3953398a2b8 \
                        sha256  c539067c94c47280e666fac6255e3f15d0b00a110920ebd3e77e631b41b608fe \
                        size    8231142

java.version            1.8+
java.fallback           openjdk8

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
