# -*- 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    gdubw gng 1.0.5 v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision        0

categories      java devel
maintainers     {breun.nl:nils @breun} openmaintainer
platforms       {darwin any}
license         Apache-2
supported_archs noarch

description     GNG -- Gradle is Not Gradle

long_description GNG (Gradle is Not Gradle) is a script that automatically searches your 'gradlew' script \
                when you are inside your Gradle project and executes it. It also contains an official Gradle wrapper. \
                You can create gradle projects from scratch without installing Gradle. \
                This is originally inspired by gdub and gradlew-bootstrap. \
                GNG is the successor of gdub. It keeps the original gw command and with more features. \
                It is written totally in bash script.

homepage        https://gng.dsun.org

checksums       rmd160  134a4303287c11ad36df371ba09143ce938269f7 \
                sha256  2f4526b04a1e589ae05d4d333044245f8f725774865edf69e4ee8a306514ab1b \
                size    71137

depends_run     port:bash

use_configure   no

build {}

destroot {
    set target ${destroot}${prefix}/share/java/${name}

    # Create the target directory
    xinstall -m 755 -d ${target}

    # Copy over the needed elements of our directory tree
    foreach d { LICENSE bin docs gradle lib } {
        copy ${worksrcpath}/${d} ${target}
    }

    # Add symlinks to the scripts
    foreach f { gng gw } {
        ln -s ../share/java/${name}/bin/${f} ${destroot}${prefix}/bin
    }
}