blob: fe9128b1ba009d865c11b5cc57778ae9352645fb (
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
|
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=elasticsearch
pkgver=6.4.0
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"
options="!check" # no test suite
pkgusers="elastico"
pkggroups="elastico"
source="https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-$pkgver.tar.gz
$pkgname.initd
$pkgname.confd
README.alpine
busybox-mktemp.patch
"
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
cp -R lib/* "$destdir"/lib
install -dm755 "$docdir"
install -dm755 -o elastico -g elastico "$confdir"
install -m644 -t "$confdir" config/*
# 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
cp -R bin/* "$destdir"/bin
# ES does not run without a transport module
install -dm755 "$destdir/modules/$default_module"
install -m644 -t "$destdir/modules/$default_module" modules/"$default_module"/*
# 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
install -m644 -D "$srcdir"/$pkgname.confd \
"$pkgdir"/etc/conf.d/$pkgname
install -m644 -D "$srcdir"/README.alpine \
"$docdir"
}
_builtin_module() {
local name="$1"
local destdir="$subpkgdir/$_basedir/modules/$name"
install -dm755 "$destdir"
install -m644 -t "$destdir" "$builddir"/modules/$name/*
}
sha512sums="6f465378a51c487f1f6a84a0843ac1038db60170ee8a5d96874a759f6dbbf2de9f7bcbbf55616f49f28f1098c82f2e585c917267d02b8b1f43627a1984b3da66 elasticsearch-6.4.0.tar.gz
3957f706d26426772904826a85d4cc96908342154a6089a941cd87230580ea6dccea60b1e84cd08754885d2771babe2026174455836fc993df40fe2892442469 elasticsearch.initd
2ab1baf1b5c8782f3f371ba221aadd3e841abc62175f0b1ddcfc68d711e2370465124e076f8cc2e549c25a1da9db8c90172b2f410bd6bbe4153f0e831620b6ba elasticsearch.confd
6de81485cdc059afef58382862e4155482463fde0b604aaa8dbe904c778b841467c4a383a5e54acd09e3436f1fb7be9923e001fb77bd3d7894e113a5e0f4036b README.alpine
1f9d13bbc42c04c523ef4e9ce734f919ec3d79748d78f288ed3dd725cf7c74e83d66d8b48fbc782b27b1a760096a647cb33773578071710542b19fda18ea0b84 busybox-mktemp.patch"
|