1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-20 08:27:15 +00:00
freebsd-ports/net/keycloak/Makefile
Tobias Bölz 5851a3258e net/keycloak: Remove bash as runtime dependency
Keycloak no longer requires bash see:
https://github.com/keycloak/keycloak/pull/21124

PR:		281108
Approved by:	Matthias Wolf <freebsd@rheinwolf.de> (maintainer)
2024-08-30 11:55:12 +03:00

88 lines
2.1 KiB
Makefile

PORTNAME= keycloak
DISTVERSION= 25.0.4
PORTREVISION= 1
CATEGORIES= net java
MASTER_SITES= https://github.com/${PORTNAME}/${PORTNAME}/releases/download/${PORTVERSION}/
MAINTAINER= freebsd@rheinwolf.de
COMMENT= Identity and access management solution
WWW= https://www.keycloak.org/
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
USES= cpe shebangfix
CPE_VENDOR= redhat
USE_JAVA= yes
JAVA_VERSION= 21+
JAVA_OS= native
JAVA_VENDOR= openjdk
JAVA_RUN= yes
USE_RC_SUBR= keycloak
SHEBANG_FILES= bin/kc.sh \
bin/kcadm.sh \
bin/kcreg.sh
VAR_DIR?= /var
LOG_DIR?= ${VAR_DIR}/log/${PORTNAME}
RUN_DIR?= ${VAR_DIR}/run/${PORTNAME}
NO_ARCH= yes
NO_BUILD= yes
SUB_FILES+= pkg-message
SUB_LIST+= GROUP=${KEYCLOAK_GROUP} \
JAVA=${JAVA} \
JAVA_HOME=${JAVA_HOME} \
LOG_DIR=${LOG_DIR} \
PORTNAME=${PORTNAME} \
RUN_DIR=${RUN_DIR} \
USER=${KEYCLOAK_USER} \
GROUP=${KEYCLOAK_GROUP}
KEYCLOAK_USER= ${PORTNAME}
KEYCLOAK_GROUP= ${PORTNAME}
USERS= ${KEYCLOAK_USER}
GROUPS= ${USERS}
PLIST_SUB= VERSION=${DISTVERSION} \
USER=${KEYCLOAK_USER} \
GROUP=${KEYCLOAK_GROUP}
OPTIONS_DEFINE= DOCS EXAMPLES
CONFIG_FILES= conf/cache-ispn.xml \
conf/keycloak.conf \
lib/quarkus/build-system.properties
post-patch:
.for f in ${CONFIG_FILES}
${MV} ${WRKSRC}/${f} ${WRKSRC}/${f}.sample
.endfor
${RM} ${WRKSRC}/bin/kc.bat
${RM} ${WRKSRC}/bin/kcadm.bat
${RM} ${WRKSRC}/bin/kcreg.bat
do-install:
${MKDIR} ${STAGEDIR}${JAVASHAREDIR}/${PORTNAME}/bin
${MKDIR} ${STAGEDIR}${JAVASHAREDIR}/${PORTNAME}/data
${MKDIR} ${STAGEDIR}${LOG_DIR}
${MKDIR} ${STAGEDIR}${RUN_DIR}
# Install files in bin
${INSTALL_SCRIPT} ${WRKSRC}/bin/*.sh ${STAGEDIR}${JAVASHAREDIR}/${PORTNAME}/bin
(cd ${WRKSRC}/bin && ${COPYTREE_SHARE} client ${STAGEDIR}${JAVASHAREDIR}/${PORTNAME}/bin)
# Install jar files, configuration and everything else
(cd ${WRKSRC} && ${COPYTREE_SHARE} "conf lib providers themes" ${STAGEDIR}${JAVASHAREDIR}/${PORTNAME})
# Create links for kc* binaries
${LN} -sf ../share/java/${PORTNAME}/bin/kcadm.sh ${STAGEDIR}${PREFIX}/bin/kcadm
${LN} -sf ../share/java/${PORTNAME}/bin/kcreg.sh ${STAGEDIR}${PREFIX}/bin/kcreg
.include <bsd.port.mk>