blob: 982d98cf13bc8976c1c83bb8db03dab344fa8eab (
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
|
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=elasticsearch
pkgver=2.2.1
pkgrel=0
pkgdesc="Open Source, Distributed, RESTful Search Engine"
url="https://www.elastic.co/products/elasticsearch"
arch="noarch"
license="ASL 2.0"
depends="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
"
_modules="lang-expression lang-groovy"
for _mod in $_modules; do
subpackages="$subpackages $pkgname-$_mod:_${_mod//-/_}"
eval "_${_mod//-/_}() { _builtin_module $_mod; }"
done
_builddir="$srcdir/$pkgname-$pkgver"
_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 -dm750 -o $user -g $group "$pkgdir"/var/lib/$pkgname
install -dm755 -o $user -g $group "$pkgdir"/var/log/$pkgname
install -dm700 -o $user -g $group "$pkgdir"/var/tmp/$pkgname
install -m755 -D $pkgname.initd \
"$pkgdir"/etc/init.d/$pkgname || return 1
install -m644 -D "$srcdir"/$pkgname.confd \
"$pkgdir"/etc/conf.d/$pkgname || return 1
}
_builtin_module() {
local name="$1"
local destdir="$subpkgdir/$_basedir/modules/$name"
install -dm755 "$destdir"
install -m644 -t "$destdir" "$_builddir"/modules/$name/* || return 1
}
md5sums="3bf8349cc3cc9439e7c8aa9694dfb1da elasticsearch-2.2.1.tar.gz
01d8bdc0fd186f2bb5e0e0672ffd9c21 elasticsearch.initd
11ca8100933039b8433eac9342e9e326 elasticsearch.confd"
sha256sums="7d43d18a8ee8d715d827ed26b4ff3d939628f5a5b654c6e8de9d99bf3a9b2e03 elasticsearch-2.2.1.tar.gz
acaaa0e053e10d1823a742e888a4a56743d58d9d85b664c63e7000f471e6adda elasticsearch.initd
356989a74e111a50862712f877da1078ffbc77a4a2735090e2aa87bfa9cbf1e0 elasticsearch.confd"
sha512sums="9254175afff5c002625465fb5f398e4e53d121925a656af13e65d90eb3b3ef7507ef094cf44002f104a84e5147a8677a05f4071248140d6b48179b9057867cb5 elasticsearch-2.2.1.tar.gz
fd37a8883cda0ad6c065d9bf5ce06c3d62f3927bc88e81b22ca77714f0700b51f971d7c587191b340d021ca3ce3aca1ac99ac08251bcde4901ae3b791a24b1c8 elasticsearch.initd
e1e4b31f8bac2e79118e7bf9b25ca8a31eefa6fb00d35c57ccf2db718236a3255d5cbfe429009a98c6f4a8ded19d291e97e5a4d9c44fa044ed6f9961792f5d62 elasticsearch.confd"
|