Skip to content

Instantly share code, notes, and snippets.

@quintona
Created May 8, 2014 11:29
Show Gist options
  • Save quintona/9451eeff1478afe78fc1 to your computer and use it in GitHub Desktop.
Save quintona/9451eeff1478afe78fc1 to your computer and use it in GitHub Desktop.
Native RPM SBT example
import com.typesafe.sbt.packager.Keys._
import sbt.Keys._
import com.typesafe.sbt.SbtNativePackager._
name := "hw"
version := "1.0"
scalaVersion := "2.10.3"
Packaging.settings
import sbt._
import com.typesafe.sbt.packager.Keys._
import sbt.Keys._
import com.typesafe.sbt.SbtNativePackager._
object Packaging {
val settings: Seq[Setting[_]] = packagerSettings ++ deploymentSettings ++ Seq(
name in Rpm := "helloworld",
version in Rpm := "" + new java.util.Date().getTime,
packageSummary in Linux := "Helloworld Package",
rpmRelease := "1",
rpmVendor := "Quinton Anderson",
rpmRequirements ++= Seq("chkconfig", "java-1.7.0-openjdk-devel >= 1:1.7", "apache-tomcat >= 7.0"),
rpmPost := None,
packageDescription in Rpm := "Some description",
rpmGroup := Some("Applications/Internet"),
rpmLicense := Some("BSD"),
linuxPackageMappings <+= (baseDirectory) map { bd =>
println("base dir " + bd)
(packageMapping((bd / "src" / "main" / "scripts" / "test.sh") -> "/usr/share/test.sh")
withUser "root" withGroup "root" withPerms "0755")
}
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment