Thank you, in this case I seem to be lucky then. But what about software that has no .spec file yet? Is there a simple checkinstall-like way to get a .rpm out of an arbitrary build-command?
I don’t know of any way/software to auto-generate a .spec file. But I’m not a packager. You might find people more knowledgeable about such things in Feodra’s “devel” Matrix channel.
Checkinstall is limited in what it can do. To be precise, the packages it creates can only install files, and checkinstall does not care where it installs them. You can overwrite files in /home directories with checkinstall, among other things. The generated packages can not modify files. If the installation routine modifies existing files, they will be part of the generated package in their entirety.
A horror scenario occurs when an installation routine adds a user by modification of /etc/passwd, which is subsequently included in the package. Installation of the package causes /etc/passwd to be completely replaced, and the deinstallation of the package removes the file, breaking the system in half.
The generated packages also fail to register their configuration files with dpkg, therefore paving the way for upgrades that overwrite local configuration file changes.