diff --git a/security/trivy/Makefile b/security/trivy/Makefile index 44282f9226e1..862dba088fd4 100644 --- a/security/trivy/Makefile +++ b/security/trivy/Makefile @@ -1,26 +1,35 @@ PORTNAME= trivy DISTVERSION= 0.49.1 +PORTREVISION= 1 DISTVERSIONPREFIX= v CATEGORIES= security MAINTAINER= mfechner@FreeBSD.org COMMENT= Security scanner written in go WWW= https://github.com/aquasecurity/trivy LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE USES= go:modules,1.21 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" 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