3

I try to build a single package from source using dpkg-buildpackage. At some point dh_auto_install is invoked and run make install DESTDIR=/somewhere/debian/package-name

Then dh_install is invoked but only search in . or debian/tmp but not in debian/package-name !

And I get something like:

dh_install: Cannot find (any matches for) "usr/include/*" (tried in ., debian/tmp)

How to make both of them use in the same dir ?

(There is no issue if I try to build multiple packages) (compat 9)

2
  • Shall I use dh_auto_install --destdir=debian/tmp or dh_install --sourcedir=debian/package-name or tweak rules or add un extra empty package or else ?
    – Nelstaar
    Nov 13, 2019 at 11:44
  • for the record dh_auto_install --destdir=debian/tmp also work.
    – Nelstaar
    Nov 13, 2019 at 14:27

1 Answer 1

3

I’m guessing your source package builds a single binary package; i.e., your debian/control has a single Package: stanza. In such situations, dh_auto_install installs files to debian/package, and the assumption then is that that is sufficient, i.e. all the files you need to install end up in the right place under debian/package once dh_auto_install completes.

dh_install is useful mostly for source packages building multiple binary packages: it takes files under debian/tmp or . and copies them to the appropriate target under debian/packageX.

In your case, since you’re trying to install usr/include/*, I suspect you don’t need dh_install at all — you should find the files you want to install ready and waiting in debian/package/usr/include. However, if you’re installing files under usr/include, you might be packaging a library, in which case you should change your debian/control file to create multiple binary packages (one for the library, one for the development files), and then dh_auto_install will install to debian/tmp and dh_install will work as you expect.

See also Dpkg dh_install: copy files from the build directory rather than the debian/tmp dir?

3
  • Reason for single package is it's a header only library.
    – Nelstaar
    Nov 13, 2019 at 13:39
  • 1
    Ah right, that makes sense, so you might not need dh_install at all then. Nov 13, 2019 at 13:45
  • Thanks @StephenKitt that helped me fix my header only package quickly :) A simple override_dh_install: with a blank line in the rules file, does the trick.
    – orzechow
    Feb 24, 2021 at 18:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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