Automatic RPM rebuild after changes in git

Hi,

I would like to test latest espeak with additional modifications from non-official git repository (for new language testing).
So I use nice OBS service to create a tar ball from git repository.
But I don’t know how to automatize RPM rebuilding:
now after tar ball genaration - I have to modify spec file to determine new name of source file.

Maybe members of openSUSE forum knows how to automatize this process (for example, make weekly updates).

Now I use:

%define gitversion 1343759424

Source2: espeak-%{gitversion}.tar

I see, that service “set_version” exist, but I don’t know how to use it here. I need to change not “Version:” line, but variable “gitversion” (revision)