aboutsummaryrefslogtreecommitdiff
path: root/security/go-cve-dictionary/Makefile
blob: f7f2e09ec96eff378129d7196c6ebd9d8e005ae7 (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
PORTNAME=	go-cve-dictionary
DISTVERSIONPREFIX=v
DISTVERSION=	0.10.1
PORTREVISION=	3
CATEGORIES=	security

MAINTAINER=	girgen@FreeBSD.org
COMMENT=	Build local copies of vulnerabilities from NVD and JVN
WWW=		https://github.com/vulsio/go-cve-dictionary/

LICENSE=	APACHE20

RUN_DEPENDS=	ca_root_nss>=0:security/ca_root_nss

USES=		go:modules

GO_MODULE=	github.com/vulsio/go-cve-dictionary

USE_RC_SUBR=	${PORTNAME}

GO_BUILDFLAGS=	-ldflags "-X main.version=${PORTVERSION}"

SUB_FILES=	pkg-message periodic-go-cve-dictionary
SUB_LIST=	PORTNAME=${PORTNAME} USERS=${USERS} GROUPS=${GROUPS}

USERS=		vuls
GROUPS=		vuls

post-patch:
	${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},g' ${WRKSRC}/commands/root.go

post-install:
	${MKDIR} ${STAGEDIR}/var/db/vuls \
		${STAGEDIR}/var/log/vuls \
		${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d \
		${STAGEDIR}${PREFIX}/etc/periodic/daily
	${INSTALL_DATA} ${FILESDIR}/newsyslog-${PORTNAME}.conf \
		${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d/${PORTNAME}.conf.sample
	${INSTALL_DATA} ${FILESDIR}/${PORTNAME}.yaml \
		${STAGEDIR}${PREFIX}/etc/${PORTNAME}.yaml.sample
	${INSTALL_SCRIPT} ${WRKDIR}/periodic-${PORTNAME} \
		${STAGEDIR}${PREFIX}/etc/periodic/daily/${PORTNAME}

.include <bsd.port.mk>