Lines 1-137
Link Here
|
1 |
# Created by: Tom Judge <tj@FreeBSD.org> |
1 |
# Created by: Tom Judge <tj@FreeBSD.org> |
2 |
# $FreeBSD$ |
2 |
# $FreeBSD$ |
3 |
|
3 |
|
4 |
PORTNAME= elasticsearch |
4 |
PORTNAME= elasticsearch |
5 |
PORTVERSION= 7.8.1 |
5 |
PORTVERSION= 7.9.1 |
6 |
CATEGORIES= textproc java devel |
6 |
CATEGORIES= textproc java devel |
7 |
MASTER_SITES= https://artifacts.elastic.co/downloads/${PORTNAME}/ |
7 |
MASTER_SITES= https://artifacts.elastic.co/downloads/${PORTNAME}/ |
8 |
PKGNAMESUFFIX= 7 |
8 |
PKGNAMESUFFIX= 7 |
9 |
DISTNAME= ${PORTNAME}-${PORTVERSION}-no-jdk-linux-x86_64 |
9 |
DISTNAME= ${PORTNAME}-${PORTVERSION}-no-jdk-linux-x86_64 |
10 |
|
10 |
|
11 |
MAINTAINER= elastic@FreeBSD.org |
11 |
MAINTAINER= elastic@FreeBSD.org |
12 |
COMMENT= Full-text search engine for Java |
12 |
COMMENT= Full-text search engine for Java |
13 |
|
13 |
|
14 |
LICENSE= APACHE20 |
14 |
LICENSE= APACHE20 |
15 |
|
15 |
|
16 |
BUILD_DEPENDS= jna>0:devel/jna |
16 |
BUILD_DEPENDS= jna>0:devel/jna |
17 |
RUN_DEPENDS= bash>0:shells/bash \ |
17 |
RUN_DEPENDS= bash>0:shells/bash \ |
18 |
jna>0:devel/jna |
18 |
jna>0:devel/jna |
19 |
|
19 |
|
20 |
USES= cpe shebangfix |
20 |
USES= cpe shebangfix |
21 |
|
21 |
|
22 |
CONFLICTS= elasticsearch[56]-[0-9]* |
22 |
CONFLICTS= elasticsearch[56]-[0-9]* |
23 |
|
23 |
|
24 |
NO_ARCH= yes |
24 |
NO_ARCH= yes |
25 |
USE_JAVA= yes |
25 |
USE_JAVA= yes |
26 |
NO_BUILD= yes |
26 |
NO_BUILD= yes |
27 |
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} |
27 |
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} |
28 |
JAVA_VERSION= 8+ |
28 |
JAVA_VERSION= 8+ |
29 |
USE_RC_SUBR= ${PORTNAME} |
29 |
USE_RC_SUBR= ${PORTNAME} |
30 |
SHEBANG_FILES= bin/elasticsearch \ |
30 |
SHEBANG_FILES= bin/elasticsearch \ |
31 |
bin/elasticsearch-certgen \ |
31 |
bin/elasticsearch-certgen \ |
32 |
bin/elasticsearch-certutil \ |
32 |
bin/elasticsearch-certutil \ |
33 |
bin/elasticsearch-cli \ |
33 |
bin/elasticsearch-cli \ |
34 |
bin/elasticsearch-croneval \ |
34 |
bin/elasticsearch-croneval \ |
35 |
bin/elasticsearch-env \ |
35 |
bin/elasticsearch-env \ |
36 |
bin/elasticsearch-env-from-file \ |
36 |
bin/elasticsearch-env-from-file \ |
37 |
bin/elasticsearch-keystore \ |
37 |
bin/elasticsearch-keystore \ |
38 |
bin/elasticsearch-migrate \ |
38 |
bin/elasticsearch-migrate \ |
39 |
bin/elasticsearch-node \ |
39 |
bin/elasticsearch-node \ |
40 |
bin/elasticsearch-plugin \ |
40 |
bin/elasticsearch-plugin \ |
41 |
bin/elasticsearch-saml-metadata \ |
41 |
bin/elasticsearch-saml-metadata \ |
42 |
bin/elasticsearch-setup-passwords \ |
42 |
bin/elasticsearch-setup-passwords \ |
43 |
bin/elasticsearch-shard \ |
43 |
bin/elasticsearch-shard \ |
44 |
bin/elasticsearch-sql-cli \ |
44 |
bin/elasticsearch-sql-cli \ |
45 |
bin/elasticsearch-syskeygen \ |
45 |
bin/elasticsearch-syskeygen \ |
46 |
bin/elasticsearch-users \ |
46 |
bin/elasticsearch-users \ |
47 |
bin/x-pack-env \ |
47 |
bin/x-pack-env \ |
48 |
bin/x-pack-security-env \ |
48 |
bin/x-pack-security-env \ |
49 |
bin/x-pack-watcher-env |
49 |
bin/x-pack-watcher-env |
50 |
|
50 |
|
51 |
OPTIONS_DEFINE= DOCS |
51 |
OPTIONS_DEFINE= DOCS |
52 |
|
52 |
|
53 |
.include <bsd.port.options.mk> |
53 |
.include <bsd.port.options.mk> |
54 |
|
54 |
|
55 |
CONFIG_FILES= elasticsearch.yml \ |
55 |
CONFIG_FILES= elasticsearch.yml \ |
56 |
jvm.options \ |
56 |
jvm.options \ |
57 |
log4j2.properties \ |
57 |
log4j2.properties \ |
58 |
role_mapping.yml \ |
58 |
role_mapping.yml \ |
59 |
roles.yml |
59 |
roles.yml |
60 |
BINS= elasticsearch \ |
60 |
BINS= elasticsearch \ |
61 |
elasticsearch-certgen \ |
61 |
elasticsearch-certgen \ |
62 |
elasticsearch-certutil \ |
62 |
elasticsearch-certutil \ |
63 |
elasticsearch-cli \ |
63 |
elasticsearch-cli \ |
64 |
elasticsearch-croneval \ |
64 |
elasticsearch-croneval \ |
65 |
elasticsearch-env \ |
65 |
elasticsearch-env \ |
66 |
elasticsearch-env-from-file \ |
66 |
elasticsearch-env-from-file \ |
67 |
elasticsearch-keystore \ |
67 |
elasticsearch-keystore \ |
68 |
elasticsearch-migrate \ |
68 |
elasticsearch-migrate \ |
69 |
elasticsearch-node \ |
69 |
elasticsearch-node \ |
70 |
elasticsearch-plugin \ |
70 |
elasticsearch-plugin \ |
71 |
elasticsearch-saml-metadata \ |
71 |
elasticsearch-saml-metadata \ |
72 |
elasticsearch-setup-passwords \ |
72 |
elasticsearch-setup-passwords \ |
73 |
elasticsearch-shard \ |
73 |
elasticsearch-shard \ |
74 |
elasticsearch-sql-cli \ |
74 |
elasticsearch-sql-cli \ |
75 |
elasticsearch-sql-cli-${PORTVERSION}.jar \ |
75 |
elasticsearch-sql-cli-${PORTVERSION}.jar \ |
76 |
elasticsearch-syskeygen \ |
76 |
elasticsearch-syskeygen \ |
77 |
elasticsearch-users \ |
77 |
elasticsearch-users \ |
78 |
x-pack-env \ |
78 |
x-pack-env \ |
79 |
x-pack-security-env \ |
79 |
x-pack-security-env \ |
80 |
x-pack-watcher-env |
80 |
x-pack-watcher-env |
81 |
|
81 |
|
82 |
PORTDOCS= LICENSE.txt \ |
82 |
PORTDOCS= LICENSE.txt \ |
83 |
NOTICE.txt \ |
83 |
NOTICE.txt \ |
84 |
README.asciidoc |
84 |
README.asciidoc |
85 |
|
85 |
|
86 |
SIGAR_ARCH= ${ARCH:S|i386|x86|} |
86 |
SIGAR_ARCH= ${ARCH:S|i386|x86|} |
87 |
SEARCHUSER?= elasticsearch |
87 |
SEARCHUSER?= elasticsearch |
88 |
SEARCHGROUP?= ${SEARCHUSER} |
88 |
SEARCHGROUP?= ${SEARCHUSER} |
89 |
USERS= ${SEARCHUSER} |
89 |
USERS= ${SEARCHUSER} |
90 |
GROUPS= ${SEARCHGROUP} |
90 |
GROUPS= ${SEARCHGROUP} |
91 |
|
91 |
|
92 |
SUB_LIST= ETCDIR=${ETCDIR} JAVA_HOME=${JAVA_HOME} |
92 |
SUB_LIST= ETCDIR=${ETCDIR} JAVA_HOME=${JAVA_HOME} |
93 |
SUB_FILES= pkg-message |
93 |
SUB_FILES= pkg-message |
94 |
|
94 |
|
95 |
post-patch: |
95 |
post-patch: |
96 |
${RM} ${WRKSRC}/lib/jna-*.jar |
96 |
${RM} ${WRKSRC}/lib/jna-*.jar |
97 |
# ML plugin not supported on FreeBSD |
97 |
# ML plugin not supported on FreeBSD |
98 |
${RM} -rf ${WRKSRC}/modules/x-pack/x-pack-ml |
98 |
${RM} -rf ${WRKSRC}/modules/x-pack/x-pack-ml |
99 |
|
99 |
|
100 |
do-install: |
100 |
do-install: |
101 |
${MKDIR} ${STAGEDIR}${PREFIX}/etc/elasticsearch |
101 |
${MKDIR} ${STAGEDIR}${PREFIX}/etc/elasticsearch |
102 |
.for f in ${CONFIG_FILES} |
102 |
.for f in ${CONFIG_FILES} |
103 |
${INSTALL} ${WRKSRC}/config/${f} ${STAGEDIR}${ETCDIR}/${f}.sample |
103 |
${INSTALL} ${WRKSRC}/config/${f} ${STAGEDIR}${ETCDIR}/${f}.sample |
104 |
.endfor |
104 |
.endfor |
105 |
${MKDIR} ${STAGEDIR}${PREFIX}/lib/elasticsearch/bin |
105 |
${MKDIR} ${STAGEDIR}${PREFIX}/lib/elasticsearch/bin |
106 |
.for f in ${BINS} |
106 |
.for f in ${BINS} |
107 |
${INSTALL_SCRIPT} ${WRKSRC}/bin/${f} ${STAGEDIR}${PREFIX}/lib/elasticsearch/bin |
107 |
${INSTALL_SCRIPT} ${WRKSRC}/bin/${f} ${STAGEDIR}${PREFIX}/lib/elasticsearch/bin |
108 |
.endfor |
108 |
.endfor |
109 |
${MKDIR} ${STAGEDIR}${PREFIX}/lib/elasticsearch/lib |
109 |
${MKDIR} ${STAGEDIR}${PREFIX}/lib/elasticsearch/lib |
110 |
(cd ${WRKSRC}/lib && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/lib/elasticsearch/lib/ "-name *\.jar") |
110 |
(cd ${WRKSRC}/lib && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/lib/elasticsearch/lib/ "-name *\.jar") |
111 |
|
111 |
|
112 |
${MKDIR} ${STAGEDIR}${PREFIX}/lib/elasticsearch/modules |
112 |
${MKDIR} ${STAGEDIR}${PREFIX}/lib/elasticsearch/modules |
113 |
(cd ${WRKSRC}/modules && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/lib/elasticsearch/modules/) |
113 |
(cd ${WRKSRC}/modules && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/lib/elasticsearch/modules/) |
114 |
${MKDIR} ${STAGEDIR}${PREFIX}/lib/elasticsearch/plugins |
114 |
${MKDIR} ${STAGEDIR}${PREFIX}/lib/elasticsearch/plugins |
115 |
${MKDIR} ${STAGEDIR}${PREFIX}/libexec/elasticsearch |
115 |
${MKDIR} ${STAGEDIR}${PREFIX}/libexec/elasticsearch |
116 |
${INSTALL} -lrs ${STAGEDIR}${ETCDIR} ${STAGEDIR}${PREFIX}/lib/elasticsearch/config |
116 |
${INSTALL} -lrs ${STAGEDIR}${ETCDIR} ${STAGEDIR}${PREFIX}/lib/elasticsearch/config |
117 |
${LN} -s ${JAVASHAREDIR}/classes/jna.jar ${STAGEDIR}${PREFIX}/lib/elasticsearch/lib/jna.jar |
117 |
${LN} -s ${JAVASHAREDIR}/classes/jna.jar ${STAGEDIR}${PREFIX}/lib/elasticsearch/lib/jna.jar |
118 |
|
118 |
|
119 |
do-install-DOCS-on: |
119 |
do-install-DOCS-on: |
120 |
${MKDIR} ${STAGEDIR}${DOCSDIR} |
120 |
${MKDIR} ${STAGEDIR}${DOCSDIR} |
121 |
.for f in ${PORTDOCS} |
121 |
.for f in ${PORTDOCS} |
122 |
${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR} |
122 |
${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR} |
123 |
.endfor |
123 |
.endfor |
124 |
|
124 |
|
125 |
post-install: |
125 |
post-install: |
126 |
${ECHO} "@sample ${ETCDIR}/elasticsearch.yml.sample" >> ${TMPPLIST} |
126 |
${ECHO} "@sample ${ETCDIR}/elasticsearch.yml.sample" >> ${TMPPLIST} |
127 |
${ECHO} "@sample ${ETCDIR}/jvm.options.sample" >> ${TMPPLIST} |
127 |
${ECHO} "@sample ${ETCDIR}/jvm.options.sample" >> ${TMPPLIST} |
128 |
${ECHO} "@sample ${ETCDIR}/log4j2.properties.sample" >> ${TMPPLIST} |
128 |
${ECHO} "@sample ${ETCDIR}/log4j2.properties.sample" >> ${TMPPLIST} |
129 |
${ECHO} "@sample ${ETCDIR}/role_mapping.yml.sample" >> ${TMPPLIST} |
129 |
${ECHO} "@sample ${ETCDIR}/role_mapping.yml.sample" >> ${TMPPLIST} |
130 |
${ECHO} "@sample ${ETCDIR}/roles.yml.sample" >> ${TMPPLIST} |
130 |
${ECHO} "@sample ${ETCDIR}/roles.yml.sample" >> ${TMPPLIST} |
131 |
${FIND} -s ${STAGEDIR}${PREFIX}/lib/elasticsearch -not -type d | ${SORT} | \ |
131 |
${FIND} -s ${STAGEDIR}${PREFIX}/lib/elasticsearch -not -type d | ${SORT} | \ |
132 |
${SED} -e 's#^${STAGEDIR}${PREFIX}/##' >> ${TMPPLIST} |
132 |
${SED} -e 's#^${STAGEDIR}${PREFIX}/##' >> ${TMPPLIST} |
133 |
${ECHO} "@dir lib/elasticsearch/plugins" >> ${TMPPLIST} |
133 |
${ECHO} "@dir lib/elasticsearch/plugins" >> ${TMPPLIST} |
134 |
${ECHO} "@dir libexec/elasticsearch" >> ${TMPPLIST} |
134 |
${ECHO} "@dir libexec/elasticsearch" >> ${TMPPLIST} |
135 |
${ECHO} "@dir(elasticsearch,elasticsearch,0755) ${ETCDIR}" >> ${TMPPLIST} |
135 |
${ECHO} "@dir(elasticsearch,elasticsearch,0755) ${ETCDIR}" >> ${TMPPLIST} |
136 |
|
136 |
|
137 |
.include <bsd.port.mk> |
137 |
.include <bsd.port.mk> |