Packaging MATLAB (or, more generally, a large binary, proprietary piece of software)

Posted by nfirvine on Ask Ubuntu See other posts from Ask Ubuntu or by nfirvine
Published on 2012-10-03T21:06:08Z Indexed on 2012/10/03 21:55 UTC
Read the original article Hit count: 203

Filed under:
|

I'm trying to package MATLAB for internal distribution, but this could apply to any piece of software with the same architecture. In fact, I'm packaging multiple releases of MATLAB to be installed concurrently. Key things

  • Very large installation size (~4 GB)
  • Composed of a core, and several plugins (toolboxes)

Initially, I created a single "source" package (matlab2011b) that builds several .debs (mainly matlab2011b-core and matlab2011b-toolbox-* for each toolbox). The control file is just the standard

all:
 dh $@

There is no Makefile; only copying files. I use a number of debian/*.install files to specify files to copy from a copy of an installation to /usr/lib/.

The problem is, every time I build the thing (say, to make a correction to the core package), it recopies every file listed in the *.install file to e.g debian/$packagename/usr/ (the build phase), and then has to bundle that into a .deb file. It takes a long time, on the order of hours, and is doing a lot of extra work.

So my questions are:

  • Can you make dh_install do a hardlink copy (like cp -l) to save time? (AFAICT from the man page, no.) Maybe I should just get it to do this in the Makefile? (That's gonna b e big Makefile.)
  • Can you make debuild only rebuild .debs that need rebuilding? Or specify which .debs to rebuild?
  • Is my approach completely stupid? Should I break each of the toolboxes into its own source package too? (I'll have to do some silly templating or something, because there's hundreds of them. :/)

© Ask Ubuntu or respective owner

Related posts about packaging

Related posts about dh-make