Skip to content

Commit

Permalink
Added readme for those interested.
Browse files Browse the repository at this point in the history
  • Loading branch information
jsuereth committed Dec 20, 2011
1 parent 9ae9a8a commit 1bdc1a3
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# SBT Native Packager #

This is a work in process project. The goal is to be able to bundle up Scala software built with SBT for native packaging systems, like deb, rpm, homebrew, msi.

Here's an example build for the debian package of [sbt-extras](https://github.com/paulp/sbt-extras) project:

val settings: Seq[Setting[_]] = debianSettings ++ Seq(
maintainer in Debian := "Josh Suereth <[email protected]>",
name in Debian := "sbt",
version in Debian <<= (version, sbtVersion) apply { (v, sv) =>
sv + "-build-" + (v split "\\." map (_.toInt) dropWhile (_ == 0) map ("%02d" format _) mkString "")
},
debianPackageDependencies in Debian ++= Seq("curl", "java2-runtime", "bash (>= 2.05a-11)"),
debianPackageRecommends in Debian += "git",
packageDescription in Debian := """Simple Build Tool
This script provides a native way to run the Simple Build Tool,
a build tool for Scala software, also called SBT.""",
linuxPackageMappings in Debian <+= (baseDirectory) map { bd =>
(packageForDebian((bd / "sbt") -> "usr/bin/sbt")
withUser "root" withGroup "root" withPerms "0755")
},
linuxPackageMappings in Debian <+= (sourceDirectory in Debian) map { bd =>
packageForDebian(
(bd / "usr/share/doc/sbt/copyright") -> "usr/share/doc/sbt/copyright"
) withUser "root" withGroup "root" withPerms "0644"
},
linuxPackageMappings in Debian <+= (sourceDirectory) map { bd =>
packageForDebian(
(bd / "debian/changelog") -> "usr/share/doc/sbt/changelog.gz",
(bd / "linux" / "usr/share/man/man1/sbt.1") -> "usr/share/man/man1/sbt.1.gz"
) withUser "root" withGroup "root" withPerms "0644" gzipped
}
)


More to come shortly.

0 comments on commit 1bdc1a3

Please sign in to comment.