Skip to content

Commit

Permalink
Merge pull request #157 from SethTisue/fix-deb-name-regression
Browse files Browse the repository at this point in the history
.deb naming regression fix, plus some random code improvement
  • Loading branch information
SethTisue committed Jan 13, 2016
2 parents ad2eec8 + 7b9b52c commit 8b824c1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
10 changes: 9 additions & 1 deletion project/ScalaDist.scala
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,15 @@ object ScalaDist {
mappings in upload += uploadMapping(packageZipTarball in UniversalDocs).value,
mappings in upload += uploadMapping(packageXzTarball in UniversalDocs).value,
mappings in upload += uploadMapping(packageBin in Rpm).value,
mappings in upload += uploadMapping(packageBin in Debian).value
// Debian needs special handling because the value sbt-native-packager
// gives us for `packageBin in Debian` (coming from the archiveFilename
// method) includes the debian version and arch information,
// which we historically have not included. I don't see a way to
// override the filename on disk, so we re-map at upload time
mappings in upload += Def.task {
(packageBin in Debian).value ->
s"scala/${version.value}/${(name in Debian).value}-${version.value}.deb"
}.value
)

def settings: Seq[Setting[_]] =
Expand Down
6 changes: 1 addition & 5 deletions project/Unix.scala
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,10 @@ object Unix {
// Debian Specific
name in Debian := "scala",
debianPackageDependencies += "java6-runtime-headless",
// debianPackageDependencies += "libjansi-java",

linuxPackageMappings in Debian += (packageMapping(
(sourceDirectory.value / "debian" / "changelog") -> "/usr/share/doc/scala/changelog.gz"
) withUser "root" withGroup "root" withPerms "0644" gzipped) asDocs(),

// Hack so we use regular version, rather than debian version.
target in Debian := target.value / s"${(name in Debian).value}-${version.value}"
).withUser("root").withGroup("root").withPerms("0644").gzipped).asDocs()

)
}
2 changes: 2 additions & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
scalacOptions ++= Seq("-deprecation", "-feature", "-Xlint")

addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.0.4")

addSbtPlugin("com.typesafe.sbt" % "sbt-s3" % "0.8")
Expand Down

0 comments on commit 8b824c1

Please sign in to comment.