It is simple to explain, but not so simple to do in a proper way.
If you compile software from source, you can install it without giving the package-manager knowledge of the installed software. This is the way you are doing it. But a better option would be to make a .deb-package from that software. You can use a tool like
checkinstall, but I don't know if that includes dependency-handling.
You also can package that software manually, you can learn how to do that
here.