Created
May 8, 2014 11:29
-
-
Save quintona/9451eeff1478afe78fc1 to your computer and use it in GitHub Desktop.
Native RPM SBT example
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
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 |
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
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