CVS: theedge/var/lib/lunar/functions build.lunar, 1.12, 1.13 download.lunar, 1.35, 1.36

Auke Kok sofar at lunar-linux.org
Wed Nov 26 20:52:15 GMT 2003


Update of /var/cvs/lunar/theedge/var/lib/lunar/functions
In directory dbguin.lunar-linux.org:/tmp/cvs-serv32020/var/lib/lunar/functions

Modified Files:
	build.lunar download.lunar 
Log Message:
lvu eert fix, adding prototype cpan module handling (ugly, yes)


Index: build.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/build.lunar,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- build.lunar	4 Oct 2003 20:19:43 -0000	1.12
+++ build.lunar	26 Nov 2003 20:52:13 -0000	1.13
@@ -250,12 +250,37 @@
 
 default_cvs_build() {
   debug_msg "default_cvs_build ($@)"
-  verbose_msg "running \"default_cvs_build\""
   default_cvs_config  &&
   default_make
 } > $C_FIFO 2>&1
 
 
+default_cpan_pre_build() {
+  debug_msg "default_cpan_pre_build ($@)"
+  mk_source_dir $SOURCE_DIRECTORY
+}
+
+
+default_cpan_build() {
+  debug_msg "default_cpan_build ($@)"
+  prepare_install
+  verbose_msg "running \"default_cpan_build\""
+  if [ ! -x /usr/bin/cpan ] ; then
+    return 1
+  fi
+  
+  CPAN_MODULE=${SOURCE_URL/cpan:\/\//}
+  echo "o conf cpan_root /var/state/lunar
+        o conf build_dir $SOURCE_DIRECTORY
+        o conf keep_source_where $SOURCE_CACHE/cpan
+	install $CPAN_MODULE
+	quit" | /usr/bin/cpan
+  RESULT=$?
+  rm_source_dir $SOURCE_DIRECTORY
+  return $RESULT
+} > $C_FIFO 2>&1
+
+
 default_post_build() {
   debug_msg "default_post_build ($@)"
   {

Index: download.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/download.lunar,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- download.lunar	4 Oct 2003 20:19:43 -0000	1.35
+++ download.lunar	26 Nov 2003 20:52:13 -0000	1.36
@@ -33,6 +33,11 @@
 ############################################################
 
 
+get_cpan() {
+  debug_msg "skipping cpan downloads for $@"
+}
+
+
 get_svn() {
   debug_msg "get_svn ($@)"
   if ! module_installed subversion ; then
@@ -307,16 +312,10 @@
       else
         get_svn $1 $2
       fi
-    elif [ "$1:0:7}" == "cpan://" ] ; then
-      # no way, this cannot be tru
-      #
-      # and it isn't, but I thought this would be a cute, simple way of
-      # fetching sources and possibly have 'CPAN' do all the work for us
-      # thereby not opposing the normal perl module modules (like File-Tail)
-      #
-      # TODO play with this
+    elif [ "${1:0:7}" == "cpan://" ] ; then
+      # skip CPAN modules here...
       :
-    elif [ "{$1:0:5}" == "file:" ] ; then
+    elif [ "${1:0:5}" == "file:" ] ; then
       # adding this since wget is a bitch and will not fetch this... sigh
       # this will copy file to $2... so you may use it as you like
       cp ${1/file:/} $2
@@ -407,6 +406,8 @@
 	elif [ "${URL:0:6}" == "svn://" ] ; then
 	  verbose_msg "trying to download \"$URL\""
 	  get_url $URL $SOURCE_CACHE/$SRC
+	elif [ "${URL:0:6}" == "cpan://" ] ; then
+	  verbose_msg "skipping CPAN downloads!!!"
 	else
 	  verbose_msg "Skipping download of \"$SRC\" for module \"$MODULE\" (in cache)"
 	  continue 2




More information about the Lunar-commits mailing list