Ticket #53815: Portfile

File Portfile, 1.3 KB (added by pebrc (Peter Brachwitz), 7 years ago)
Line 
1# -*- 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
2PortSystem           1.0
3PortGroup            github 1.0
4
5categories           devel
6platforms            darwin
7license              Apache-2
8maintainers          gmail.com:peter.brachwitz openmaintainer
9description          Kubernetes Operations (kops)
10long_description     Production Grade K8s Installation, Upgrades, and Management
11github.setup         kubernetes kops 1.5.3
12
13checksums            sha256  a49c94d6bc1296f5dc7662547e379c4811c931b7dc4638cafce9ea3778012175 \
14                     rmd160  714ad9177149dda1d8e01ffe61d2c398ef1c8ece
15
16depends_lib          port:md5sha1sum
17
18worksrcdir           src/k8s.io/kops
19
20extract.mkdir        yes
21extract.post_args    "| tar -xf - -C ${worksrcpath} --strip-components=1"
22use_configure        no
23
24set GOPATH           ${workpath}
25set GOROOT_FINAL     ${prefix}/lib/go
26
27build.env            GOPATH=${GOPATH}
28build.args           -C ${worksrcpath}
29
30destroot {
31    set grfdir ${destroot}${GOROOT_FINAL}
32    xinstall -d ${grfdir}
33    foreach f {bin pkg} {
34        copy ${workpath}/${f} ${grfdir}
35    }
36    foreach f [glob -directory ${workpath}/bin *] {
37        set fname [file tail $f]
38       
39        system -W ${destroot}${prefix}/bin/  "ln -s ../lib/go/bin/$fname ./$fname"
40    }
41}