aboutsummaryrefslogtreecommitdiff
path: root/textproc/git-chglog/Makefile
blob: 60b721d9bcdda693db4158367df06e9d5f755367 (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
41
42
43
44
45
PORTNAME=	git-chglog
DISTVERSIONPREFIX=	v
DISTVERSION=	0.15.1
PORTREVISION=	11
CATEGORIES=	textproc

MAINTAINER=	lcook@FreeBSD.org
COMMENT=	CHANGELOG generator implemented in Go
WWW=		https://github.com/git-chglog/git-chglog

LICENSE=	MIT
LICENSE_FILE=	${WRKSRC}/LICENSE

RUN_DEPENDS=	git:devel/git

USES=		go:modules

_BUILD_VERSION=	${DISTVERSIONFULL}

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

PLIST_FILES=	bin/${PORTNAME}
PORTDOCS=	CHANGELOG.md CONTRIBUTING.md README.md
_EXAMPLES=	.chglog/CHANGELOG.tpl.md .chglog/config.yml
PORTEXAMPLES=	${_EXAMPLES:T}

OPTIONS_DEFINE=	DOCS EXAMPLES
EXAMPLES_DESC=	Install example template format and configuration

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

post-install-EXAMPLES-on:
	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
	cd ${WRKSRC} && \
		${INSTALL_DATA} ${_EXAMPLES} \
		${STAGEDIR}${EXAMPLESDIR}

.include <bsd.port.mk>