Debian – building Debian package with non-standard options

compilingconfiguredebiandpkgpackage-management

I would like to build Debian package from source, using dpkg-buildpackage. I have downloaded package source:

apt-get -t wheezy-backports source gnucash

Inside the file gnucash-2.6.9/configure I see, that there are options which can be selected/deselected when building the package.

Debian maintainer has already made the decision for me. But if I want disable some options, how should I do it?

Lets say, I want to compile the package without --enable-aqbanking. This option appears in several configuration files:

$ grep -rl enable-aqbanking gnucash-2.6.9/
gnucash-2.6.9/packaging/gnucash.spec
gnucash-2.6.9/packaging/gnucash.spec.in
gnucash-2.6.9/configure.ac
gnucash-2.6.9/configure

Which of those should I edit?

What is the proper way to do it?

Best Answer

OK, take a look at gnucash-2.6.x/debian/rules.

Find the line that says override_dh_auto_configure: (line 23 in my case), and add your overrides below it.

In your case --enable-aqbanking is already there (for wheezy-backports at least), so simply delete it.

More info can be found in the man page.

Update: In addition, sometimes there's a variable in the rules file responsible for passing custom stuff to configure. It's usually at the top of the file and is called DEB_CONFIGURE_EXTRA_FLAGS.

Related Question