Skip to content

Commit b8b1271

Browse files
committed
Merge pull request #153 from SethTisue/2.12.x
merge 2.11.x onto 2.12.x
2 parents b2fccc9 + d4b02c9 commit b8b1271

File tree

6 files changed

+39
-35
lines changed

6 files changed

+39
-35
lines changed

README.md

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# The Scala 2.11.x Distribution #
1+
# The Scala 2.12.x Distribution
22

33
This project morphs the `"org.scala-lang" % "scala-dist" % $version` maven artifact
44
into a Scala `$version` distribution (zip, tar.gz, deb, rpm, and msi).
@@ -7,43 +7,45 @@ To build a distribution, run:
77

88
* `universal:package-bin` - Builds the universal zip installer
99
* `universal-docs:package-bin` - Builds the universal documentation zip
10-
* `debian:package-bin` - Builds the debian DEB file. *Requires dpkg-deb*
10+
* `debian:package-bin` - Builds the Debian DEB file. *requires dpkg-deb*
1111
* `rpm:package-bin` - Builds the yum RPM file. *requires rpmbuild*
12-
* `windows:package-bin` - Builds the windows MSI. *Requires WIX 3.6 installed*
12+
* `windows:package-bin` - Builds the Windows MSI. *requires WiX 3.6*
1313

14-
Alternatively, the `s3-upload` task's mapping are configured based on the platform
15-
the installer is running on: on Windows, it builds the MSI; on another platform,
14+
Alternatively, the `s3-upload` task's mappings are configured based on the platform
15+
the installer is running on. On Windows, it builds the MSI; on another platform,
1616
it'll create and upload the other packages in the above list. (Use `s3Upload::mappings` for a dry-run.)
1717

1818
The version of Scala to package is derived from the most recent git tag,
1919
or you can specify it using `-Dproject.version`.
2020

21-
This packager only works for Scala 2.11 releases (starting with M8) or newer,
21+
This packager only works for Scala 2.11+ releases (starting with M8),
2222
as earlier ones did not publish the `scala-dist` artifact to maven.
2323

24-
Due to limited resources, the native packages are quite rudimental -- we welcome new maintainers!
24+
Due to limited resources, the native packages are quite rudimentary.
25+
We welcome new maintainers!
2526

