commit:     572059b22cafc69aba37b803161563a7668d344e
Author:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 26 11:04:33 2020 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Thu Nov 26 11:10:05 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=572059b2

sys-cluster/spark-bin: add spark version 2.4.7.

This commit adds an ebuild to install Spark 2.4.7.

SLOT the ebuild so that both Spark 2 and Spark 3 can be installed on the
same machine.

Package-Manager: Portage-3.0.9, Repoman-3.0.2
Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>

 sys-cluster/spark-bin/Manifest               |  1 +
 sys-cluster/spark-bin/spark-bin-2.4.7.ebuild | 64 ++++++++++++++++++++++++++++
 2 files changed, 65 insertions(+)

diff --git a/sys-cluster/spark-bin/Manifest b/sys-cluster/spark-bin/Manifest
index 118a83ea45d..399e58c5e48 100644
--- a/sys-cluster/spark-bin/Manifest
+++ b/sys-cluster/spark-bin/Manifest
@@ -1 +1,2 @@
+DIST spark-bin-2.4.7.tgz 233333392 BLAKE2B 
5698cda600858ba36dbaa891949dd6e12f98877aa49b39f136733a0de9536975e373539080ed3992e4c3942c314c31919bf0bc27c6109e466cbc41b3574d0c63
 SHA512 
0f5455672045f6110b030ce343c049855b7ba86c0ecb5e39a075ff9d093c7f648da55ded12e72ffe65d84c32dcd5418a6d764f2d6295a3f894a4286cc80ef478
 DIST spark-bin-3.0.1.tgz 219929956 BLAKE2B 
dd53df1e0123feae5b69f97193d1edc647bd4802ab78c54e471ed54b3ae6eee32ace51e379569f4947599d24aba5af63b401c11ef2af6234ffc6ac1afbbe275f
 SHA512 
f4a10baec5b8ff1841f10651cac2c4aa39c162d3029ca180a9749149e6060805b5b5ddf9287b4aa321434810172f8cc0534943ac005531bb48b6622fbe228ddc

diff --git a/sys-cluster/spark-bin/spark-bin-2.4.7.ebuild 
b/sys-cluster/spark-bin/spark-bin-2.4.7.ebuild
new file mode 100644
index 00000000000..ab322d5079a
--- /dev/null
+++ b/sys-cluster/spark-bin/spark-bin-2.4.7.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit java-pkg-2
+
+DESCRIPTION="Lightning-fast unified analytics engine"
+HOMEPAGE="https://spark.apache.org";
+SRC_URI="mirror://apache/spark/spark-${PV}/spark-${PV}-bin-hadoop2.7.tgz -> 
${P}.tgz"
+
+LICENSE="Apache-2.0"
+SLOT="2"
+KEYWORDS="~amd64"
+
+RDEPEND="
+       >=virtual/jre-1.8"
+
+DEPEND="
+       >=virtual/jdk-1.8"
+
+S="${WORKDIR}/spark-${PV}-bin-hadoop2.7"
+
+DOCS=( LICENSE NOTICE README.md RELEASE )
+
+# Nothing to compile here.
+src_compile() { :; }
+
+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 \
+               bin/spark-submit
+
+       insinto usr/lib/spark-${SLOT}/bin
+       doins bin/load-spark-env.sh
+
+       insinto usr/lib/spark-${SLOT}
+       doins -r conf
+       doins -r jars
+       doins -r python
+       doins -r sbin
+       doins -r yarn
+
+       einstalldocs
+}
+
+pkg_postinst() {
+       einfo
+       einfo "Spark is now slotted. You have installed Spark ${SLOT}."
+       einfo
+       einfo "Make sure to add /usr/lib/spark-${SLOT}/{bin,sbin} directories"
+       einfo "to your PATH in order to run Spark shell scripts:"
+       einfo
+       einfo "$ export PATH=\$PATH:/usr/lib/spark-${SLOT}/bin"
+       einfo "$ export PATH=\$PATH:/usr/lib/spark-${SLOT}/sbin"
+       einfo
+}

Reply via email to