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 a package that needs to be build with both a regular makefile and a The thing is that the Debian packaging magic that is invoked via debuild would recognize a makefile and do the right

make install DESTDIR=???

thing and get it working right. When I only have a sitting there and have dh $@ --with python3 --buildsystem pybuild in debian/rules, it will correctly install the Python module with

python3 build
python3 install --install-layout deb --root=??? ???

I do not know all those flags. And I think that I do not need to. I just want the makefile magic to happen, and then the magic.

How can I tell debuild to do both?

When I do the following in debian/rules

        dh $@
        dh $@ --with python3 --buildsystem pybuild

it will only put the first one into the resulting package. I tried to delete the debhelper.log between those, but that did not change much.

share|improve this question
up vote 2 down vote accepted

You can use both but in that case your debian/rules will exclusively use overrides:

#!/usr/bin/make -f

    dh $@ --with=python3

    make universe-explode-in-delight
    cd python_src && python3 build

    cd python_src && python3 test

    cd python_src && python3 install \
        --force --root=$(CURDIR)/debian/tmp \
        --no-compile -O0 --install-layout=deb
    make install_non_python_stuff

    cd python_src && python3 clean


share|improve this answer
I changed the destination directory to $(CURDIR)/debian/PACKAGENAME, but it works otherwise. – Martin Ueding May 28 '14 at 6:51

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.