Skip to content

Commit 8b824c1

Browse files
committed
Merge pull request #157 from SethTisue/fix-deb-name-regression
.deb naming regression fix, plus some random code improvement
2 parents ad2eec8 + 7b9b52c commit 8b824c1

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

project/ScalaDist.scala

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,15 @@ object ScalaDist {
4040
mappings in upload += uploadMapping(packageZipTarball in UniversalDocs).value,
4141
mappings in upload += uploadMapping(packageXzTarball in UniversalDocs).value,
4242
mappings in upload += uploadMapping(packageBin in Rpm).value,
43-
mappings in upload += uploadMapping(packageBin in Debian).value
43+
// Debian needs special handling because the value sbt-native-packager
44+
// gives us for `packageBin in Debian` (coming from the archiveFilename
45+
// method) includes the debian version and arch information,
46+
// which we historically have not included. I don't see a way to
47+
// override the filename on disk, so we re-map at upload time
48+
mappings in upload += Def.task {
49+
(packageBin in Debian).value ->
50+
s"scala/${version.value}/${(name in Debian).value}-${version.value}.deb"
51+
}.value
4452
)
4553

4654
def settings: Seq[Setting[_]] =

project/Unix.scala

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,10 @@ object Unix {
8989
// Debian Specific
9090
name in Debian := "scala",
9191
debianPackageDependencies += "java6-runtime-headless",
92-
// debianPackageDependencies += "libjansi-java",
9392

9493
linuxPackageMappings in Debian += (packageMapping(
9594
(sourceDirectory.value / "debian" / "changelog") -> "/usr/share/doc/scala/changelog.gz"
96-
) withUser "root" withGroup "root" withPerms "0644" gzipped) asDocs(),
97-
98-
// Hack so we use regular version, rather than debian version.
99-
target in Debian := target.value / s"${(name in Debian).value}-${version.value}"
95+
).withUser("root").withGroup("root").withPerms("0644").gzipped).asDocs()
10096

10197
)
10298
}

project/plugins.sbt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
scalacOptions ++= Seq("-deprecation", "-feature", "-Xlint")
2+
13
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.0.4")
24

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

0 commit comments

Comments
 (0)