Split the C++ version into a binary with library

Also, update the RPM spec. The deb build rules may still need updated.