Upstream archive is sometimes missing a license file and may have it as an extra file in srpm for a workaround. Although we should try to contact upstream to include it there, writing "%global fontlicenses %{SOURCEn}" for the time being looks intuitive to me. However it doesn't work as expected:
error: File not found: /var/home/tagoh/rpmbuild/BUILD/twr-mint-mono-fonts-0.0.1-build/BUILDROOT/var/home /tagoh/rpmbuild/SOURCES/LICENSE
Apparently fonts-rpm-macros is simply adding _sourcedir to the license file. Should it stop adding _sourcedir if %fontlicenses has the absolute path and it is same to _sourcedir (to avoid a security risk)?
This can be worked around by cp %{SOURCEn} . at the setup time and just put a filename only in %fontlicenses though.
cp %{SOURCEn} .
I feel this is something that could be handled by fontrpmspec perhaps?
fontrpmspec
But perhaps some macro could also handle it, dunno
I think use cp is the usual idiom for this, yes.
cp
I don't mind either but if we decide it is not a bug, we should raise more user-friendly error message for this not like just the above. it is quite hard to see what was wrong. e.g. fonts-rpm-macros doesn't accept the absolute path for fontlicenses etc. or even good to say about %{SOURCEn} macro directly.
This issue has been migrated to Fedora Forge: https://forge.fedoraproject.org/i18n/fonts-rpm-macros/issues/28
Please continue any further discussion there.
Metadata Update from @pnemade: - Issue status updated to: Closed (was: Open)