Lines 1-134
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= 6.8.11 |
5 |
PORTVERSION= 6.8.12 |
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 |
https://ftp.sk.freebsd.org/pub/local/distfiles/ |
8 |
https://ftp.sk.freebsd.org/pub/local/distfiles/ |
9 |
PKGNAMESUFFIX= 6 |
9 |
PKGNAMESUFFIX= 6 |
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-[0-9]* elasticsearch2* elasticsearch5* elasticsearch7* |
22 |
CONFLICTS= elasticsearch-[0-9]* elasticsearch2* elasticsearch5* elasticsearch7* |
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 |
JAVA_VERSION= 8+ |
27 |
JAVA_VERSION= 8+ |
28 |
USE_RC_SUBR= ${PORTNAME} |
28 |
USE_RC_SUBR= ${PORTNAME} |
29 |
SHEBANG_FILES= bin/elasticsearch \ |
29 |
SHEBANG_FILES= bin/elasticsearch \ |
30 |
bin/elasticsearch-certgen \ |
30 |
bin/elasticsearch-certgen \ |
31 |
bin/elasticsearch-certutil \ |
31 |
bin/elasticsearch-certutil \ |
32 |
bin/elasticsearch-cli \ |
32 |
bin/elasticsearch-cli \ |
33 |
bin/elasticsearch-croneval \ |
33 |
bin/elasticsearch-croneval \ |
34 |
bin/elasticsearch-env \ |
34 |
bin/elasticsearch-env \ |
35 |
bin/elasticsearch-keystore \ |
35 |
bin/elasticsearch-keystore \ |
36 |
bin/elasticsearch-migrate \ |
36 |
bin/elasticsearch-migrate \ |
37 |
bin/elasticsearch-plugin \ |
37 |
bin/elasticsearch-plugin \ |
38 |
bin/elasticsearch-saml-metadata \ |
38 |
bin/elasticsearch-saml-metadata \ |
39 |
bin/elasticsearch-setup-passwords \ |
39 |
bin/elasticsearch-setup-passwords \ |
40 |
bin/elasticsearch-shard \ |
40 |
bin/elasticsearch-shard \ |
41 |
bin/elasticsearch-sql-cli \ |
41 |
bin/elasticsearch-sql-cli \ |
42 |
bin/elasticsearch-syskeygen \ |
42 |
bin/elasticsearch-syskeygen \ |
43 |
bin/elasticsearch-translog \ |
43 |
bin/elasticsearch-translog \ |
44 |
bin/elasticsearch-users \ |
44 |
bin/elasticsearch-users \ |
45 |
bin/x-pack-env \ |
45 |
bin/x-pack-env \ |
46 |
bin/x-pack-security-env \ |
46 |
bin/x-pack-security-env \ |
47 |
bin/x-pack-watcher-env |
47 |
bin/x-pack-watcher-env |
48 |
|
48 |
|
49 |
OPTIONS_DEFINE= DOCS |
49 |
OPTIONS_DEFINE= DOCS |
50 |
|
50 |
|
51 |
.include <bsd.port.options.mk> |
51 |
.include <bsd.port.options.mk> |
52 |
|
52 |
|
53 |
CONFIG_FILES= elasticsearch.yml \ |
53 |
CONFIG_FILES= elasticsearch.yml \ |
54 |
jvm.options \ |
54 |
jvm.options \ |
55 |
log4j2.properties \ |
55 |
log4j2.properties \ |
56 |
role_mapping.yml \ |
56 |
role_mapping.yml \ |
57 |
roles.yml |
57 |
roles.yml |
58 |
BINS= elasticsearch \ |
58 |
BINS= elasticsearch \ |
59 |
elasticsearch-certgen \ |
59 |
elasticsearch-certgen \ |
60 |
elasticsearch-certutil \ |
60 |
elasticsearch-certutil \ |
61 |
elasticsearch-cli \ |
61 |
elasticsearch-cli \ |
62 |
elasticsearch-croneval \ |
62 |
elasticsearch-croneval \ |
63 |
elasticsearch-env \ |
63 |
elasticsearch-env \ |
64 |
elasticsearch-keystore \ |
64 |
elasticsearch-keystore \ |
65 |
elasticsearch-migrate \ |
65 |
elasticsearch-migrate \ |
66 |
elasticsearch-plugin \ |
66 |
elasticsearch-plugin \ |
67 |
elasticsearch-saml-metadata \ |
67 |
elasticsearch-saml-metadata \ |
68 |
elasticsearch-setup-passwords \ |
68 |
elasticsearch-setup-passwords \ |
69 |
elasticsearch-shard \ |
69 |
elasticsearch-shard \ |
70 |
elasticsearch-sql-cli \ |
70 |
elasticsearch-sql-cli \ |
71 |
elasticsearch-sql-cli-${PORTVERSION}.jar \ |
71 |
elasticsearch-sql-cli-${PORTVERSION}.jar \ |
72 |
elasticsearch-syskeygen \ |
72 |
elasticsearch-syskeygen \ |
73 |
elasticsearch-translog \ |
73 |
elasticsearch-translog \ |
74 |
elasticsearch-users \ |
74 |
elasticsearch-users \ |
75 |
x-pack-env \ |
75 |
x-pack-env \ |
76 |
x-pack-security-env \ |
76 |
x-pack-security-env \ |
77 |
x-pack-watcher-env |
77 |
x-pack-watcher-env |
78 |
|
78 |
|
79 |
PORTDOCS= LICENSE.txt \ |
79 |
PORTDOCS= LICENSE.txt \ |
80 |
NOTICE.txt \ |
80 |
NOTICE.txt \ |
81 |
README.textile |
81 |
README.textile |
82 |
|
82 |
|
83 |
SIGAR_ARCH= ${ARCH:S|i386|x86|} |
83 |
SIGAR_ARCH= ${ARCH:S|i386|x86|} |
84 |
SEARCHUSER?= elasticsearch |
84 |
SEARCHUSER?= elasticsearch |
85 |
SEARCHGROUP?= ${SEARCHUSER} |
85 |
SEARCHGROUP?= ${SEARCHUSER} |
86 |
USERS= ${SEARCHUSER} |
86 |
USERS= ${SEARCHUSER} |
87 |
GROUPS= ${SEARCHGROUP} |
87 |
GROUPS= ${SEARCHGROUP} |
88 |
|
88 |
|
89 |
SUB_LIST= ETCDIR=${ETCDIR} JAVA_HOME=${JAVA_HOME} |
89 |
SUB_LIST= ETCDIR=${ETCDIR} JAVA_HOME=${JAVA_HOME} |
90 |
SUB_FILES= pkg-message |
90 |
SUB_FILES= pkg-message |
91 |
|
91 |
|
92 |
post-patch: |
92 |
post-patch: |
93 |
${RM} ${WRKSRC}/lib/jna-*.jar |
93 |
${RM} ${WRKSRC}/lib/jna-*.jar |
94 |
# ML plugin not supported on FreeBSD |
94 |
# ML plugin not supported on FreeBSD |
95 |
${RM} -rf ${WRKSRC}/modules/x-pack-ml |
95 |
${RM} -rf ${WRKSRC}/modules/x-pack-ml |
96 |
|
96 |
|
97 |
do-install: |
97 |
do-install: |
98 |
${MKDIR} ${STAGEDIR}${PREFIX}/etc/elasticsearch |
98 |
${MKDIR} ${STAGEDIR}${PREFIX}/etc/elasticsearch |
99 |
.for f in ${CONFIG_FILES} |
99 |
.for f in ${CONFIG_FILES} |
100 |
${INSTALL} ${WRKSRC}/config/${f} ${STAGEDIR}${ETCDIR}/${f}.sample |
100 |
${INSTALL} ${WRKSRC}/config/${f} ${STAGEDIR}${ETCDIR}/${f}.sample |
101 |
.endfor |
101 |
.endfor |
102 |
${MKDIR} ${STAGEDIR}${PREFIX}/lib/elasticsearch/bin |
102 |
${MKDIR} ${STAGEDIR}${PREFIX}/lib/elasticsearch/bin |
103 |
.for f in ${BINS} |
103 |
.for f in ${BINS} |
104 |
${INSTALL_SCRIPT} ${WRKSRC}/bin/${f} ${STAGEDIR}${PREFIX}/lib/elasticsearch/bin |
104 |
${INSTALL_SCRIPT} ${WRKSRC}/bin/${f} ${STAGEDIR}${PREFIX}/lib/elasticsearch/bin |
105 |
.endfor |
105 |
.endfor |
106 |
${MKDIR} ${STAGEDIR}${PREFIX}/lib/elasticsearch/lib |
106 |
${MKDIR} ${STAGEDIR}${PREFIX}/lib/elasticsearch/lib |
107 |
(cd ${WRKSRC}/lib && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/lib/elasticsearch/lib/ "-name *\.jar") |
107 |
(cd ${WRKSRC}/lib && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/lib/elasticsearch/lib/ "-name *\.jar") |
108 |
|
108 |
|
109 |
${MKDIR} ${STAGEDIR}${PREFIX}/lib/elasticsearch/modules |
109 |
${MKDIR} ${STAGEDIR}${PREFIX}/lib/elasticsearch/modules |
110 |
(cd ${WRKSRC}/modules && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/lib/elasticsearch/modules/) |
110 |
(cd ${WRKSRC}/modules && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/lib/elasticsearch/modules/) |
111 |
${MKDIR} ${STAGEDIR}${PREFIX}/lib/elasticsearch/plugins |
111 |
${MKDIR} ${STAGEDIR}${PREFIX}/lib/elasticsearch/plugins |
112 |
${MKDIR} ${STAGEDIR}${PREFIX}/libexec/elasticsearch |
112 |
${MKDIR} ${STAGEDIR}${PREFIX}/libexec/elasticsearch |
113 |
${INSTALL} -lrs ${STAGEDIR}${ETCDIR} ${STAGEDIR}${PREFIX}/lib/elasticsearch/config |
113 |
${INSTALL} -lrs ${STAGEDIR}${ETCDIR} ${STAGEDIR}${PREFIX}/lib/elasticsearch/config |
114 |
${LN} -s ${JAVASHAREDIR}/classes/jna.jar ${STAGEDIR}${PREFIX}/lib/elasticsearch/lib/jna.jar |
114 |
${LN} -s ${JAVASHAREDIR}/classes/jna.jar ${STAGEDIR}${PREFIX}/lib/elasticsearch/lib/jna.jar |
115 |
|
115 |
|
116 |
do-install-DOCS-on: |
116 |
do-install-DOCS-on: |
117 |
${MKDIR} ${STAGEDIR}${DOCSDIR} |
117 |
${MKDIR} ${STAGEDIR}${DOCSDIR} |
118 |
.for f in ${PORTDOCS} |
118 |
.for f in ${PORTDOCS} |
119 |
${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR} |
119 |
${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR} |
120 |
.endfor |
120 |
.endfor |
121 |
|
121 |
|
122 |
post-install: |
122 |
post-install: |
123 |
${ECHO} "@sample ${ETCDIR}/elasticsearch.yml.sample" >> ${TMPPLIST} |
123 |
${ECHO} "@sample ${ETCDIR}/elasticsearch.yml.sample" >> ${TMPPLIST} |
124 |
${ECHO} "@sample ${ETCDIR}/log4j2.properties.sample" >> ${TMPPLIST} |
124 |
${ECHO} "@sample ${ETCDIR}/log4j2.properties.sample" >> ${TMPPLIST} |
125 |
${ECHO} "@sample ${ETCDIR}/jvm.options.sample" >> ${TMPPLIST} |
125 |
${ECHO} "@sample ${ETCDIR}/jvm.options.sample" >> ${TMPPLIST} |
126 |
${ECHO} "@sample ${ETCDIR}/roles.yml.sample" >> ${TMPPLIST} |
126 |
${ECHO} "@sample ${ETCDIR}/roles.yml.sample" >> ${TMPPLIST} |
127 |
${ECHO} "@sample ${ETCDIR}/role_mapping.yml.sample" >> ${TMPPLIST} |
127 |
${ECHO} "@sample ${ETCDIR}/role_mapping.yml.sample" >> ${TMPPLIST} |
128 |
${FIND} -s ${STAGEDIR}${PREFIX}/lib/elasticsearch -not -type d | ${SORT} | \ |
128 |
${FIND} -s ${STAGEDIR}${PREFIX}/lib/elasticsearch -not -type d | ${SORT} | \ |
129 |
${SED} -e 's#^${STAGEDIR}${PREFIX}/##' >> ${TMPPLIST} |
129 |
${SED} -e 's#^${STAGEDIR}${PREFIX}/##' >> ${TMPPLIST} |
130 |
${ECHO} "@dir lib/elasticsearch/plugins" >> ${TMPPLIST} |
130 |
${ECHO} "@dir lib/elasticsearch/plugins" >> ${TMPPLIST} |
131 |
${ECHO} "@dir libexec/elasticsearch" >> ${TMPPLIST} |
131 |
${ECHO} "@dir libexec/elasticsearch" >> ${TMPPLIST} |
132 |
${ECHO} "@dir(elasticsearch,elasticsearch,0755) ${ETCDIR}" >> ${TMPPLIST} |
132 |
${ECHO} "@dir(elasticsearch,elasticsearch,0755) ${ETCDIR}" >> ${TMPPLIST} |
133 |
|
133 |
|
134 |
.include <bsd.port.mk> |
134 |
.include <bsd.port.mk> |