blob: 247698e6a850c894d2f98bcf8f21c92ca69414c3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
PORTNAME= keycloak
PORTVERSION= 19.0.1
CATEGORIES= net java
MASTER_SITES= https://github.com/${PORTNAME}/${PORTNAME}/releases/download/${PORTVERSION}/
MAINTAINER= freebsd@rheinwolf.de
COMMENT= Identity and access management solution
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
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= 11+
JAVA_OS= native
JAVA_VENDOR= openjdk oracle
JAVA_RUN= yes
USE_RC_SUBR= keycloak
USER= www
GROUP= www
VAR_DIR?= /var
LOG_DIR?= ${VAR_DIR}/log/${PORTNAME}
RUN_DIR?= ${VAR_DIR}/run/${PORTNAME}
NO_ARCH= yes
NO_BUILD= yes
SUB_LIST+= GROUP=${GROUP} \
LOG_DIR=${LOG_DIR} \
JAVA=${JAVA} \
PORTNAME=${PORTNAME} \
RUN_DIR=${RUN_DIR} \
USER=${USER}
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>
|