aboutsummaryrefslogtreecommitdiff
path: root/net/keycloak/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'net/keycloak/Makefile')
-rw-r--r--net/keycloak/Makefile101
1 files changed, 19 insertions, 82 deletions
diff --git a/net/keycloak/Makefile b/net/keycloak/Makefile
index 17eaf7936492..247698e6a850 100644
--- a/net/keycloak/Makefile
+++ b/net/keycloak/Makefile
@@ -1,5 +1,5 @@
PORTNAME= keycloak
-PORTVERSION= 15.1.1
+PORTVERSION= 19.0.1
CATEGORIES= net java
MASTER_SITES= https://github.com/${PORTNAME}/${PORTNAME}/releases/download/${PORTVERSION}/
@@ -9,38 +9,24 @@ COMMENT= Identity and access management solution
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
-FLAVORS= default mysql postgres
-FLAVOR?= ${FLAVORS:[1]}
-mysql_PKGNAMESUFFIX= -mysql
-postgres_PKGNAMESUFFIX= -postgres
-
-.if ${FLAVOR:U} == mysql
-RUN_DEPENDS+= ${JAVAJARDIR}/mysql-connector-java.jar:databases/mysql-connector-java
-PLIST_SUB+= MYSQL=""
-.else
-PLIST_SUB+= MYSQL="@comment "
-.endif
-
-.if ${FLAVOR:U} == postgres
-RUN_DEPENDS+= ${JAVAJARDIR}/postgresql.jar:databases/postgresql-jdbc
-PLIST_SUB+= POSTGRES=""
-.else
-PLIST_SUB+= POSTGRES="@comment "
-.endif
-
-USES= cpe
+RUN_DEPENDS= bash>0:shells/bash
+
+USES= cpe shebangfix
+
CPE_VENDOR= redhat
+SHEBANG_FILES= bin/kc.sh \
+ bin/kcadm.sh \
+ bin/kcreg.sh
+
USE_JAVA= yes
-JAVA_VERSION= 1.8+
+JAVA_VERSION= 11+
JAVA_OS= native
JAVA_VENDOR= openjdk oracle
JAVA_RUN= yes
USE_RC_SUBR= keycloak
-CONFLICTS_INSTALL= keycloak keycloak-mysql keycloak-postgresql # bin/kcadm bin/kcreg
-
USER= www
GROUP= www
@@ -60,82 +46,33 @@ SUB_LIST+= GROUP=${GROUP} \
OPTIONS_DEFINE= DOCS EXAMPLES
-CONFIG_FILES= bin/.jbossclirc \
- bin/add-user.properties \
- bin/domain.conf \
- bin/jboss-cli-logging.properties \
- bin/jboss-cli.xml bin/product.conf \
- bin/standalone.conf \
- domain/configuration/application-roles.properties \
- domain/configuration/application-users.properties \
- domain/configuration/default-server-logging.properties \
- domain/configuration/domain.xml \
- domain/configuration/host-master.xml \
- domain/configuration/host-slave.xml \
- domain/configuration/host.xml \
- domain/configuration/logging.properties \
- domain/configuration/mgmt-groups.properties \
- domain/configuration/mgmt-users.properties \
- modules/layers.conf \
- standalone/configuration/application-roles.properties \
- standalone/configuration/application-users.properties \
- standalone/configuration/logging.properties \
- standalone/configuration/mgmt-groups.properties \
- standalone/configuration/mgmt-users.properties \
- standalone/configuration/standalone-ha.xml \
- standalone/configuration/standalone.xml
+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} -r ${WRKSRC}/modules/system/layers/base/org/apache/activemq/artemis/journal/main/lib/linux-i686
- ${RM} -r ${WRKSRC}/modules/system/layers/base/org/apache/activemq/artemis/journal/main/lib/linux-x86_64
- ${RM} -r ${WRKSRC}/modules/system/layers/base/org/wildfly/openssl/main/lib
+ ${RM} ${WRKSRC}/bin/kc.bat
+ ${RM} ${WRKSRC}/bin/kcadm.bat
+ ${RM} ${WRKSRC}/bin/kcreg.bat
do-install:
${MKDIR} ${STAGEDIR}${JAVASHAREDIR}/${PORTNAME}/bin
- ${MKDIR} ${STAGEDIR}${DOCSDIR}
- ${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
- ${MKDIR} ${STAGEDIR}${LOG_DIR}/domain
- ${MKDIR} ${STAGEDIR}${LOG_DIR}/standalone
+ ${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
-.for f in .jbossclirc.sample add-user.properties.sample domain.conf.sample jboss-cli-logging.properties.sample jboss-cli.xml.sample \
- launcher.jar migrate-domain-clustered.cli migrate-domain-standalone.cli migrate-standalone-ha.cli migrate-standalone.cli \
- product.conf.sample standalone.conf.sample wildfly-elytron-tool.jar
- ${INSTALL_DATA} ${WRKSRC}/bin/${f} ${STAGEDIR}${JAVASHAREDIR}/${PORTNAME}/bin
-.endfor
- ${INSTALL_DATA} ${WRKSRC}/jboss-modules.jar ${STAGEDIR}${JAVASHAREDIR}/${PORTNAME}
(cd ${WRKSRC}/bin && ${COPYTREE_SHARE} client ${STAGEDIR}${JAVASHAREDIR}/${PORTNAME}/bin)
# Install jar files, configuration and everything else
- (cd ${WRKSRC} && ${COPYTREE_SHARE} "domain modules standalone themes welcome-content" ${STAGEDIR}${JAVASHAREDIR}/${PORTNAME})
- (cd ${WRKSRC}/docs/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR})
-.for d in licenses-keycloak schema
- (cd ${WRKSRC}/docs/${d} && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}/${d})
-.endfor
+ (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
- # Create links for log directories
- ${LN} -sf ../../../../../..${LOG_DIR}/domain ${STAGEDIR}${JAVASHAREDIR}/${PORTNAME}/domain/log
- ${LN} -sf ../../../../../..${LOG_DIR}/standalone ${STAGEDIR}${JAVASHAREDIR}/${PORTNAME}/standalone/log
-
-.if ${FLAVOR:U} == mysql
- @${MKDIR} ${STAGEDIR}${JAVASHAREDIR}/${PORTNAME}/modules/system/layers/keycloak/com/mysql/main
- ${CP} ${FILESDIR}/mysql-module.xml ${STAGEDIR}${JAVASHAREDIR}/${PORTNAME}/modules/system/layers/keycloak/com/mysql/main/module.xml
- ${LN} -sf ${JAVAJARDIR}/mysql-connector-java.jar ${STAGEDIR}${JAVASHAREDIR}/${PORTNAME}/modules/system/layers/keycloak/com/mysql/main/mysql-connector-java.jar
-.endif
-
-.if ${FLAVOR:U} == postgres
- @${MKDIR} ${STAGEDIR}${JAVASHAREDIR}/${PORTNAME}/modules/system/layers/keycloak/org/postgresql/main
- ${CP} ${FILESDIR}/postgresql-module.xml ${STAGEDIR}${JAVASHAREDIR}/${PORTNAME}/modules/system/layers/keycloak/org/postgresql/main/module.xml
- ${LN} -sf ${JAVAJARDIR}/postgresql.jar ${STAGEDIR}${JAVASHAREDIR}/${PORTNAME}/modules/system/layers/keycloak/org/postgresql/main/postgresql.jar
-.endif
-
.include <bsd.port.mk>