octave-maintainers
[Top][All Lists]
Advanced

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

pkg.m and binary files


From: Ólafur Jens Sigurðsson
Subject: pkg.m and binary files
Date: Thu, 13 Dec 2007 00:56:05 +0100
User-agent: Mutt/1.5.16 (2007-06-11)

Hi

When trying to package some octave-forge packages for debian I ran
into trouble with the binary files and the placement of them.

When as normal user I try to make a debian package of an octave-forge
package then it works fine but as root it does not.

This is because when we make a debian package we recreate the
root directory structure of the system under a directory where the
package is being built and then the "octave --eval pkg install"
misplaces the binaries.

Lets take an example:

I am packaging octcdf and am doing it in the directory
~/octave-forge/octcdf

then I create the directory debian inside that so it becomes
~/octave-forge/octcdf/debian
and in that I place some control files that dictate how the packaging
is supposed to be done. Then I call dpkg-buildpackage and that creates
a directory inside ~/octave-forge/octcdf/debian that is called by the
name of the package, in this case lets call it octave-octcdf and under
that directory the dpkg-buildpackage places the usr/share/octave
directory and everything that I tell it to put there through a file
called rules placed in ~/octave-forge/octcdf/debian.

Now in this rules files I call octave to build my octcdf-1.0.6.tar.gz
by using 

octave -H -q --no-site-file --eval \
"pkg('prefix',[pwd(),'/debian/octave-octcdf/usr/share/octave/packages']); \
 pkg('local_list',[pwd(),'.']); \
 pkg('global_list',[pwd(),'.']); \
 pkg install octcdf-1.0.6.tar.gz"
 
and this installes everything (including the binaries) into
/debian/octave-octcdf/usr/share/octave/packages/octcdf-1.0.6/

but if I do this as root then the binaries are not installed there but
into /usr/lib/octave/packages/octcdf-1.0.6/i486-pc-linux-gnu-api-v29
which is not what I want. I want it to go into
~/octave-forge/octcdf/debian/octave-octcdf/usr/lib/octave/packages/octcdf-1.0.6/i486-pc-linux-gnu-api-v29
insted.

So when I call octave with pkg install, is it possible to tell it
where to put the binaries?

I really dont want to have to go into each and every tarball from the
forge and change the makefiles :-)

Best regards

Oli


reply via email to

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