blob: 7e5c8b7f48d4652b5d8b4af3cbc67d18164ccfad (
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
|
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=elasticsearch
pkgver=6.1.1
pkgrel=0
pkgdesc="Open Source, Distributed, RESTful Search Engine"
url="https://www.elastic.co/products/elasticsearch"
arch="x86 x86_64 ppc64le"
license="Apache-2.0"
depends="java-jna-native>=4.1 openjdk8-jre bash"
makedepends=""
install="$pkgname.pre-install"
subpackages="$pkgname-doc"
source="https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-$pkgver.tar.gz
$pkgname.initd
$pkgname.confd
README.alpine
"
builddir="$srcdir/$pkgname-$pkgver"
default_module=transport-netty4
_modules="
aggs-matrix-stats
analysis-common
ingest-common
lang-expression
lang-mustache
lang-painless
mapper-extras
parent-join
percolator
reindex
repository-url
tribe
"
for _mod in $_modules; do
subpackages="$subpackages $pkgname-$_mod:_${_mod//-/_}"
eval "_${_mod//-/_}() { _builtin_module $_mod; }"
done
_basedir="/usr/share/java/$pkgname"
build() {
return 0
}
package() {
local destdir="$pkgdir/$_basedir"
local confdir="$pkgdir/etc/$pkgname"
local docdir="$pkgdir/usr/share/doc/elasticsearch"
local heapsize="256m"
cd "$builddir"
install -dm755 "$destdir"/lib "$destdir"/modules "$destdir"/bin
install -m644 -t "$destdir"/lib lib/* || return 1
install -dm755 "$docdir"
install -dm755 "$confdir"
install -m644 -t "$confdir" config/* || return 1
# remove windows files
find bin -type f -name *.bat -exec rm -f {} \;
find bin -type f -name *.exe -exec rm -f {} \;
# ES bin script parses the new jvm.options file
install -m755 -t "$destdir"/bin bin/* || return 1
# ES does not run without a transport module
install -dm755 "$destdir/modules/$default_module"
install -m644 -t "$destdir/modules/$default_module" modules/"$default_module"/* || return 1
# reduce heap sizes
sed -i \
-e "s|^-Xms.*|-Xms$heapsize|" \
-e "s|^-Xmx.*|-Xmx$heapsize|" \
$confdir/jvm.options
install -m755 -D "$srcdir"/$pkgname.initd \
"$pkgdir"/etc/init.d/$pkgname || return 1
install -m644 -D "$srcdir"/$pkgname.confd \
"$pkgdir"/etc/conf.d/$pkgname || return 1
install -m644 -D "$srcdir"/README.alpine \
"$docdir" || return 1
}
_builtin_module() {
local name="$1"
local destdir="$subpkgdir/$_basedir/modules/$name"
install -dm755 "$destdir"
install -m644 -t "$destdir" "$builddir"/modules/$name/*
}
sha512sums="dcc23ef80ad2545490508d3e9db2fd0e6ae9a99cece0990f537c522265961dad234734548d1d86288af7f65a6ee681f5624d2c0e71df0e1dcc32fdb56dcefe92 elasticsearch-6.1.1.tar.gz
dc916861497d4a589d6b3ab70d90ff9970e4d57003ed82d08c5f90dec337f995dcabf2556b7a27ade926e846ad435392f7845acfe9280dce17b4c172d85328ae elasticsearch.initd
2ab1baf1b5c8782f3f371ba221aadd3e841abc62175f0b1ddcfc68d711e2370465124e076f8cc2e549c25a1da9db8c90172b2f410bd6bbe4153f0e831620b6ba elasticsearch.confd
6de81485cdc059afef58382862e4155482463fde0b604aaa8dbe904c778b841467c4a383a5e54acd09e3436f1fb7be9923e001fb77bd3d7894e113a5e0f4036b README.alpine"
|