Skip to content

Instantly share code, notes, and snippets.

@minyk
Last active August 29, 2015 14:19
Show Gist options
  • Save minyk/ca358749abf7c6d9dadc to your computer and use it in GitHub Desktop.
Save minyk/ca358749abf7c6d9dadc to your computer and use it in GitHub Desktop.
Add RPM Packaging in Spark-Notebook
Index: build.sbt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- build.sbt (revision cf04f98dfb0549476322ba20cf083181d8f19a63)
+++ build.sbt (revision )
@@ -1,6 +1,7 @@
import Dependencies._
import Shared._
+import sbt.Keys._
//play.Project.playScalaSettings
@@ -10,7 +11,7 @@
scalaVersion := defaultScalaVersion
-version in ThisBuild <<= (scalaVersion, sparkVersion, hadoopVersion) { (sc, sv, hv) => s"0.4.0-scala-$sc-spark-$sv-hadoop-$hv" }
+version in ThisBuild <<= (baseVersion, scalaVersion, sparkVersion, hadoopVersion) { (bv, sc, sv, hv) => s"$bv-scala-$sc-spark-$sv-hadoop-$hv" }
maintainer := "Andy Petrella" //Docker
@@ -67,6 +68,14 @@
dependencyOverrides += guava
enablePlugins(DebianPlugin)
+
+enablePlugins(RpmPlugin)
+
+rpmVendor := organization.value
+
+rpmLicense := Some(s"Apache 2.0")
+
+version in Rpm := baseVersion.value
sharedSettings
\ No newline at end of file
Index: project/Shared.scala
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- project/Shared.scala (revision cf04f98dfb0549476322ba20cf083181d8f19a63)
+++ project/Shared.scala (revision )
@@ -4,6 +4,10 @@
import Dependencies._
object Shared {
+ lazy val defaultbaseVersion = sys.props.getOrElse("base.version", "0.4.0")
+
+ lazy val baseVersion = SettingKey[String]("x-base-version")
+
lazy val sparkVersion = SettingKey[String]("x-spark-version")
lazy val hadoopVersion = SettingKey[String]("x-hadoop-version")
@@ -13,6 +17,7 @@
lazy val jlineDef = SettingKey[(String, String)]("x-jline-def")
lazy val sharedSettings:Seq[Def.Setting[_]] = Seq(
+ baseVersion := defaultbaseVersion,
scalaVersion := defaultScalaVersion,
sparkVersion := defaultSparkVersion,
hadoopVersion := defaultHadoopVersion,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment