Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have this package mypackage which is already bundled for Ubuntu. For setting the compiler, debian/rules contains


I would now like to extend the package in that I would like to add more targets in debian/control, namely libmypackage-openmpi, libmypackage-mpich2 and so forth. The only thing that would theoretically need changing in debian/rules is the compiler line above;


Is there a way in debian/rules to if-`else between the build targets and set DEB_CONFIGURE_SCRIPT_ENV dynamically?

If not, what's the appropriate way to deal with this?

share|improve this question
It would be useful if you could say what package it is. The best way to do it varies by package. You can also look at the existing packages in the archive that do this: hdf5, yorick, netpipe. They all take a fairly old manual style, doing everything explicitly. – tumbleweed Jan 27 '13 at 9:47
Thanks for the hint. I'm getting into the details of debhelper vs. cdbs vs. dh right now, and it seems indeed that cdbs isn't going to get me very far here. – Nico Schlömer Jan 28 '13 at 13:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.