Patch 2

I have been testing your genrpm.sh and spec file on an AmazonLinux VM box and have found that the following modifications are required for the RPMs to be built successfully:

1) The BuildRoot must be explicitly specified on the command-line in genrpm.sh, as all Fedora-derived distros ignore the BuildRoot directive if it is only altered in the spec file.

2) The order of what copying and deletions are done in the %build stage and what is done in the %install stage of the spec file had to be changed, as at the beginning of the %install stage the BuildRoot is "rm -rf"ed.

The patch-2 branch has the above changes made and is currently being used by me to create the Steam RPM repository here:
http://54.247.164.98:8440/steam/