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'm trying to create an Ubuntu package for testing, and stick to the rules given at

As this is CMake build and I need to adapt the arguments to cmake, I'm using

include /usr/share/cdbs/1/class/

in debian/rules. Unfortunately, when I then call debuild I get the error message

$ debuild
dh cleanbuilddir
dh: Unknown sequence cleanbuilddir (choose from: binary binary-arch binary-indep build build-arch build-indep clean install install-arch install-indep)
make: *** [cleanbuilddir] Error 255
dpkg-buildpackage: error: fakeroot debian/rules clean gave error exit status 2
debuild: fatal error at line 1350:
dpkg-buildpackage -rfakeroot -D -us -uc failed

Where is cleanbuilddir defined, or: Why does it fail here?

share|improve this question
up vote 4 down vote accepted

The mistake was, while the CDBS header /usr/share/cdbs/1/class/ was included, the default target

   dh $@

was still present in the file. Commenting out the later makes debuild run fine.

share|improve this answer

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.