rpmbuild is the tool used to build RPMs:
rpmbuild -ba set-difference.spec
rpmbuild will parse the spec file (as we have seen), build the metadata header, build and install the program and finally build the archive.
In our case (-ba ), a binary and a source RPM are created. We can list the content of the binary to check it matches the %files section.
Installation (under /usr/local/bin ) is successful.