I try to customize and rebuild a Debian source package by adding some additional source files (not included in the upstream archive) and applying some patches. More specifically, I try to customize Ubuntu "ppp" package by adding a custom plugin. I do the following:
1) I download and unpack source package with "apt-get source ppp"
2) I go into "ppp-x.x.x" subtree and rebuild the package cleanly with "dpkg-buildpackage -uc" to make sure that everything is ok with the source package. (And actually everything is ok for now).
3) Now I take my custom patches and place them into "debian/patches" subfolder of the "debian" subtree. Then I reference them in "debian/patches/series" file. I also take my custom source files, all in a single folder, say "tacacs", and place this folder into the "debian/extra" subfolder. I am not sure that I should place them exactly there but I don't see any more suitable place for them.
4) Now I try to run "dpkg-buildpackage -uc" again to build a custom package. And I see the following:
- "dpkg-buildpackage/dpkg-source/quilt" tries to apply my custom patches to my custom sources and cannot find them. So it fails and the build fails altogether.
- After the build fails and stops I can see my custom plugin ("tacacs") subfolder in the build tree but it is empty. So it is not surprise that patch failed.
So the question is: where should I place my custom source files and what else should I do to make "dpkg-source -b" see them and inject them to the build tree?