Replace %define macro with %global.

See
https://fedoraproject.org/wiki/Packaging:Guidelines#.25global_preferred_over_.25define
Switch from RPM_BUILD_ROOT to %buildroot. It's shorter.
Set dependency file location for Fedora. Simplify some macros.
Fix new deps management style to work under Fedora.