aboutsummaryrefslogtreecommitdiff
path: root/devel/goreleaser/Makefile
blob: 26debdfd27df9477cd36edf043b24577483e8091 (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=	goreleaser
DISTVERSIONPREFIX=	v
DISTVERSION=	1.26.1
PORTREVISION=	1
CATEGORIES=	devel

MAINTAINER=	fuz@FreeBSD.org
COMMENT=	Deliver Go binaries as fast and easily as possible
WWW=		https://goreleaser.com/

LICENSE=	MIT
LICENSE_FILE=	${WRKSRC}/LICENSE.md

USES=		go:1.21,modules
GO_MODULE=	github.com/goreleaser/goreleaser
GO_BUILDFLAGS=	-ldflags="-X main.version=${PKGVERSION} -X 'main.builtBy=FreeBSD ports' ${STRIP}"

# TODO: generate documentation
PLIST_FILES=	bin/goreleaser \
		etc/bash_completion.d/goreleaser \
		share/fish/vendor_completions.d/goreleaser.fish \
		share/man/man1/goreleaser.1.gz \
		share/zsh/site-functions/_goreleaser

post-install:
	@${ECHO_MSG} '====> Installing man page'
	${GO_WRKDIR_BIN}/goreleaser man >${WRKDIR}/goreleaser.1
	${INSTALL_MAN} ${WRKDIR}/goreleaser.1 ${STAGEDIR}${PREFIX}/share/man/man1/goreleaser.1
	@${ECHO_MSG} '====> Installing shell completion files'
	${MKDIR} ${STAGEDIR}${PREFIX}/etc/bash_completion.d
	${GO_WRKDIR_BIN}/goreleaser completion bash \
	    >${STAGEDIR}${PREFIX}/etc/bash_completion.d/goreleaser
	${MKDIR} ${STAGEDIR}${PREFIX}/share/fish/vendor_completions.d
	${GO_WRKDIR_BIN}/goreleaser completion fish \
	    >${STAGEDIR}${PREFIX}/share/fish/vendor_completions.d/goreleaser.fish
	${MKDIR} ${STAGEDIR}${PREFIX}/share/zsh/site-functions
	${GO_WRKDIR_BIN}/goreleaser completion zsh \
	    >${STAGEDIR}${PREFIX}/share/zsh/site-functions/_goreleaser

.include <bsd.port.mk>