# Created by: Torsten Zuehlsdorff # $FreeBSD$ PORTNAME?= gitlab-shell PORTVERSION?= 13.7.0 PORTREVISION?= 1 CATEGORIES= devel MAINTAINER?= mfechner@FreeBSD.org COMMENT?= GitLab Shell handles git commands for GitLab LICENSE= MIT BUILD_DEPENDS= rubygem-bundler1=1.17.3:sysutils/rubygem-bundler1 USES= gmake go:modules,no_targets MAKE_ENV= GOFLAGS="${GO_BUILDFLAGS}" ALL_TARGET= build USE_GITLAB= yes GL_ACCOUNT?= gitlab-org # Find the commit hash here: https://gitlab.com/gitlab-org/gitlab-shell/tags GL_COMMIT?= 82ec8144fb2a04d78f29ae5d1f4e5a407257309f USERS= git GROUPS= git INSTALL_TARGET= install-strip # for go dependencies USE_GITHUB= nodefault # generated with: make gomod-deps # 31dd # Make sure you have here the path .../go/vendor/... and not .../vendor/... GH_TUPLE= \ DataDog:dd-trace-go:v1.7.0:datadog_dd_trace_go/vendor/gopkg.in/DataDog/dd-trace-go.v1 \ client9:reopen:v1.0.0:client9_reopen/vendor/github.com/client9/reopen \ HdrHistogram:hdrhistogram-go:3a0bb77429bd:codahale_hdrhistogram_go/vendor/github.com/codahale/hdrhistogram \ davecgh:go-spew:v1.1.1:davecgh_go_spew/vendor/github.com/davecgh/go-spew \ go-yaml:yaml:v2.2.4:go_yaml_yaml/vendor/gopkg.in/yaml.v2 \ golang:crypto:87dc89f01550:golang_crypto/vendor/golang.org/x/crypto \ golang:net:6afb5195e5aa:golang_net/vendor/golang.org/x/net \ golang:protobuf:v1.3.2:golang_protobuf/vendor/github.com/golang/protobuf \ golang:sys:86b910548bc1:golang_sys/vendor/golang.org/x/sys \ golang:text:v0.3.2:golang_text/vendor/golang.org/x/text \ google:go-genproto:ca5a22157cba:google_go_genproto/vendor/google.golang.org/genproto \ grpc-ecosystem:go-grpc-middleware:v1.0.0:grpc_ecosystem_go_grpc_middleware/vendor/github.com/grpc-ecosystem/go-grpc-middleware \ grpc:grpc-go:v1.24.0:grpc_grpc_go/vendor/google.golang.org/grpc \ konsorten:go-windows-terminal-sequences:v1.0.2:konsorten_go_windows_terminal_sequences/vendor/github.com/konsorten/go-windows-terminal-sequences \ lightstep:lightstep-tracer-go:v0.15.6:lightstep_lightstep_tracer_go/vendor/github.com/lightstep/lightstep-tracer-go \ mattn:go-shellwords:2444a32a19f4:mattn_go_shellwords/vendor/github.com/mattn/go-shellwords \ opentracing:opentracing-go:v1.0.2:opentracing_opentracing_go/vendor/github.com/opentracing/opentracing-go \ otiai10:copy:v1.0.1:otiai10_copy/vendor/github.com/otiai10/copy \ philhofer:fwd:v1.0.0:philhofer_fwd/vendor/github.com/philhofer/fwd \ pkg:errors:v0.8.1:pkg_errors/vendor/github.com/pkg/errors \ pmezard:go-difflib:v1.0.0:pmezard_go_difflib/vendor/github.com/pmezard/go-difflib \ sebest:xff:6c115e0ffa35:sebest_xff/vendor/github.com/sebest/xff \ sirupsen:logrus:v1.3.0:sirupsen_logrus/vendor/github.com/sirupsen/logrus \ stretchr:testify:v1.4.0:stretchr_testify/vendor/github.com/stretchr/testify \ tinylib:msgp:v1.1.0:tinylib_msgp/vendor/github.com/tinylib/msgp \ uber:jaeger-client-go:v2.15.0:uber_jaeger_client_go/vendor/github.com/uber/jaeger-client-go \ uber:jaeger-lib:v1.5.0:uber_jaeger_lib/vendor/github.com/uber/jaeger-lib GL_TUPLE= gitlab-org:gitaly:aa1ff2a76ac14e1ad3eca35cc05ea86ef59fffbb:gitlab_org_gitaly/vendor/gitlab.com/gitlab-org/gitaly \ gitlab-org:labkit:0149780c759d60f61fcfe1648fb882ba7ec41f3f:gitlab_org_labkit/vendor/gitlab.com/gitlab-org/labkit VARLOGDIR?= /var/log/gitlab-shell PLIST_FILES+= "@dir(git,,755) ${VARLOGDIR}" post-patch: ${MV} ${WRKSRC}/config.yml.example ${WRKSRC}/config.yml.sample ${CP} ${WRKSRC}/config.yml.sample ${WRKSRC}/config.yml # Build the go deps, use `pkg install modules2tuple` gomod-deps: patch (cd ${WRKSRC} && go mod vendor) (cd ${WRKSRC} && modules2tuple vendor/modules.txt) pre-build: @(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE_CMD} build) pre-install: ${RM} -rf ${WRKSRC}/config.yml #${RM} -rf ${WRKSRC}/go_build do-install: @${MKDIR} ${STAGEDIR}${DATADIR} .for x in .codeclimate.yml .gitignore .gitlab-ci.yml .rubocop.yml .ruby-version CHANGELOG CONTRIBUTING.md Gemfile Gemfile.lock LICENSE README.md VERSION config.yml.sample ${INSTALL_DATA} ${WRKSRC}/${x} ${STAGEDIR}${DATADIR}/ .endfor .for x in bin spec hooks support .gitlab @${MKDIR} ${STAGEDIR}${DATADIR}/${x} (cd ${WRKSRC}/${x} && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/${x}) .endfor @${MKDIR} ${STAGEDIR}${VARLOGDIR} .include