Use RPM macro for cmake, thread installs

Using the %cmake macro adds some defines to cmake that allow for proper
debuginfo extraction
Handle packages which already have a 'build' directory