How can I define a source name so that if I set
%global prerelease beta1
the source name will expand to something like
pkgname-{version}.beta1
or with %global prerelease %{nil} will just be pkgname-{version} (without the ending dot)?
I tried with
pkgname-{version}{?prerelease:%{expand:.?{prerelease}}}
but that's clearly wrong as it's not working...
And, yes, I need prerelease to be just "beta1" and not ".beta1" because I need it in other parts of specfile.