> I don't know what you mean with debian has tools for building - I thought I
> knew at least enough. And what I knew was sufficient to create/modify/build
> debian packages for some years now. It is also easy for me to understand
> why the rules file works. It is not easy to understand why in the case of
> tdepim it is necessary to go this way. Thanks for the motivation to try it
> and for the explanation.
Building from source and then creating packages requires a lot of work. Debian/Ubuntu provides tools that automate most
of it, you just need to learn a few basic commands.
See here for some intro: https://www.debian.org/doc/manuals/maint-guide/build.en.html
Usually you build with dpkg-buildpackage or pbuilder, these are programs that take care of everything (config, checking
dependencies, compiling, packaging, linting, ....). Moreover with pbuilder you can quickly build in a clean chroot
environment, making sure you always build everything correctly.
It is really worth spending the time required to learn to compile/build in the Debian way, you will save much more time