summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrice Clement <monsieurp@gentoo.org>2020-11-26 14:57:49 +0100
committerPatrice Clement <monsieurp@gentoo.org>2020-11-26 15:06:27 +0100
commitf22d44731c030ece8de4f956c247da9f47f61982 (patch)
tree91f1f28900c20173c06a3bc5aa000e221a3c27e4 /sys-cluster/spark-bin/spark-bin-3.0.1-r1.ebuild
parentmetadata/layout.conf: ban EAPI 4(!) (diff)
downloadgentoo-f22d44731c030ece8de4f956c247da9f47f61982.tar.gz
gentoo-f22d44731c030ece8de4f956c247da9f47f61982.tar.bz2
gentoo-f22d44731c030ece8de4f956c247da9f47f61982.zip
sys-cluster/spark-bin: set SPARK_HOME correctly.
The find-spark-home script is now useless. Do not install it. Package-Manager: Portage-3.0.9, Repoman-3.0.2 Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
Diffstat (limited to 'sys-cluster/spark-bin/spark-bin-3.0.1-r1.ebuild')
-rw-r--r--sys-cluster/spark-bin/spark-bin-3.0.1-r1.ebuild21
1 files changed, 15 insertions, 6 deletions
diff --git a/sys-cluster/spark-bin/spark-bin-3.0.1-r1.ebuild b/sys-cluster/spark-bin/spark-bin-3.0.1-r1.ebuild
index d3c6e1123fbc..d5a887380637 100644
--- a/sys-cluster/spark-bin/spark-bin-3.0.1-r1.ebuild
+++ b/sys-cluster/spark-bin/spark-bin-3.0.1-r1.ebuild
@@ -30,13 +30,22 @@ src_install() {
dodir usr/lib/spark-${SLOT}
into usr/lib/spark-${SLOT}
- dobin bin/beeline \
- bin/find-spark-home \
- bin/pyspark \
- bin/spark-class \
- bin/spark-shell \
- bin/spark-sql \
+ local SPARK_SCRIPTS=(
+ bin/beeline
+ bin/pyspark
+ bin/spark-class
+ bin/spark-shell
+ bin/spark-sql
bin/spark-submit
+ )
+
+ local s
+ for s in "${SPARK_SCRIPTS[@]}"; do
+ ebegin "Setting SPARK_HOME to /usr/lib/spark-${SLOT} in $(basename ${s}) script ..."
+ sed -i -e "2iSPARK_HOME=/usr/lib/spark-${SLOT}" "${s}"
+ eend $?
+ dobin "${s}"
+ done
insinto usr/lib/spark-${SLOT}/bin
doins bin/load-spark-env.sh