Same comment as for Debian package. This is *not* how you compile a C program in a SPEC file. There are specific steps for configuring, building and installing, respect them.

Also, you must not install anything in /opt on the package builders.