37 lines
1.0 KiB
Makefile
37 lines
1.0 KiB
Makefile
PORTNAME= cosign
|
|
DISTVERSIONPREFIX= v
|
|
DISTVERSION= 3.0.6
|
|
PORTREVISION= 1
|
|
CATEGORIES= security
|
|
|
|
MAINTAINER= bofh@FreeBSD.org
|
|
COMMENT= Signing OCI containers and other artifacts using Sigstore
|
|
WWW= https://www.sigstore.dev/
|
|
|
|
LICENSE= APACHE20
|
|
LICENSE_FILE= ${WRKSRC}/LICENSE
|
|
|
|
USES= cpe go:modules
|
|
CPE_VENDOR= sigstore
|
|
|
|
GO_MODULE= github.com/sigstore/cosign/v3
|
|
GO_TARGET= ./cmd/${PORTNAME}
|
|
GO_BUILDFLAGS= -ldflags="-buildid= \
|
|
-X sigs.k8s.io/release-utils/version.gitVersion=$(DISTVERSION) \
|
|
-X sigs.k8s.io/release-utils/version.gitCommit=$(GIT_HASH) \
|
|
-X sigs.k8s.io/release-utils/version.gitTreeState=clean \
|
|
-X sigs.k8s.io/release-utils/version.buildDate=${SOURCE_DATE_EPOCH:U${SOURCE_DATE_EPOCH_CMD:sh}}"
|
|
|
|
PLIST_FILES= bin/${PORTNAME}
|
|
|
|
GIT_HASH= f1ad3ee952313be5d74a49d67ba0aa8d0d5e351f
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
# Bring DISTINFO_FILE into scope so we can get the timestamp.
|
|
SOURCE_DATE_EPOCH_CMD= date -ur \
|
|
$$(${GREP} -m1 TIMESTAMP ${DISTINFO_FILE} | ${SED} -e 's/[^0-9]//g') \
|
|
'+%Y-%m-%dT%H:%M:%SZ'
|
|
|
|
.include <bsd.port.post.mk>
|