Search code examples
debianpackaging

How to specify the source dir for debian packaging "debian/rules"


I'm using the generated folder structure that dh_make generates. Everything is good as long as I mantain this structure:

./debian/
./debian/rules
./debian/<rest_of_files>
./Makefile

When I execute fakeroot debian/rules clean binary it does make clean && make && make install DESTDIR=properplace and everything works as my Makefile has those targets.

Now I wanted to move debian/rules to packaging/debian/rules but nothing works.
I try fakeroot packaging/debian/rules clean binary but that apparently looks for Makefile in ./packaging/ and not in $CWD

EDIT:
As others stated the build scripts don't like this, as a workaround I do this from the main makefile

package-debian:
ln -s packaging/debian debian
fakeroot debian/rules clean binary
rm debian

Solution

  • Don't do that. It's not supported. The debian directory must be under the top level.

    Even if you get it to work otherwise, which I doubt, everyone will hate you because it would break every tool in the world. ;-)