41 lines
1.0 KiB
Makefile
41 lines
1.0 KiB
Makefile
PORTNAME= trivy
|
|
DISTVERSIONPREFIX= v
|
|
DISTVERSION= 0.68.2
|
|
CATEGORIES= security
|
|
|
|
MAINTAINER= mfechner@FreeBSD.org
|
|
COMMENT= Security scanner written in go
|
|
WWW= https://github.com/aquasecurity/trivy
|
|
|
|
LICENSE= APACHE20
|
|
LICENSE_FILE= ${WRKSRC}/LICENSE
|
|
|
|
BROKEN_i386= not supported, see https://github.com/aquasecurity/trivy/pull/9102
|
|
|
|
USES= go:modules
|
|
|
|
USE_GITHUB= yes
|
|
GH_ACCOUNT= aquasecurity
|
|
GH_PROJECT= trivy
|
|
GO_MOD_DIST= github
|
|
GO_MODULE= github.com/aquasecurity/trivy
|
|
GO_TARGET= ./cmd/trivy
|
|
GO_BUILDFLAGS= -ldflags=" \
|
|
-extldflags '-static' \
|
|
-X github.com/aquasecurity/trivy/pkg/version.ver=${DISTVERSION} \
|
|
-s -w"
|
|
MAKE_ENV= GOEXPERIMENT=jsonv2
|
|
|
|
PLIST_FILES= bin/${PORTNAME}
|
|
|
|
post-install:
|
|
@${MKDIR} ${STAGEDIR}${DATADIR}
|
|
${INSTALL_DATA} ${WRKSRC}/contrib/*.tpl ${STAGEDIR}${DATADIR}/
|
|
${FIND} -s ${STAGEDIR}${DATADIR} -not -type d | ${SORT} | \
|
|
${SED} -e 's#^${STAGEDIR}${PREFIX}/##' | \
|
|
${SED} -E -e '/sample$$/ s#^#@sample #; \
|
|
s#${DATADIR_REL}/bin#@(,,555) ${DATADIR_REL}/bin#; ' >> ${TMPPLIST}
|
|
cat ${TMPPLIST}
|
|
|
|
.include <bsd.port.mk>
|