aboutsummaryrefslogtreecommitdiff
path: root/shells/carapace/Makefile
blob: 8cb4a6e1230b1fcc835a489352076058d22ba10c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
PORTNAME=	carapace
DISTVERSIONPREFIX=	v
DISTVERSION=	1.0.5
PORTREVISION=	1
CATEGORIES=	shells

MAINTAINER=	tagattie@FreeBSD.org
COMMENT=	Multi-shell multi-command argument completer
WWW=		https://carapace.sh/

LICENSE=	MIT
LICENSE_FILE=	${WRKSRC}/LICENSE

USES=		go:modules,1.21

GO_MODULE=	github.com/carapace-sh/carapace-bin
GO_TARGET=	./cmd/carapace
GO_BUILDFLAGS=	-ldflags "-s -w -X main.version=${DISTVERSION}"

PLIST_FILES=	bin/carapace
PORTDOCS=	README.md

OPTIONS_DEFINE=	DOCS

pre-build:
	cd ${GO_WRKSRC} && \
		${SETENV} ${MAKE_ENV} ${GO_ENV} ${GO_CMD} generate ./cmd/...

post-install-DOCS-on:
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
	${INSTALL_MAN} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}

.include <bsd.port.mk>