[scala] 19/24: Added a 'scala' alternative
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Fri Jun 19 16:00:38 UTC 2015
This is an automated email from the git hooks/post-receive script.
ebourg-guest pushed a commit to branch master
in repository scala.
commit 1744d3f5ab676745e0a9b7de9c1299d7df8db595
Author: Emmanuel Bourg <ebourg at apache.org>
Date: Fri Jun 19 01:06:10 2015 +0200
Added a 'scala' alternative
---
debian/changelog | 2 ++
debian/scala.links | 12 ------------
debian/scala.postinst | 27 +++++++++++++++++++++++++++
debian/scala.prerm | 9 +++++++++
4 files changed, 38 insertions(+), 12 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 8b59188..e63ee27 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,8 @@ scala (2.11.6-2) UNRELEASED; urgency=medium
- Depend on libjline2-java instead of building an embedded copy of jline
- Require a Java 7+ runtime
- Refreshed debian/copyright
+ * Added a 'scala' alternative to support the co-installation
+ of multiple versions of Scala
* Install the files under /usr/share/scala-2.11 and follow the layout
of the upstream distribution
* Removed the JRE dependency of scala-library
diff --git a/debian/scala.links b/debian/scala.links
index 06a7f79..d8ac717 100644
--- a/debian/scala.links
+++ b/debian/scala.links
@@ -8,15 +8,3 @@ usr/share/java/scala-compiler.jar usr/share/scala-2.11/lib/scala
usr/share/java/scala-library.jar usr/share/scala-2.11/lib/scala-library.jar
usr/share/java/scala-reflect.jar usr/share/scala-2.11/lib/scala-reflect.jar
usr/share/java/scalap.jar usr/share/scala-2.11/lib/scalap.jar
-
-usr/share/scala-2.11/bin/fsc usr/bin/fsc
-usr/share/scala-2.11/bin/scala usr/bin/scala
-usr/share/scala-2.11/bin/scalac usr/bin/scalac
-usr/share/scala-2.11/bin/scaladoc usr/bin/scaladoc
-usr/share/scala-2.11/bin/scalap usr/bin/scalap
-
-usr/share/scala-2.11/man/man1/fsc.1.gz usr/share/man/man1/fsc.1.gz
-usr/share/scala-2.11/man/man1/scala.1.gz usr/share/man/man1/scala.1.gz
-usr/share/scala-2.11/man/man1/scalac.1.gz usr/share/man/man1/scalac.1.gz
-usr/share/scala-2.11/man/man1/scaladoc.1.gz usr/share/man/man1/scaladoc.1.gz
-usr/share/scala-2.11/man/man1/scalap.1.gz usr/share/man/man1/scalap.1.gz
diff --git a/debian/scala.postinst b/debian/scala.postinst
new file mode 100644
index 0000000..2f8038a
--- /dev/null
+++ b/debian/scala.postinst
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+set -e
+
+priority=2111
+basedir=/usr/share/scala-2.11
+
+case "$1" in
+ configure)
+ update-alternatives \
+ --install /usr/bin/scala scala $basedir/bin/scala $priority \
+ --slave /usr/bin/scalac scalac $basedir/bin/scalac \
+ --slave /usr/bin/scaladoc scaladoc $basedir/bin/scaladoc \
+ --slave /usr/bin/scalap scalap $basedir/bin/scalap \
+ --slave /usr/bin/fsc fsc $basedir/bin/fsc \
+ --slave /usr/share/man/man1/scala.1.gz scala.1.gz $basedir/man/man1/scala.1.gz \
+ --slave /usr/share/man/man1/scalac.1.gz scalac.1.gz $basedir/man/man1/scalac.1.gz \
+ --slave /usr/share/man/man1/scaladoc.1.gz scaladoc.1.gz $basedir/man/man1/scaladoc.1.gz \
+ --slave /usr/share/man/man1/scalap.1.gz scalap.1.gz $basedir/man/man1/scalap.1.gz \
+ --slave /usr/share/man/man1/fsc.1.gz fsc.1.gz $basedir/man/man1/fsc.1.gz
+ ;;
+
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/scala.prerm b/debian/scala.prerm
new file mode 100644
index 0000000..e4fb0aa
--- /dev/null
+++ b/debian/scala.prerm
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "remove" ] || [ "$1" = "deconfigure" ]; then
+ update-alternatives --remove scala /usr/share/scala-2.11/bin/scala
+fi
+
+#DEBHELPER#
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/scala.git
More information about the pkg-java-commits
mailing list