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

perl5.require_variant   yes
perl5.conflict_variants yes
perl5.branches          5.28 5.30 5.32 5.34
perl5.default_branch    5.34
perl5.create_variants   ${perl5.branches}

github.setup        rodnaph thieriot 1.1.1 v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            4
categories          devel shells
maintainers         nomaintainer
license             MIT
description         Shell tool for managing a projects Jenkins builds
long_description    Thieriot is a simple shell tool for projects that use \
                    Git and Jenkins, and allows you to easily check which \
                    of your branches currently have builds.  And then to \
                    easily create/start/delete builds with a single command.

depends_lib         port:p${perl5.major}-yaml \
                    port:p${perl5.major}-json \
                    port:p${perl5.major}-libwww-perl

checksums           rmd160  6447c8b916fd3b8891e50dea8a7a236a6017a538 \
                    sha256  7dc3fc909ddeb6eb71e21b082a2b8b270fcaa94b80dd35cda9286e81d5a63062 \
                    size    65099

use_configure       no
supported_archs     noarch
platforms           any

post-patch {
    reinplace       "s&#!/usr/bin/env perl&#!${perl5.bin}&" ${worksrcpath}/trt
}

build               {}

destroot            {
    xinstall -m 0755 ${worksrcpath}/trt \
        ${destroot}${prefix}/bin/trt
    xinstall -d ${destroot}${prefix}/share/doc/${name}
    xinstall -m 0644 ${worksrcpath}/LICENSE \
        ${destroot}${prefix}/share/doc/${name}
}
