octave-maintainers
[Top][All Lists]
Advanced

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

Re: Octave Packaging


From: David Bateman
Subject: Re: Octave Packaging
Date: Tue, 12 Jun 2007 10:23:52 +0200
User-agent: Thunderbird 1.5.0.7 (X11/20060921)

Paul Kienzle wrote:
>
> On Jun 11, 2007, at 11:51 AM, David Bateman wrote:
>
>> Thomas,
>>
>> I think this thread needs to be opened for wider discussion. As you
>> are basically question the need for Octave to have a package manager
>> at all.  This is something that was extensively discussed over the
>> last few years and the consensus was that it is something that is
>> needed to make distribution of software for Octave easier for users.
>> This goal should also make distribution not difficult for debian either.
>
> Thomas,
>
> Here's a suggestion:  you could write a generic configure script (not
> generated by autoconf) and Makefile which call the octave package
> manager to do the work.  These could be inserted automatically by the
> pkg dist command.  This would also work for bundles of packages.
>
> Having these files means that the sysadmin who doesn't know the
> details of Octave but still needs to support her users can write:
>
>     ./configure; make; make install
>
> as usual and have everything just work (after resolving dependencies).
>
> Hopefully we can handle the scaling problem nicely as the number of
> packages goes up, though this will mean including even more features
> (e.g., centralized distribution and dependencies) that are currently
> handled by Linux distributions.
>
>     - Paul
>
>

Paul,

The configure and make steps of this would be simple and could look
something like

if [ -e src/configure ]; then
  cat << EOF > configure
cd src
./configure $*
EOF
fi

cat << EOF > Makefile
all:
    make -C src
EOF

in the top directory of the package.. However, the question is then how
to install such a prebuilt package, which might get a little messy. Not
impossible though. It might look something like
  
install:
    @if [ -d src ]; then \
      if [ -e src/FILES ]; then \
        files=`cat FILES`; \
      else \
        files=`ls *.mex *.oct`; \
      fi; \
      if [ ! -d ../inst ]; then \
        mkdir ../inst; \
      fi; \
      for file in $$files; do \
        cp $$file ../inst; \
      done; \
      cd ../; \
      rm -fr src; \
    fi; \
    package=`pwd | sed -e 's|^.*/||'`; \
    tar czCf ../ /tmp/$$package.tar.gz $$package; \
    octave -H -q --no-site-file --eval
"warning('off','all');pkg('install','-global','/tmp/$$package.tar.gz')"; \
    rm /tmp/$$package.tar.gz

Thomas if the octave-forge packages, contained such a configure and
makefile, so that you could do "./configure; make; make install" on
them, that would keep you happy? This would be relatively trivial to add
to the packages..

I don't think we should make this a requirement for all Octave packages
however, as it means that the arbitrary user needs to do additional work.

D.

-- 
David Bateman                                address@hidden
Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph) 
Parc Les Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob) 
91193 Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax) 

The information contained in this communication has been classified as: 

[x] General Business Information 
[ ] Motorola Internal Use Only 
[ ] Motorola Confidential Proprietary



reply via email to

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