blob: d312a9ffe3990144beff0c1abd65ffdc522e0f86 (
plain)
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
# $NetBSD: Makefile,v 1.7 2014/11/13 10:02:05 fhajny Exp $
DISTNAME= elasticsearch-1.4.0
CATEGORIES= textproc
MASTER_SITES= https://download.elasticsearch.org/elasticsearch/elasticsearch/
MAINTAINER= imil@NetBSD.org
HOMEPAGE= http://www.elasticsearch.org/
COMMENT= Distributed RESTful Search Engine
LICENSE= apache-2.0
USE_LANGUAGES= # none
USE_JAVA= run
USE_JAVA2= yes
NO_BUILD= yes
PKG_SYSCONFSUBDIR= elasticsearch
EXDIR= ${PREFIX}/share/examples/elasticsearch
EGDIR= ${PREFIX}/share/elasticsearch
CONFS= elasticsearch.yml logging.yml
.for f in ${CONFS}
CONF_FILES+= ${EXDIR}/${f} ${PKG_SYSCONFDIR}/${f}
.endfor
DOCS= LICENSE.txt NOTICE.txt README.textile
BINS= elasticsearch elasticsearch.in.sh plugin
.include "../../mk/bsd.prefs.mk"
.if !empty(MACHINE_PLATFORM:MDarwin-*-i386)
SIGAR_PLATFORM= universal-macosx
.elif !empty(MACHINE_PLATFORM:MDarwin-*-x86_64)
SIGAR_PLATFORM= universal64-macosx
.elif !empty(MACHINE_PLATFORM:MFreeBSD-5*-i386)
SIGAR_PLATFORM= x86-freebsd-5
.elif !empty(MACHINE_PLATFORM:MFreeBSD-6*-i386)
SIGAR_PLATFORM= x86-freebsd-6
.elif !empty(MACHINE_PLATFORM:MFreeBSD-6*-x86_64)
SIGAR_PLATFORM= amd64-freebsd-6
.elif !empty(MACHINE_PLATFORM:MLinux-*-i386)
SIGAR_PLATFORM= x86-linux
.elif !empty(MACHINE_PLATFORM:MLinux-*-x86_64)
SIGAR_PLATFORM= amd64-linux
.elif !empty(MACHINE_PLATFORM:MSunOS-*-i386)
SIGAR_PLATFORM= x86-solaris
.elif !empty(MACHINE_PLATFORM:MSunOS-*-sparc)
SIGAR_PLATFORM= sparc-solaris
.elif !empty(MACHINE_PLATFORM:MSunOS-*-sparc64)
SIGAR_PLATFORM= sparc64-solaris
.elif !empty(MACHINE_PLATFORM:MSunOS-*-x86_64)
SIGAR_PLATFORM= amd64-solaris
.endif
.if ${_OPSYS_SHLIB_TYPE} == "dylib"
SHLIB_EXT= dylib
.else
SHLIB_EXT= so
.endif
BUILD_DEFS+= ES_USER ES_GROUP ES_DBDIR ES_LOGDIR ES_PIDDIR ES_TMPDIR
ES_USER?= elasticsearch
ES_GROUP?= ${ES_USER}
ES_LIBDIR?= ${PREFIX}/lib/elasticsearch
ES_DBDIR?= ${VARBASE}/db/elasticsearch
ES_LOGDIR?= ${VARBASE}/log/elasticsearch
ES_PIDDIR?= ${VARBASE}/run
ES_TMPDIR?= ${VARBASE}/tmp/elasticsearch
PKG_USERS_VARS+= ES_USER
PKG_GROUPS_VARS+= ES_GROUP
PKG_GROUPS= ${ES_GROUP}
PKG_USERS= ${ES_USER}:${ES_GROUP}
FILES_SUBST+= JAVA_HOME=${PKG_JAVA_HOME} ES_USER=${ES_USER} \
ES_GROUP=${ES_GROUP} ES_LIBDIR=${ES_LIBDIR} \
ES_LOGDIR=${ES_LOGDIR} ES_PIDDIR=${ES_PIDDIR} \
ES_DBDIR=${ES_DBDIR} ES_TMPDIR=${ES_TMPDIR} \
DISTNAME=${DISTNAME}
RCD_SCRIPTS= elasticsearch
OWN_DIRS_PERMS+= ${ES_LOGDIR} ${ES_USER} ${ES_GROUP} 0700
OWN_DIRS_PERMS+= ${ES_DBDIR} ${ES_USER} ${ES_GROUP} 0700
OWN_DIRS_PERMS+= ${ES_TMPDIR} ${ES_USER} ${ES_GROUP} 0700
INSTALLATION_DIRS+= ${EXDIR} ${ES_LIBDIR} ${PREFIX}/share/doc/elasticsearch
INSTALLATION_DIRS+= ${ES_LIBDIR}/plugins ${EGDIR}
PLIST_VARS+= sigar
.if !empty(SIGAR_PLATFORM)
PLIST.sigar= yes
PLIST_SUBST+= SIGAR_FILE=libsigar-${SIGAR_PLATFORM}.${SHLIB_EXT}
PRINT_PLIST_AWK+= {gsub(/libsigar-$(SIGAR_PLATFORM).$(SHLIB_EXT)/,"$${SIGAR_FILE}", $$0);}
INSTALLATION_DIRS+= ${ES_LIBDIR}/sigar
.endif
SUBST_CLASSES+= paths
SUBST_STAGE.paths= post-patch
SUBST_FILES.paths= config/elasticsearch.yml
SUBST_VARS.paths= PKG_SYSCONFDIR ES_DBDIR ES_LIBDIR ES_LOGDIR ES_TMPDIR
do-install:
.for f in ${CONFS}
${INSTALL_DATA} ${WRKSRC}/config/${f} ${DESTDIR}${EXDIR}
.endfor
.for f in ${DOCS}
${INSTALL_DATA} ${WRKSRC}/${f} \
${DESTDIR}${PREFIX}/share/doc/elasticsearch
.endfor
.for f in ${BINS}
${INSTALL_SCRIPT} ${WRKSRC}/bin/${f} \
${DESTDIR}${PREFIX}/share/elasticsearch
.endfor
${INSTALL_DATA} ${WRKSRC}/lib/*.jar ${DESTDIR}${ES_LIBDIR}
.if !empty(SIGAR_PLATFORM)
${INSTALL_DATA} ${WRKSRC}/lib/sigar/sigar-*.jar ${DESTDIR}${ES_LIBDIR}/sigar/
${INSTALL_LIB} ${WRKSRC}/lib/sigar/libsigar-${SIGAR_PLATFORM}.${SHLIB_EXT} ${DESTDIR}${ES_LIBDIR}/sigar/
.endif
.include "../../mk/java-vm.mk"
.include "../../mk/bsd.pkg.mk"
|