[Lunar-commits] <moonbase> scala-bin: option for devel-docs and sources

Christian Krause wookietreiber at lunar-linux.org
Mon Aug 8 12:38:23 CEST 2011


commit 1fc4be6065788b2338401b7380b20550e7204138
Author: Christian Krause <wookietreiber at lunar-linux.org>
Date:   Mon Aug 8 12:38:23 2011 +0200

    scala-bin: option for devel-docs and sources
---
 zbeta/scala-bin/BUILD     |   10 +++++++---
 zbeta/scala-bin/CONFIGURE |    2 ++
 zbeta/scala-bin/DETAILS   |    3 +++
 zbeta/scala-bin/PRE_BUILD |    7 +++++++
 4 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/zbeta/scala-bin/BUILD b/zbeta/scala-bin/BUILD
index 63431d1..048e388 100644
--- a/zbeta/scala-bin/BUILD
+++ b/zbeta/scala-bin/BUILD
@@ -1,7 +1,11 @@
 (
 
   # remove *.bat files
-  rm -rf $SOURCE_DIRECTORY/bin/*.bat $SOURCE_DIRECTORY/src/ &&
+  rm -f $SOURCE_DIRECTORY/bin/*.bat &&
+
+  if [ "`get_module_config SRCS`" = "n" ] ; then
+    rm -rf $SOURCE_DIRECTORY/src/
+  fi
 
   prepare_install &&
 
@@ -10,8 +14,8 @@
   cp -r $SOURCE_DIRECTORY /usr/scala &&
 
   # symlink default and latest (like java)
-  ln -s /usr/scala/$MOD-$VER /usr/scala/latest  &&
-  ln -s /usr/scala/latest    /usr/scala/default &&
+  ln -sf /usr/scala/$MOD-$VERSION /usr/scala/latest  &&
+  ln -sf /usr/scala/latest        /usr/scala/default &&
 
   # bash completion
   install -d /etc/bash_completion.d &&
diff --git a/zbeta/scala-bin/CONFIGURE b/zbeta/scala-bin/CONFIGURE
new file mode 100644
index 0000000..ed5c77e
--- /dev/null
+++ b/zbeta/scala-bin/CONFIGURE
@@ -0,0 +1,2 @@
+mquery DOCS "Install devel-docs (API docs)?" n
+mquery SRCS "Install sources?" n
diff --git a/zbeta/scala-bin/DETAILS b/zbeta/scala-bin/DETAILS
index 299fe64..1f90f12 100644
--- a/zbeta/scala-bin/DETAILS
+++ b/zbeta/scala-bin/DETAILS
@@ -2,9 +2,12 @@
              MOD=scala
          VERSION=2.9.0.1
           SOURCE=$MOD-$VERSION.tgz
+         SOURCE2=$MOD-$VERSION-devel-docs.tgz
 SOURCE_DIRECTORY=$BUILD_DIRECTORY/$MOD-$VERSION
       SOURCE_URL=http://www.scala-lang.org/downloads/distrib/files/
+     SOURCE2_URL=$SOURCE_URL
       SOURCE_VFY=sha1:51bde0b984c1f0e77b88ab7aca78fec12fecfd72
+     SOURCE2_VFY=sha1:6944ed779c09a7f010de0e889862279d974f51e5
         WEB_SITE=http://www.scala-lang.org/
          ENTERED=20101128
          UPDATED=20110526
diff --git a/zbeta/scala-bin/PRE_BUILD b/zbeta/scala-bin/PRE_BUILD
new file mode 100644
index 0000000..bdde646
--- /dev/null
+++ b/zbeta/scala-bin/PRE_BUILD
@@ -0,0 +1,7 @@
+default_pre_build    &&
+cd $SOURCE_DIRECTORY &&
+
+if [ "`get_module_config DOCS`" = "y" ] ; then
+  unpack $SOURCE2 &&
+  mv scala-$VERSION-devel-docs $MOD-devel-docs
+fi


More information about the Lunar-commits mailing list