blob: b37e09e3eee51546c4c011b4b5d08a3b6dbc64c6 (
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
|
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=elasticsearch
pkgver=2.3.4
pkgrel=0
pkgdesc="Open Source, Distributed, RESTful Search Engine"
url="https://www.elastic.co/products/elasticsearch"
arch="x86 x86_64"
license="ASL-2.0"
depends="java-jna-native>=4.1 openjdk8-jre"
makedepends=""
install="$pkgname.pre-install"
source="https://download.elasticsearch.org/$pkgname/release/org/$pkgname/distribution/tar/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz
$pkgname.initd
$pkgname.confd
"
builddir="$srcdir/$pkgname-$pkgver"
_modules="lang-expression lang-groovy reindex"
for _mod in $_modules; do
subpackages="$subpackages $pkgname-$_mod:_${_mod//-/_}"
eval "_${_mod//-/_}() { _builtin_module $_mod; }"
done
_basedir="/usr/share/java/$pkgname"
build() {
sed "s/@@ES_VERSION@@/$pkgver/" "$srcdir"/$pkgname.initd \
> "$builddir"/$pkgname.initd
}
package() {
local destdir="$pkgdir/$_basedir"
local confdir="$pkgdir/etc/$pkgname"
local user="elastico"
local group="$user"
cd "$builddir"
install -dm755 "$destdir"/lib "$destdir"/modules
install -m644 -t "$destdir"/lib lib/* || return 1
install -dm755 "$confdir"
install -m644 -t "$confdir" config/* || return 1
install -m755 -D $pkgname.initd \
"$pkgdir"/etc/init.d/$pkgname || return 1
install -m644 -D "$srcdir"/$pkgname.confd \
"$pkgdir"/etc/conf.d/$pkgname
}
_builtin_module() {
local name="$1"
local destdir="$subpkgdir/$_basedir/modules/$name"
install -dm755 "$destdir"
install -m644 -t "$destdir" "$builddir"/modules/$name/*
}
md5sums="c72e4f43d2aafcc761e2df53a52b3d6f elasticsearch-2.3.4.tar.gz
8588526df39a4d7fab06cf885edec731 elasticsearch.initd
11ca8100933039b8433eac9342e9e326 elasticsearch.confd"
sha256sums="371e0c5f4ded0a8548f1cce55faff3efebcfd5f895c2c816f220146521f6f06e elasticsearch-2.3.4.tar.gz
b4cacc84afac4f4d51cad888b0dca034a91e3aed96543d43126a86fa7c3f2bb6 elasticsearch.initd
356989a74e111a50862712f877da1078ffbc77a4a2735090e2aa87bfa9cbf1e0 elasticsearch.confd"
sha512sums="d6b61069b499d2fab1f4102240a5dfd9c0a0806d0cd7047935ef49da669e61066ca37284bd367df96aec79c47417b499988094737bf2e5a6e4c69f682e311bc0 elasticsearch-2.3.4.tar.gz
9fe933d6b1b53a02514d34377e6362d176148da3297edbea5902a1c4aff9762aa9c9cb00f053c9aec42db8dea22f722f8a3e16f5ed5b32f5b975e0b311a5e6ff elasticsearch.initd
e1e4b31f8bac2e79118e7bf9b25ca8a31eefa6fb00d35c57ccf2db718236a3255d5cbfe429009a98c6f4a8ded19d291e97e5a4d9c44fa044ed6f9961792f5d62 elasticsearch.confd"
|