aboutsummaryrefslogtreecommitdiff
path: root/devel/glab/Makefile
blob: 8b4c1d3d4b183bdcd642eb41c9997ee4b2fd412e (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
PORTNAME=	glab
DISTVERSIONPREFIX=	v
DISTVERSION=	1.22.0
PORTREVISION=	8
CATEGORIES=	devel

MAINTAINER=	lcook@FreeBSD.org
COMMENT=	Open-source GitLab command line tool
WWW=		https://glab.readthedocs.io/

LICENSE=	MIT
LICENSE_FILE=	${WRKSRC}/LICENSE

RUN_DEPENDS=	git:devel/git

USES=		go:modules

_BUILD_VERSION=	${DISTVERSION}
_BUILD_DATE=	$$(date +%d/%m/%Y)

GO_MODULE=	github.com/profclems/${PORTNAME}
GO_TARGET=	./cmd/${PORTNAME}
GO_BUILDFLAGS=	-ldflags "\
		-s -w \
		-X main.version=${_BUILD_VERSION} \
		-X main.build=${_BUILD_DATE}"

PLIST_FILES=	bin/${PORTNAME}
PORTDOCS=	README.md SECURITY.md

OPTIONS_DEFINE=	DOCS

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

.include <bsd.port.mk>