Created
March 25, 2015 20:49
-
-
Save MasseGuillaume/c82b7af59e2347ca3a17 to your computer and use it in GitHub Desktop.
apache-spark 1.3.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Franois Garillot ("huitseeker") <francois [at] garillot.net> | |
# Contributor: Christian Krause ("wookietreiber") <kizkizzbangbang@gmail.com> | |
pkgname=apache-spark | |
pkgver=1.3.0 | |
pkgrel=3 | |
pkgdesc="fast and general engine for large-scale data processing" | |
arch=('any') | |
url="http://spark.apache.org" | |
license=('APACHE') | |
depends=('maven' 'java-environment>=6' 'scala' 'python2>=2.7') | |
install=apache-spark.install | |
source=("http://d3kbcqa49mib13.cloudfront.net/spark-$pkgver.tgz" | |
'apache-spark-standalone.service' | |
'spark-env.sh') | |
md5sums=('694b2863621fcdbbba2777bf329c056c' | |
'bb7d8b85366e6f9cc0b2777eaea161a8' | |
'0913001583e607849270090555dbd309') | |
backup=('etc/apache-spark/spark-env.sh') | |
PKGEXT=${PKGEXT:-'.pkg.tar.xz'} | |
prepare() { | |
cd "$srcdir/spark-$pkgver" | |
sed -i 's|pid=$SPARK_PID_DIR/spark-$SPARK_IDENT_STRING-$command-$instance.pid|pid=/var/lib/apache-spark/spark-daemon.pid|' sbin/spark-daemon.sh | |
} | |
build() { | |
cd "$srcdir/spark-$pkgver" | |
export MAVEN_OPTS="-Xmx2g -XX:MaxPermSize=512M -XX:ReservedCodeCacheSize=512m" | |
dev/change-version-to-2.11.sh | |
mvn -Dscala-2.11 -DskipTests -Dmaven.repo.local=/tmp clean package | |
} | |
package() { | |
cd "$srcdir/spark-$pkgver" | |
install -d "$pkgdir/usr/bin" "$pkgdir/usr/share" | |
cp -r "$srcdir/spark-$pkgver" "$pkgdir/usr/share/apache-spark/" | |
cd "$pkgdir/usr/bin" | |
echo -e "#!/bin/sh\ncd $pkgdir/usr/share/apache-spark/bin/\n ./spark-class" > spark-class | |
chmod +x spark-class | |
echo -e "#!/bin/sh\ncd $pkgdir/usr/share/apache-spark/bin/\n ./spark-sql" > spark-sql | |
chmod +x spark-sql | |
echo -e "#!/bin/sh\ncd $pkgdir/usr/share/apache-spark/bin/\n ./spark-shell" > spark-shell | |
chmod +x spark-shell | |
echo -e "#!/bin/sh\ncd $pkgdir/usr/share/apache-spark/bin/\n ./spark-submit" > spark-submit | |
chmod +x spark-submit | |
install -Dm644 "$srcdir/apache-spark-standalone.service" "$pkgdir/usr/lib/systemd/system/apache-spark-standalone.service" | |
install -Dm644 "$srcdir/spark-env.sh" "$pkgdir/etc/apache-spark/spark-env.sh" | |
cd "$pkgdir/usr/share/apache-spark/conf" | |
ln -sf "/etc/apache-spark/spark-env.sh" . | |
install -dm755 "$pkgdir/usr/share/apache-spark/core/target/scala-2.10/classes/pyspark/" "$pkgdir/usr/lib/python2.7/" | |
install -dm755 "$pkgdir/usr/share/apache-spark/core/target/scala-2.10/classes/py4j/" "$pkgdir/usr/lib/python2.7/" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment