PORTNAME= nerdctl DISTVERSIONPREFIX= v DISTVERSION= 2.2.2 PORTREVISION= 1 CATEGORIES= sysutils DISTFILES+= go.mod MAINTAINER= laurent@FreeBSD.org COMMENT= Docker-compatible CLI for containerd WWW= https://github.com/containerd/nerdctl LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE USES= go:modules USE_GITHUB= yes GH_ACCOUNT= containerd GO_MODULE= github.com/containerd/nerdctl/v2 GO_TARGET= ./cmd/${PORTNAME} GO_BUILDFLAGS= -ldflags "-s -w -X ${GO_MODULE}/pkg/version.Version=${DISTVERSIONFULL}" GO_TESTTARGET= ./pkg/... PLIST_FILES= bin/containerd-rootless-setuptool.sh \ bin/containerd-rootless.sh \ bin/nerdctl \ etc/bash_completion.d/${PORTNAME} \ share/fish/vendor_completions.d/${PORTNAME}.fish \ share/zsh/site-functions/_${PORTNAME} PORTDOCS= * OPTIONS_DEFINE= DOCS pre-fetch: @${MKDIR} ${DISTDIR}/${DIST_SUBDIR} [ -e ${DISTDIR}/${DIST_SUBDIR}/go.mod ] || \ (${FETCH_CMD} ${FETCH_BEFORE_ARGS} \ https://raw.githubusercontent.com/containerd/nerdctl/v${DISTVERSION}/go.mod \ -o ${DISTDIR}/${DIST_SUBDIR}/go.mod; \ ${REINPLACE_CMD} '/tigron/d' ${DISTDIR}/${DIST_SUBDIR}/go.mod) post-install: ${INSTALL_SCRIPT} ${WRKSRC}/extras/rootless/* ${STAGEDIR}${PREFIX}/bin @${MKDIR} ${STAGEDIR}${PREFIX}/etc/bash_completion.d \ ${STAGEDIR}${PREFIX}/share/fish/vendor_completions.d \ ${STAGEDIR}${PREFIX}/share/zsh/site-functions \ ${WRKDIR}/tmp ${STAGEDIR}${PREFIX}/bin/${PORTNAME} --data-root=${WRKDIR}/tmp completion bash \ > ${STAGEDIR}${PREFIX}/etc/bash_completion.d/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME} --data-root=${WRKDIR}/tmp completion fish \ > ${STAGEDIR}${PREFIX}/share/fish/vendor_completions.d/${PORTNAME}.fish ${STAGEDIR}${PREFIX}/bin/${PORTNAME} --data-root=${WRKDIR}/tmp completion zsh \ > ${STAGEDIR}${PREFIX}/share/zsh/site-functions/_${PORTNAME} post-install-DOCS-on: (cd ${WRKSRC} && ${COPYTREE_SHARE} "README.md docs" ${STAGEDIR}${DOCSDIR}) .include