summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e989a56082e88b2049e972273f9dc38a4d18d336 (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
#Maintainer: nutz <nutz[├ĄT]noova(O)de>

pkgname=aerospike-tools-bin
pkgrealname=aerospike-tools
pkgver=3.15.0.3
pkgrel=1
pkgdesc="Tools for Aerospike"
arch=('x86_64')
url="http://www.aerospike.com/"
license=('AGPLv3')
depends=(
	'python2-argparse'
	'python2-bcrypt'
	'python2-pyopenssl'
	'python2-pexpect'
	'python2-ply'
)
makedepends=('binutils')
sha256sums=('e582f5390e8853eb0faa9996e028ab7a46251626d629447bf6c8f11b95c290a7')
source=("http://www.aerospike.com/download/tools/${pkgver}/artifact/ubuntu16"
       )

prepare() {
	cd ${srcdir}/${pkgrealname}-${pkgver}-ubuntu16.04/
	ar xv ${pkgrealname}-${pkgver}.ubuntu16.04.x86_64.deb 1>/dev/null
	tar xf data.tar.xz
}

#pkgver() {}

#build() {}

#check() {}

package() {
	mkdir -p -m 755 "${pkgdir}/opt/aerospike/bin"
	mkdir -p -m 755 "${pkgdir}/usr/bin"
	cd ${srcdir}/${pkgrealname}-${pkgver}-ubuntu16.04/opt/aerospike
	for file in $(ls bin); do
		# TODO: aql bla.
		install -m 0755 bin/$file "${pkgdir}/opt/aerospike/bin/${file}"
		ln -s "/opt/aerospike/bin/${file}" "${pkgdir}/usr/bin/${file}"
		sed -i "1s/python/python2/" ${pkgdir}/opt/aerospike/bin/${file}
	done

	mkdir -p -m 755 "${pkgdir}/opt/aerospike/lib/python"
	install -m 0755 lib/python/citrusleaf.py "${pkgdir}/opt/aerospike/lib/python/citrusleaf.py"


	for path in $(find doc/ | sort); do
		if [ -d ${path} ]; then
			mkdir -p -m 755 "${pkgdir}/opt/aerospike/${path}"
		else
			install -m 0644 $path "${pkgdir}/opt/aerospike/${path}"
		fi
	done
}