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.
On Sun, Dec 15, 2024 at 3:47 AM Mattia Verga via packaging packaging@lists.fedoraproject.org wrote:
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.
%{?prerelease:.%{prerelease}} should work. That's what I do.
packaging@lists.fedoraproject.org