Also voidify the macros if we're on a noarch build
IIUC, the normal %ifarch syntax cannot be used, because the definition needs to be inline. The best I could find is %_target_cpu, which seems to be set to "noarch" for noarch builds.
This commit is contained in:
parent
04c3c7d716
commit
d32fe6caa2
@ -3,6 +3,6 @@
|
||||
# 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}}}
|
||||
%_package_note_flags %{?_package_note_file:%{?name:%["%_target_cpu" == "noarch"?"":"-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}}
|
||||
%_generate_package_note_file %{?_package_note_file:%{?name:%["%_target_cpu" == "noarch"?"":"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"]}}
|
||||
|
Loading…
Reference in New Issue
Block a user