Fix rpmbuild --nocheck if the %check section was omitted some of the file needed for packaging would not be generated, move the generation to the proper place.