From ec690fc8dac6ac59f9ca3b5bfb36873453012ae3 Mon Sep 17 00:00:00 2001 From: Matthias Fechner Date: Wed, 3 Jul 2024 12:23:53 +0300 Subject: [PATCH] textproc/gitlab-elasticsearch-indexer: use new feature from go.mk to download go.mod from gitlab --- .../gitlab-elasticsearch-indexer/Makefile | 20 ++----------------- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/textproc/gitlab-elasticsearch-indexer/Makefile b/textproc/gitlab-elasticsearch-indexer/Makefile index ebbe675a7a0a..ffb95d022ee3 100644 --- a/textproc/gitlab-elasticsearch-indexer/Makefile +++ b/textproc/gitlab-elasticsearch-indexer/Makefile @@ -20,29 +20,13 @@ USES= gmake go:modules,no_targets,1.22 pkgconfig USE_GITLAB= yes GL_ACCOUNT= gitlab-org +GO_MOD_DIST= gitlab +GO_MODULE= gitlab.com/gitlab-org/gitlab-elasticsearch-indexer MAKE_ENV= GOFLAGS="${GO_BUILDFLAGS}" # make sure to pass go build options into make process MAKE_ENV+= ${GO_ENV} -# for go dependencies -# Gitlab hosts there dependencies on their own platform and not on go-proxy -# so we download the required go.mod file from gitlab -# lines are taken from go.mk -# --------------------------- -FETCH_DEPENDS= ${GO_CMD}:${GO_PORT} -MASTER_SITES+= https://gitlab.com/gitlab-org/gitlab-elasticsearch-indexer/-/raw/v${DISTVERSION}/ -DISTFILES+= go.mod -DIST_SUBDIR= go/${PKGORIGIN:S,/,_,g}/${DISTNAME} -EXTRACT_ONLY+= ${DISTFILES:N*.mod\:*:N*.mod:C/:.*//} -_USES_fetch+= 800:go-post-fetch -go-post-fetch: - @${ECHO_MSG} "===> Fetching ${GO_MODNAME} dependencies"; - @(cd ${DISTDIR}/${DIST_SUBDIR}; \ - [ -e go.mod ] || ${RLN} ${GO_MODFILE} go.mod; \ - ${SETENV} ${GO_ENV} GOPROXY=${GO_GOPROXY} ${GO_CMD} mod download -x all) -# --------------------------- - PLIST_FILES= bin/${PORTNAME} # add a git tag, as that is required by the build script