diff --git a/_resources/port1.0/group/golang-1.0.tcl b/_resources/port1.0/group/golang-1.0.tcl index b0a68dcf177fb..154954eb17b47 100644 --- a/_resources/port1.0/group/golang-1.0.tcl +++ b/_resources/port1.0/group/golang-1.0.tcl @@ -258,6 +258,7 @@ proc handle_set_go_vendors {vendors_str} { # # - GitHub: ${author}-${project}-${7-digit hash} # - Bitbucket: ${author}-${project}-${12-digit hash} +# - GitLab: ${project}-${ref} # # Support for additional hosts not conforming to this pattern will take some # work. @@ -267,7 +268,14 @@ post-extract { # as the result will not be accurate when go.package has been # customized. file mkdir [file dirname ${worksrcpath}] - move [glob ${workpath}/${go.author}-${go.project}-*] ${worksrcpath} + if [file exists [glob -nocomplain ${workpath}/${go.author}-${go.project}-*]] { + # GitHub and Bitbucket follow this path + move [glob ${workpath}/${go.author}-${go.project}-*] ${worksrcpath} + } else { + # GitLab follows this path + move [glob ${workpath}/${go.project}-*] ${worksrcpath} + } + # If the above fails then something went wrong and we should error out. } foreach vlist ${go.vendors_internal} { diff --git a/devel/gitlab-runner/Portfile b/devel/gitlab-runner/Portfile new file mode 100644 index 0000000000000..f6dafdfe9df89 --- /dev/null +++ b/devel/gitlab-runner/Portfile @@ -0,0 +1,41 @@ +# -*- 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 golang 1.0 + +go.setup gitlab.com/gitlab-org/gitlab-runner 11.5.1 v + +categories devel +platforms darwin +supported_archs x86_64 +maintainers @breun openmaintainer +license MIT + +description GitLab Runner +long_description GitLab Runner is the open source project that is used to \ + run your jobs and send the results back to GitLab. It is \ + used in conjunction with GitLab CI, the open-source \ + continuous integration service included with GitLab that \ + coordinates the jobs. + +homepage https://docs.gitlab.com/runner/ + +master_sites https://gitlab.com/gitlab-org/gitlab-runner/-/archive/v${version}/ +distname gitlab-runner-v${version} + +checksums rmd160 6034424f1d413f545abe0b7d91954be1cfa9bc6a \ + sha256 cd9df3755e5606e8bdf426a6743ecf2c3c9ab497facce5f467bda3aefd2164c7 \ + size 25750143 + +# Reproduce the "build_simple" target from the upstream Makefile +set go_ldflags "-X ${go.package}/common.NAME=${go.package} \ + -X ${go.package}/common.VERSION=${version} \ + -X ${go.package}/common.REVISION=unknown \ + -X ${go.package}/common.BUILT=unknown \ + -X ${go.package}/common.BRANCH=unknown \ + -s -w" +build.args -ldflags \"${go_ldflags}\" -o out/binaries/${name} ${go.package} + +destroot { + xinstall -m 0755 ${worksrcpath}/out/binaries/${name} ${destroot}${prefix}/bin/${name} +}