This is an attempt at the former pull request - #7588 (comment) - as a single commit.
The RPM package manager is used by several Linux distributions.
This provides an RPM spec file that is clean and builds properly on CentOS 7 (RHEL 7 clone) and should hopefully easily facilitate building RPM packages on other platforms as well.
It defaults to building against OpenSSL and the Qt5 GUI toolkit, but it supports switches that allow easily building against LibreSSL and/or Qt4 and/no no GUI.
See the README.md file in the contrib/rpm directory for more details.