summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 19a2bc0566a9bd4c10559a94a7a661d29c124cc9 (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
# Maintainer: nutz <nutz[├ĄT]noova(O)de>
# Maintainer: Anthony Danilov <grinderz@protonmail.com>

pkgname=aerospike-tools-bin
pkgrealname=aerospike-tools
pkgver=3.15.3.6
pkgrel=1
pkgdesc="Tools for Aerospike"
arch=('x86_64')
url="http://www.aerospike.com/"
license=('AGPLv3')
depends=(
	'java-runtime'
	'python2'
	'openssl'
	'readline>=7.0.0'
	'readline<8.0.0'
)
optdepends=(
	'python2-argparse: non default option parser'
	'python2-bcrypt: connect to an Aerospike Cluster with security enabled'
	'python2-pexpect: collect system statistics for remote hosts'
	'python2-toml: configuration files support'
	'python2-jsonschema: configuration files support'
	'python2-pyopenssl: connect to an Aerospike Cluster using SSL'
	'python2-pyasn1: connect to an Aerospike Cluster using SSL'
)


sha256sums=('bdc177068dcbed5320d2e26f8afb72cdf78fa479af2ccf52e9b3e9cbfff9fb08')
source=("http://www.aerospike.com/download/tools/${pkgver}/artifact/ubuntu16")

prepare() {
	cd ${srcdir}/${pkgrealname}-${pkgver}-ubuntu16.04/
	ar x ${pkgrealname}-${pkgver}.ubuntu16.04.x86_64.deb
	tar xf data.tar.xz
}

package() {
	cd "${srcdir}/${pkgrealname}-${pkgver}-ubuntu16.04"
	
	cp -ar etc "${pkgdir}/etc"
	cp -ar opt "${pkgdir}/opt"
	cp -ar usr "${pkgdir}/usr"

	for file in {add_python_path,aerospike_nagios.py,asadm,asgraphite,remove_python_path,ssl_context.py,asinfo,asloglatency}; do
		sed -i '1s/python/python2/' "${pkgdir}/opt/aerospike/bin/${file}"
	done

	sed -i '1s/python/python2/' "${pkgdir}/opt/aerospike/lib/python/citrusleaf.py"
	sed -i 's/libreadline.so.6/libreadline.so.7/g' "$pkgdir/opt/aerospike/bin/aql"
}