aboutsummaryrefslogtreecommitdiff
path: root/devel/gum/Makefile
blob: 0efad259d9b45450e77f51eb005e4f870952dc72 (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
34
35
36
37
38
39
40
PORTNAME=	gum
DISTVERSIONPREFIX=	v
DISTVERSION=	0.12.0
CATEGORIES=	devel

MAINTAINER=	dave@bitboss.ca
COMMENT=	Tool for glamorous shell scripts
WWW=		https://github.com/charmbracelet/gum

LICENSE=	MIT
LICENSE_FILE=	${WRKSRC}/LICENSE

USES=		go:modules
GO_MODULE=	github.com/charmbracelet/gum

PLIST_FILES=	bin/gum \
		etc/bash_completion.d/gum.bash \
		share/fish/completions/gum.fish \
		share/man/man1/gum.1.gz \
		share/zsh/site-functions/_gum

post-build:
	${GO_WRKDIR_BIN}/${PORTNAME} man > ${WRKSRC}/${PORTNAME}.1
.for SHELL in bash fish zsh
	${GO_WRKDIR_BIN}/${PORTNAME} completion ${SHELL} > ${WRKSRC}/${SHELL}
.endfor

post-install:
	@${MKDIR} ${STAGEDIR}${PREFIX}/etc/bash_completion.d
	${INSTALL_DATA} ${WRKSRC}/bash \
		${STAGEDIR}${PREFIX}/etc/bash_completion.d/${PORTNAME}.bash
	@${MKDIR} ${STAGEDIR}${PREFIX}/share/fish/completions
	${INSTALL_DATA} ${WRKSRC}/fish \
		${STAGEDIR}${PREFIX}/share/fish/completions/${PORTNAME}.fish
	@${MKDIR} ${STAGEDIR}${PREFIX}/share/zsh/site-functions
	${INSTALL_DATA} ${WRKSRC}/zsh \
		${STAGEDIR}${PREFIX}/share/zsh/site-functions/_${PORTNAME}
	${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 ${STAGEDIR}${PREFIX}/share/man/man1

.include <bsd.port.mk>