package-notes/macros.package-notes-srpm
Zbigniew Jędrzejewski-Szmek 04c3c7d716 Use $RPM_PACKAGE_VERSION variable to refer to the package version
When subpackages are used, and have different Version fields, we end up with
the version of the last subpackage in %version. But RPM_PACKAGE_VERSION is
set early, and seems to have the right version.

Fixes rhbz#2043143.
2022-01-21 17:01:16 +01:00

9 lines
622 B
Plaintext

# Add an ELF note with information about the package the code was compiled for.
# See https://fedoraproject.org/wiki/Changes/Package_information_on_ELF_objects
# for details.
%_package_note_file %{_builddir}/.package_note-%{name}-%{version}-%{release}.%{_arch}.ld
%_package_note_flags %{?_package_note_file:%{?name:-Wl,-dT,%{_package_note_file}}}
%_generate_package_note_file %{?_package_note_file:%{?name:if [ -f %{_rpmconfigdir}/generate-rpm-note.sh ]; then %{_rpmconfigdir}/generate-rpm-note.sh ${RPM_PACKAGE_NAME:?} ${RPM_PACKAGE_VERSION:?}-${RPM_PACKAGE_RELEASE:?} ${RPM_ARCH:?} >%{_package_note_file}; fi}}