changeset 2651:4ea46b848cf2 octave-forge

No longer have global OCTAVE_PACKAGE_PREFIX. Use the 'prefix' directive to pkg to replae it
author adb014
date Mon, 09 Oct 2006 23:15:18 +0000
parents ee8246279730
children c6031fa3abe1
files packages/Makefile www/build-www.py
diffstat 2 files changed, 9 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/packages/Makefile	Mon Oct 09 23:13:31 2006 +0000
+++ b/packages/Makefile	Mon Oct 09 23:15:18 2006 +0000
@@ -59,7 +59,7 @@
 	@echo "Running test code for $(opkg) and its dependencies" ; \
 	cd sandbox; \
 	$(TOPDIR)/admin/mktests.sh code; \
-	$(RUN_OCTAVE) --eval "pkg('load','all');addpath(genpath('./'),'-end');fntests" ; \
+	$(RUN_OCTAVE) --eval "pkg('prefix',[pwd(),'/install']);pkg('load','all');addpath(genpath('./'),'-end');fntests" ; \
 	if [ ! -e $(TESTLOG) ]; then touch $(TESTLOG); fi ; \
 	cat fntests.log >> $(TESTLOG); \
 	cd ..
@@ -74,11 +74,7 @@
 
 cleancheck/%:
 	@if [ -d sandbox/ ]; then rm -rf sandbox; fi ; \
-	mkdir sandbox; \
-	cd sandbox; \
-	echo "global OCTAVE_PACKAGE_PREFIX;" > .octaverc ; \
-	echo "OCTAVE_PACKAGE_PREFIX=[pwd() '/install'];" >> .octaverc ; \
-	cd ..
+	mkdir sandbox;
 
 # For now assume that there is only one version of the package for 
 # dependencies. Some version check code should be added!!
@@ -89,7 +85,7 @@
 	if [ ! -d code ]; then mkdir code; fi; \
 	cd code; tar xzf ../../$(opkg); cd ..; \
 	pkgs="'../$(opkg)'"; \
-	until $(RUN_OCTAVE) --eval "pkg('install',$$pkgs)" 2> baddeps; do \
+	until $(RUN_OCTAVE) --eval "pkg('prefix',[pwd(),'/install']);pkg('install',$$pkgs)" 2> baddeps; do \
 	  deps=`cat baddeps | grep " needs " | sed -e 's/^.*needs\s\+\(\S*\).*$$/\1/'`; \
 	  ops=`cat  baddeps | grep " needs " | sed -e 's/^.*needs\s\+\S*\s\+\(\S*\).*$$/\1/'`; \
 	  vers=`cat  baddeps | grep " needs " | sed -e 's/^.*\s\+\(\S*\)\s*$$/\1/'`; \
--- a/www/build-www.py	Mon Oct 09 23:13:31 2006 +0000
+++ b/www/build-www.py	Mon Oct 09 23:15:18 2006 +0000
@@ -3,6 +3,7 @@
 import sys
 import os
 import shutil
+import time
 
 ## This function parses a DESCRIPTION file
 def parse_description(filename):
@@ -95,7 +96,7 @@
             raise Exception("Can't create tarball"); 
         
         ## Run octave installation
-        command = 'global OCTAVE_PACKAGE_PREFIX="' + install_dir + '"; ';
+        command = 'pkg("prefix","' + install_dir + '"); ';
         command = command + 'pkg("install", "-nodeps", "' + tarball + '");';
         if (os.system("HOME=" + wd + "; octave -H -q --no-site-file --no-init-file --eval '" + command + "' > /dev/null 2>&1") != 0):
             os.system("ls -la " + install_dir);
@@ -108,9 +109,9 @@
         local_index.writelines(index.readlines());
         local_index.close();
         index.close();
-    
+
         ## Clean up
-        command = 'global OCTAVE_PACKAGE_PREFIX="' + install_dir + '"; ';
+        command = 'pkg("prefix","' + install_dir + '"); ';
         command = command + 'pkg("uninstall", "-nodeps", "' + desc['name'].lower() + '");';
         if (os.system("HOME=" + wd + "; octave -H -q --no-site-file --no-init-file --eval '" + command + "' > /dev/null 2>&1") != 0):
             os.system("rm -rf " + install_dir + " " + tarball);
@@ -139,7 +140,7 @@
     fid.write('      <tr><td>Package Author:</td><td>'     + desc["author"]     + "</td></tr>\n");
     fid.write('      <tr><td>Package Maintainer:</td><td>' + desc["maintainer"] + "</td></tr>\n");
     fid.write('      <tr><td colspan="2"><img src="../download.png" alt="Download"/>');
-    fid.write('<a href="__PACKAGE__/' + desc['name'].lower() + '-' + desc['version'] + '.tar.gz__PACKAGE_TRAILER__">Download this package</a></td></tr>\n');
+    fid.write('<a href="__PACKAGE__/' + desc['name'].lower() + '-' + desc['version'] + '.tar.gz?download">Download this package</a></td></tr>\n');
     fid.write('      <tr><td colspan="2"><img src="../doc.png" alt="Function Reference"/>');
     fid.write('<a href="../doc/' + desc['name'].lower() + '.html">Read package function reference</a></td></tr>\n');
     local = local_documentation(outdir, packdir);
@@ -292,7 +293,7 @@
                         index.write('...');
                     index.write('</p>\n');
                     index.write('<p class="package_link">&raquo; <a href="' + outdir + '/index.html">details</a> | ');
-                    index.write('<a href="__PACKAGE__/' + archiv + '__PACKAGE_TRAILER__">download</a></p>\n');
+                    index.write('<a href="__PACKAGE__/' + archiv + '?download">download</a></p>\n');
                     index.write('</div>\n');
                 except Exception, e:
                     print("Skipping " + p);