Qmake_qt5 Macro in Rpm Spec

I got "Empty %files file /blah_blah_blah/debugfiles.list" errors when I package the same RPMs since I had upgraded my laptop from Fedora 23 to Fedora 24.

A quick Google redirected me into this old mail list. The hint is very important, which reads

That's an indication that you build with "wrong" compiler flags, which don't generate debug information in the binaries.

It then turns out there is a hidden macro %{qmake_qt5} that passes correct compiler flags and all those magic arguments. I found out this by checking out Qupzilla's official spec file on Fedora.

I'm not 100% sure why calling qmake-qt5 directly was OK on pre-F24 systems (RHEL 7, Fedora 21 to Fedora 23). But it's very likely that the necessary compiler flags that used to be included in global qmake.conf are now gone.

I can also confirm that this macro, %{qmake_qt5}, works on RHEL 7, Fedora 22 and Fedora 23.