1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-18 00:10:04 +00:00
freebsd-ports/security/vault/Makefile
Ashish SHUKLA 79271d5381
all: Bump after lang/go122 update
PR:		281842
2024-11-08 20:58:46 +00:00

71 lines
1.9 KiB
Makefile

PORTNAME= vault
DISTVERSION= 1.18.0
DISTVERSIONPREFIX= v
PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= https://raw.githubusercontent.com/hashicorp/vault/${DISTVERSIONFULL}/ \
LOCAL/bofh/security/${PORTNAME}/:web_ui
DISTFILES= go.mod \
api/go.mod \
api/auth/approle/go.mod \
api/auth/kubernetes/go.mod \
api/auth/userpass/go.mod \
sdk/go.mod \
${PORTNAME}-web_ui-${DISTVERSION}${EXTRACT_SUFX}:web_ui
MAINTAINER= bofh@FreeBSD.org
COMMENT= Tool for securely accessing secrets
WWW= https://vaultproject.io/
LICENSE= MPL20
LICENSE_FILE= ${WRKSRC}/LICENSE
.if defined(MAINTAINER_MODE)
EXTRACT_DEPENDS=npm-node20>0:www/npm-node20 \
yarn-node20>0:www/yarn-node20
.endif
USES= cpe go:1.22,modules
CPE_VENDOR= hashicorp
USE_GITHUB= yes
GH_ACCOUNT= hashicorp
USE_RC_SUBR= vault
GO_MODULE= github.com/hashicorp/vault
GO_BUILDFLAGS= -ldflags="-s \
-X github.com/hashicorp/vault/version.GitCommit=${GITID} \
-X github.com/hashicorp/vault/version.BuildDate=${SOURCE_DATE_EPOCH:U${SOURCE_DATE_EPOCH_CMD:sh}} \
" -tags "vault ui"
SUB_FILES= pkg-message
USERS= vault
GROUPS= vault
PLIST_FILES= bin/${PORTNAME}
GITID= 4d0c53e84094b8017d32b6e5b7f8142035c8837f
.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'
post-patch:
${CP} -Rf ${WRKDIR}/web_ui ${WRKSRC}/http/
.if defined(MAINTAINER_MODE)
_make-web_ui: extract
cd ${WRKSRC}/ui && ${SETENV} ${MAKE_ENV} yarn
cd ${WRKSRC}/ui && ${SETENV} ${MAKE_ENV} npm rebuild node-sass
cd ${WRKSRC}/ui && ${SETENV} ${MAKE_ENV} yarn run build
cd ${WRKDIR} && ${TAR} -czf \
${PORTNAME}-web_ui-${DISTVERSION}${EXTRACT_SUFX} -C ${WRKSRC}/http web_ui
scp ${WRKDIR}/${PORTNAME}-web_ui-${DISTVERSION}${EXTRACT_SUFX} \
bofh@freefall.freebsd.org:public_distfiles/security/${PORTNAME}/
.endif
.include <bsd.port.post.mk>