octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: octave packages


From: David Bateman
Subject: Re: octave packages
Date: Tue, 25 Sep 2007 03:01:29 +0200
User-agent: Thunderbird 1.5.0.7 (X11/20060921)

Orion Poplawski wrote:
> 
> Trying to use these patches (to pkg.m and package_Makefile) , but I'm
> still seeing everything end up it /usr/share/octave/packages.  Are we
> missing setting -global?  Also, it looks like the oct files would go to
> /usr/libexec/octave/packages on 32-bit as well as 64-bit with this patch.


Opps, some of the logic (the bit that put it all in one place) was
repeated in the RPM Makefile.. Try the attached version of the patch
instead..

D.
Index: packages/package_Makefile.in
===================================================================
RCS file: /cvsroot/octave/octave-forge/packages/package_Makefile.in,v
retrieving revision 1.2
diff -u -r1.2 package_Makefile.in
--- packages/package_Makefile.in        24 Sep 2007 15:15:02 -0000      1.2
+++ packages/package_Makefile.in        25 Sep 2007 00:59:52 -0000
@@ -18,21 +18,7 @@
        fi
 
 package: build
-       @if [ -d src ]; then \
-         cd src; \
-         if [ -e FILES ]; then \
-           files=`cat FILES`; \
-         else \
-           files=`ls *.mex *.oct 2> /dev/null`; \
-         fi; \
-         if [ ! -d ../inst ]; then \
-           mkdir ../inst; \
-         fi; \
-         cp -rf $$files ../inst; \
-         cd ../; \
-       fi; \
-       cd ../; \
-       tar --exclude='$(PKGDIR)/src' -czf $(PACKAGE) $(PKGDIR);
+       @cd ../; tar -czf $(PACKAGE) $(PKGDIR);
 
 install:
        @cd ../; \
@@ -43,11 +29,16 @@
          pkgdir=`octave -H -q --no-site-file --eval 
"warning('off','all');pkg('install','$(PACKAGE)');l=pkg('list');disp(l{cellfun(@(x)strcmp(x.name,'$(PKG)'),l)}.dir);$$stripcmd;"`;
 \
        else \
          shareprefix=$(DESTDIR)/`octave -H -q --no-site-file --eval 
"disp(fullfile(OCTAVE_HOME(),'share','octave'));"`; \
+         libexecprefix=$(DESTDIR)/`octave -H -q --no-site-file --eval 
"disp(fullfile(OCTAVE_HOME(),'libexec','octave'));"`; \
          octprefix=$$shareprefix/packages; \
+         archprefix=$$libexecprefix/packages; \
          if [ ! -e $$octprefix ]; then \
            mkdir -p $$octprefix; \
          fi; \
-         pkgdir=`octave -H -q --no-site-file --eval 
"warning('off','all');pkg('prefix','$$octprefix');pkg('global_list',fullfile('$$shareprefix','octave_packages'));pkg('local_list',fullfile('$$shareprefix','octave_packages'));pkg('install','$(PACKAGE)');l=pkg('list');disp(l{cellfun(@(x)strcmp(x.name,'$(PKG)'),l)}.dir);$$stripcmd;"`;
 \
+         if [ ! -e $$archprefix ]; then \
+           mkdir -p $$archprefix; \
+         fi; \
+         pkgdir=`octave -H -q --no-site-file --eval 
"warning('off','all');pkg('prefix','$$octprefix','$$archprefix');pkg('global_list',fullfile('$$shareprefix','octave_packages'));pkg('local_list',fullfile('$$shareprefix','octave_packages'));pkg('install','$(PACKAGE)');l=pkg('list');disp(l{cellfun(@(x)strcmp(x.name,'$(PKG)'),l)}.dir);$$stripcmd;"`;
 \
        fi; \
        if [ "X${DISTPKG}X" != "XX" ]; then \
          if [ -e $$pkgdir/packinfo/on_uninstall.m ]; then \

reply via email to

[Prev in Thread] Current Thread [Next in Thread]