1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-31 05:41:08 +00:00

security/gsa: Fix build

- Move from yarn to npm
PR:		274276
Reported by:	Trond Endrestøl <Trond.Endrestol _at_ ximalas.info>
This commit is contained in:
Jose Alonso Cardenas Marquez 2023-10-20 02:05:11 -05:00
parent df52863e87
commit 3d5bec0e07
No known key found for this signature in database
GPG Key ID: 335B9246BA5E30F4
2 changed files with 15 additions and 17 deletions

View File

@ -1,7 +1,7 @@
PORTNAME= gsa
DISTVERSIONPREFIX= v
DISTVERSION= 22.7.1
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= security
MAINTAINER= acm@FreeBSD.org
@ -10,7 +10,7 @@ WWW= https://github.com/greenbone/gsa
LICENSE= AGPLv3+
BUILD_DEPENDS= yarn:www/yarn
BUILD_DEPENDS= npm-node18>0:www/npm-node18
RUN_DEPENDS= ${LOCALBASE}/sbin/gsad:security/gsad
USES= nodejs:build
@ -19,7 +19,7 @@ USE_GITHUB= yes
GH_ACCOUNT= greenbone
GH_PROJECT= gsa
YARN_BIN= ${LOCALBASE}/bin/yarn
NPM_BIN= ${LOCALBASE}/bin/npm
# to rebuild the deps archive:
# 1. set DEV_UPDATE_MODE=yes
@ -29,27 +29,25 @@ YARN_BIN= ${LOCALBASE}/bin/yarn
# 5. make clean makesum
DEV_UPDATE_MODE= no
DEPS_CACHE_DIR= ${WRKDIR}
DEPS_CACHE_DIR= ${WRKSRC}
.if (${DEV_UPDATE_MODE} == "yes")
NPM_ARGS= install
post-build:
@cd ${DEPS_CACHE_DIR} && ${TAR} czf ${DISTDIR}/${DIST_SUBDIR}/${PORTNAME}-cache-${DISTVERSION}${EXTRACT_SUFX} yarn-offline-cache
@cd ${DEPS_CACHE_DIR} && ${TAR} czf ${DISTDIR}/${DIST_SUBDIR}/${PORTNAME}-cache-${DISTVERSION}${EXTRACT_SUFX} node_modules
@${ECHO} "(!!!) Please upload the cache archive: ${DISTDIR}/${DIST_SUBDIR}/${PORTNAME}-cache-${DISTVERSION}${EXTRACT_SUFX}"
.else
MASTER_SITES+= LOCAL/acm/gsa/:yarn_cache
DISTFILES+= ${PORTNAME}-cache-${DISTVERSION}${EXTRACT_SUFX}:yarn_cache
YARN_ARGS= --offline
MASTER_SITES+= LOCAL/acm/gsa/:npm_cache
DISTFILES+= ${PORTNAME}-cache-${DISTVERSION}${EXTRACT_SUFX}:npm_cache
NPM_ARGS= run build
.endif
post-patch:
${ECHO_CMD} 'yarn-offline-mirror "${WRKDIR}/yarn-offline-cache"' >> \
${WRKSRC}/.yarnrc
post-extract:
@${MV} ${WRKDIR}/node_modules ${WRKSRC}
do-build:
@cd ${WRKSRC} && \
${YARN_BIN} ${YARN_ARGS}
@cd ${WRKSRC} && \
${YARN_BIN} ${YARN_ARGS} build
${NPM_BIN} ${NPM_ARGS}
do-install:
@${MKDIR} ${STAGEDIR}${PREFIX}/share/gvm/gsad/web

View File

@ -1,5 +1,5 @@
TIMESTAMP = 1696526628
SHA256 (gsa-cache-22.7.1.tar.gz) = 56c1a1c900c2b45d711a1f31588fb98a90979b0866c68ec391795d0e9a2bc6fc
SIZE (gsa-cache-22.7.1.tar.gz) = 48729903
TIMESTAMP = 1697784180
SHA256 (gsa-cache-22.7.1.tar.gz) = cdb0a815e3069eb24f43012ad16a51a9d171a35b04ddae7da769f09651f6d4ed
SIZE (gsa-cache-22.7.1.tar.gz) = 67963784
SHA256 (greenbone-gsa-v22.7.1_GH0.tar.gz) = 89c159db61df19fe21713fa02c0454e730653673e7ef9b4dc30485666a631a05
SIZE (greenbone-gsa-v22.7.1_GH0.tar.gz) = 3607415