The current RPM process involves executing cmake which builds the binaries, produces a stub RPM .spec and then calls rpmbuild which takes the build products and packages it up.
The other way to do it is to run rpmbuild against RPM spec file that calls cmake on the inside.
I resisted the idea previously because I didn't want to have to manually keep up with .spec and CONTROL files, as well as duplicating existing code (not to mention allowing easy support for OSX/Windows builds, if we want to go down that road). But looking around, it appears to not be too difficult to implement a "dist" target to handle the RPM/DEB cases in a not-difficult way:
The current RPM process involves executing cmake which builds the binaries, produces a stub RPM .spec and then calls rpmbuild which takes the build products and packages it up.
The other way to do it is to run rpmbuild against RPM spec file that calls cmake on the inside.
I resisted the idea previously because I didn't want to have to manually keep up with .spec and CONTROL files, as well as duplicating existing code (not to mention allowing easy support for OSX/Windows builds, if we want to go down that road). But looking around, it appears to not be too difficult to implement a "dist" target to handle the RPM/DEB cases in a not-difficult way:
https://github.com/BioPP/bppphyview/blob/master/CMakeLists.txt#L188