Fix to packaging for new structure.

This commit is contained in:
Josh Suereth 2011-12-21 11:21:16 -05:00
parent 183ffffe2a
commit 5ca52f63d8
1 changed files with 17 additions and 17 deletions

View File

@ -1,15 +1,11 @@
import sbt._ import sbt._
import com.typesafe.packager.debian.DebianPlugin._ import com.typesafe.packager.Keys._
import com.typesafe.packager.debian.Keys._ import sbt.Keys._
import com.typesafe.packager.linux.{LinuxPackageMapping, LinuxFileMetaData} import com.typesafe.packager.PackagerPlugin._
import com.typesafe.packager.rpm.RpmPlugin._
import com.typesafe.packager.rpm.Keys._
import sbt.Keys.{baseDirectory,sbtVersion,sourceDirectory, name,version}
import com.typesafe.packager.linux.Keys.{linuxPackageMappings,maintainer,packageDescription}
object DebianPkg { object DebianPkg {
val settings: Seq[Setting[_]] = debianSettings ++ rpmSettings ++ Seq( val settings: Seq[Setting[_]] = packagerSettings ++ Seq(
// GENERAL LINUX PACKAGING STUFFS // GENERAL LINUX PACKAGING STUFFS
maintainer := "Josh Suereth <joshua.suereth@typesafe.com>", maintainer := "Josh Suereth <joshua.suereth@typesafe.com>",
@ -17,20 +13,24 @@ object DebianPkg {
This script provides a native way to run the Simple Build Tool, This script provides a native way to run the Simple Build Tool,
a build tool for Scala software, also called SBT.""", a build tool for Scala software, also called SBT.""",
linuxPackageMappings <+= (baseDirectory) map { bd => linuxPackageMappings <+= (baseDirectory) map { bd =>
(packageForDebian((bd / "sbt") -> "/usr/bin/sbt") (packageMapping((bd / "sbt") -> "/usr/bin/sbt")
withUser "root" withGroup "root" withPerms "0755") withUser "root" withGroup "root" withPerms "0755")
}, },
linuxPackageMappings <+= (sourceDirectory) map { bd => linuxPackageMappings <+= (sourceDirectory) map { bd =>
(packageForDebian( (packageMapping(
(bd / "linux" / "usr/share/man/man1/sbt.1") -> "/usr/share/man/man1/sbt.1.gz" (bd / "linux" / "usr/share/man/man1/sbt.1") -> "/usr/share/man/man1/sbt.1.gz"
) withUser "root" withGroup "root" withPerms "0644" gzipped) asDocs() ) withPerms "0644" gzipped) asDocs()
}, },
linuxPackageMappings <+= (sourceDirectory in Debian) map { bd => linuxPackageMappings <+= (sourceDirectory in Debian) map { bd =>
packageForDebian( packageMapping(
(bd / "usr/share/doc/sbt") -> "/usr/share/doc/sbt",
(bd / "usr/share/doc/sbt/copyright") -> "/usr/share/doc/sbt/copyright" (bd / "usr/share/doc/sbt/copyright") -> "/usr/share/doc/sbt/copyright"
) withUser "root" withGroup "root" withPerms "0644" asDocs() ) withPerms "0644" asDocs()
}, },
linuxPackageMappings <+= (sourceDirectory in Debian) map { bd =>
packageMapping(
(bd / "usr/share/doc/sbt") -> "/usr/share/doc/sbt"
) asDocs()
},
// DEBIAN SPECIFIC // DEBIAN SPECIFIC
name in Debian := "sbt", name in Debian := "sbt",
@ -40,9 +40,9 @@ object DebianPkg {
debianPackageDependencies in Debian ++= Seq("curl", "java2-runtime", "bash (>= 2.05a-11)"), debianPackageDependencies in Debian ++= Seq("curl", "java2-runtime", "bash (>= 2.05a-11)"),
debianPackageRecommends in Debian += "git", debianPackageRecommends in Debian += "git",
linuxPackageMappings in Debian <+= (sourceDirectory) map { bd => linuxPackageMappings in Debian <+= (sourceDirectory) map { bd =>
(packageForDebian( (packageMapping(
(bd / "debian/changelog") -> "/usr/share/doc/sbt/changelog.gz" (bd / "debian/changelog") -> "/usr/share/doc/sbt/changelog.gz"
) withUser "root" withGroup "root" withPerms "0644" gzipped) asDocs() ) withUser "root" withGroup "root" withPerms "0644" gzipped) asDocs()
}, },
// RPM SPECIFIC // RPM SPECIFIC
@ -52,6 +52,6 @@ object DebianPkg {
rpmVendor := "typesafe", rpmVendor := "typesafe",
rpmUrl := Some("http://github.com/paulp/sbt-extras"), rpmUrl := Some("http://github.com/paulp/sbt-extras"),
rpmSummary := Some("Simple Build Tool for Scala-driven builds."), rpmSummary := Some("Simple Build Tool for Scala-driven builds."),
rpmLicense := Some("BSD") rpmLicense := Some("BSD")
) )
} }