blob: b1b06c35d8e547aeaa9aa09da33d18faf6524435 (
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
|
# Maintainer: Tao-Yi Lee <tylee@ieee.org>
pkgname=apache_spark
_pkgname=spark
pkgver=1.6.2
_fullpkgname="${_pkgname}-${pkgver}-bin-hadoop2.6"
pkgrel=1
pkgdesc="Apache Spark™ is a fast and general engine for large-scale data processing."
arch=('i686' 'x86_64')
url="http://spark.apache.org"
license=('apache')
groups=()
depends=('java-runtime-common')
provides=()
conflicts=()
replaces=()
backup=()
options=('!debug')
install=
source=("http://mirror.nexcess.net/apache/$_pkgname/$_pkgname-$pkgver/$_fullpkgname.tgz")
noextract=("$_fullpkgname.tgz")
md5sums=('604936f2bd8af999d0d624b370f5c4b1')
package() {
_etc_profiled=${pkgdir}/etc/profile.d
mkdir -p "${pkgdir}/opt"
mkdir -p $_etc_profiled
# install spark
msg "Spark will be installed under /opt/$_fullpkgname"
tar -xf $_fullpkgname.tgz -C ${pkgdir}/opt
pushd "${pkgdir}/opt/$_fullpkgname/python/lib/" > /dev/null
rm py4j-0.9-src.zip PY4J_LICENSE.txt
popd > /dev/null
sed -i '/py4j/d' "${pkgdir}/opt/$_fullpkgname/bin/pyspark"
echo "export PATH=\$PATH:/opt/$_fullpkgname/bin" >> \
"${_etc_profiled}/${pkgname}.sh"
echo "export SPARK_HOME=/opt/$_fullpkgname" >> \
"${_etc_profiled}/${pkgname}.sh"
}
# vim:set ts=2 sw=2 et:
|