2627
## Legacy
2728
If you're looking for the editor configurations that used to be in the tool-support directory, please see https://github.com/scala/scala-tool-support.
28-
They were moved out because they no longer ship with the Scala distribution (you're welcome to take over the scala-tool-support project!).
29+
They were moved out because they no longer ship with the Scala distribution. (New maintainers are welcome on the scala-tool-support project!)
2930

3031
The specification also used to be in this repo -- it is now a part of the main repository over at [scala/scala](https://github.com/scala/scala/tree/2.11.x/spec).
3132

3233
## Windows VM
33-
- install windows 7 professional N 64-bit, ensure network access to github
34-
- install oracle java 6 jdk
35-
- install wix v3.6 (reboot!)
36-
- download sbt launcher 0.13.1 from xsbt.org to c:\users\jenkins\Downloads
37-
- install git
38-
- configure the jenkins master's tool locations for
34+
- install Windows 7 professional N 64-bit, ensure network access to GitHub
35+
- install Oracle Java 6 JDK
36+
- install WiX v3.6 (reboot!)
37+
- download sbt launcher 0.13.1 from xsbt.org to `c:\users\jenkins\Downloads`
38+
- install Git
39+
- configure the Jenkins master's tool locations for
3940
- HOME
40-
- jdk path
41-
- git (path of git.exe)
41+
- JDK path
42+
- Git (path of git.exe)
4243
- sbt launch jar
4344

44-
4545
## Contributing ##
4646
Please read the [Scala Pull Request Policy](https://github.com/scala/scala/wiki/Pull-Request-Policy)
4747
and sign the [CLA](http://typesafe.com/contribute/cla/scala).
4848

49-
The branching structure mimics that of [scala/scala](https://github.com/scala/scala).
49+
The branching structure mimics that of [scala/scala](https://github.com/scala/scala):
50+
branches for 2.11.x, 2.12.x, etc.
51+

build.sbt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ Docs.settings
2323

2424
ScalaDist.platformSettings
2525

26+
enablePlugins(UniversalPlugin, RpmPlugin, JDebPackaging)
27+
2628
// resolvers += "local" at "file:///e:/.m2/repository"
2729
// resolvers += Resolver.mavenLocal
28-
// to test, run e.g., stage, or windows:packageBin, show s3-upload::mappings
30+
// to test, run e.g., stage, or windows:packageBin, show s3-upload::mappings

conf/repositories

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[repositories]
2-
plugins: http://dl.bintray.com/sbt/sbt-plugin-releases/, [organisation]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
32
private-repo: https://scala-ci.typesafe.com/artifactory/scala-release-temp/
4-
typesafe-ivy-releases: http://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly
5-
sbt-plugin-releases: http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
3+
jcenter-cache: https://scala-ci.typesafe.com/artifactory/jcenter/
4+
typesafe-ivy-releases: https://dl.bintray.com/typesafe/ivy-releases/, [organisation]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly
5+
sbt-plugin-releases: https://dl.bintray.com/sbt/sbt-plugin-releases/, [organisation]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
66
maven-central
77
local

project/ScalaDist.scala

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import sbt._
22
import sbt.Keys._
33

44
import com.typesafe.sbt.SbtNativePackager._
5+
import com.typesafe.sbt.packager.MappingsHelper._
6+
import com.typesafe.sbt.packager.universal.UniversalPlugin.autoImport.useNativeZip
57
import com.typesafe.sbt.packager.Keys._
68

79
import com.typesafe.sbt.S3Plugin.S3.upload
@@ -37,7 +39,6 @@ object ScalaDist {
3739
)
3840

3941
def settings: Seq[Setting[_]] =
40-
packagerSettings ++
4142
useNativeZip ++ // use native zip to preserve +x permission on scripts
4243
Seq(
4344
name := "scala",
@@ -69,19 +70,16 @@ object ScalaDist {
6970
case "scala-dist" =>
7071
val tmpdir = IO.createTemporaryDirectory
7172
IO.unzip(file, tmpdir)
72-
// IO.listFiles(tmpdir) does not recurse, use ** with glob "*" to find all files
73-
(PathFinder(IO.listFiles(tmpdir)) ** "*").get flatMap { file =>
74-
val relative = IO.relativize(tmpdir, file).get // .get is safe because we just unzipped under tmpdir
75-
76-
// files are stored in repository with platform-appropriate line endings
77-
// if (onWindows && (relative endsWith ".bat")) toDosInPlace(file)
7873

74+
// create mappings from the unzip scala-dist zip
75+
contentOf(tmpdir) filter {
76+
case (file, dest) => !(dest.endsWith("MANIFEST.MF") || dest.endsWith("META-INF"))
77+
} map {
7978
// make unix scripts executable (heuristically...)
80-
if ((relative startsWith "bin/") && !(file.getName endsWith ".bat"))
79+
case (file, dest) if (dest startsWith "bin/") && !(dest endsWith ".bat") =>
8180
file.setExecutable(true, true)
82-
83-
if (relative startsWith "META-INF") Seq()
84-
else Seq(file -> relative)
81+
file -> dest
82+
case mapping => mapping
8583
}
8684

8785
// core jars: use simple name for backwards compat

project/Unix.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import sbt.Keys._
44
import com.typesafe.sbt.SbtNativePackager._
55
import com.typesafe.sbt.packager.Keys._
66
import com.typesafe.sbt.packager.linux.{LinuxPackageMapping => pkgMap, LinuxSymlink}
7+
import com.typesafe.sbt.packager.linux.LinuxPlugin.autoImport.packageMapping
78

89
/** Create debian & rpm packages.
910
*
@@ -87,7 +88,7 @@ object Unix {
8788

8889
// Debian Specific
8990
name in Debian := "scala",
90-
debianPackageDependencies += "openjdk-7-jre-headless | java-runtime-headless",
91+
debianPackageDependencies += "java8-runtime-headless",
9192
// debianPackageDependencies += "libjansi-java",
9293

9394
linuxPackageMappings in Debian += (packageMapping(
@@ -96,5 +97,6 @@ object Unix {
9697

9798
// Hack so we use regular version, rather than debian version.
9899
target in Debian := target.value / s"${(name in Debian).value}-${version.value}"
100+
99101
)
100102
}

project/plugins.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "0.6.4")
1+
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.0.4")
22

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

0 commit comments

Comments
 (0)