How to pass custom options to configure when building a package with debuild?

18

9

Short background: I'm using Debian Sid. Currently the audacity package is conflicting with the pidgin package, because gstreamer0.10-plugins-bad are outdated. I'm trying to rebuild it, but one of the unit tests is failing as one plugin I don't need is causing a segfault. I need to disable these tests, and there's a configure option for that, but I don't know how to pass it.

So, how can I run configure with custom options? Either by passing them to debuild, or by editing some file in the debian directory? I only worked with Gentoo ebuilds so far, which are extremely simple compared to the Debian control files, which I still find completely undecipherable.

TestUser16418

Posted 2011-02-25T20:16:45.120

Reputation: 810

Answers

13

The debian/rules file is where configure would be called from.

Depending on the system used for that specific rules script, configure may or may not be directly executed in the file. If it is not then the system used by that package is detecting that it needs to execute it and doing so.

Additionally depending on the system used by the package, there may be a variable used in the rules file to define options passed to configure. If it exists it is likely near the top of the file and that would be the best place for you to make the change.

Arrowmaster

Posted 2011-02-25T20:16:45.120

Reputation: 626

3Thank you, in my case there seems to be DEB_CONFIGURE_EXTRA_FLAGS variable in rules that is passed to ./configure. – TestUser16418 – 2011-02-25T21:35:54.690

25

You can solve this by editing the debian/rules file. Add a new target to override dh_auto_configure at the end of the file. In the snippet below I override dh_auto_configure by changing configure's install prefix.

override_dh_auto_configure:
    dh_auto_configure -- --prefix=/opt/uruk

Note that you can replace --prefix=/opt/uruk with any configure option(s) that suites you.

For more info, check this man page.

mshamma

Posted 2011-02-25T20:16:45.120

Reputation: 371