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

Re: [Pkg-octave-devel] Dynare



* Sébastien Villemot <sebastien.villemot@ens.fr> [2009-03-26 18:33]:

> In order to make the right decision for the directory structure of the  
> package, I must detail somewhat the structure of Dynare as we use for  
> the moment.
> 
> [...]

Thanks for the thorough analysis and the alternatives for adapting dynare to
be a "clean" Octave package.

I looked more closely into the package structure.  I think it is possible
to make two minimal changes in order to get it working out of the box for
Octave.  

The first change regards putting dynare_config in the Octave's.  The
patch for debian/rules that do this respecting the guidelines of the DOG
is attached below.

Second, dynare_config.m must itself be patched in order to have:

    dynareroot = '/usr/lib/dynare/matlab/'

There is another thing that can be improved in the package.  All the .m
files are installed in /usr/lib/dynare/matlab/.  According to the FHS
[1], such architecture-independent files must be installed in /usr/share
instead.  If this is done, the dynare package should be split into a
dynare package containing the .mex files and a dynare-common package with
arch:all containing the .m files.  This is done with octave3.0 and
octave3.0-common, BTW.

[1] http://www.pathname.com/fhs/

-- 
Rafael
Index: debian/rules
===================================================================
--- debian/rules	(revision 2768)
+++ debian/rules	(working copy)
@@ -1,7 +1,10 @@
 #!/usr/bin/make -f
 
 include /usr/share/dpatch/dpatch.make
+include /usr/share/octave/debian/defs.make
 
+debdir = $(CURDIR)/debian/dynare
+
 build: build-stamp
 build-stamp: patch-stamp
 	dh_testdir
@@ -33,6 +36,7 @@
 
 binary-arch: build
 	dh binary-arch
+	mv $(debdir)/usr/lib/dynare/matlab/dynare_config.m $(debdir)/$(MDIR)
 
 binary-indep: build
 	dh binary-indep

Reply to: