Fix update-alternatives macro expansion in flatpak module builds

Avoid using %{_sbindir}/update-alternatives in requires and scriptlets
as it expands to /app/sbin/update-alternatives when building flatpak
modules and not to /usr/sbin where the binary is actually installed in.
epel8
Kalev Lember 6 years ago
parent a713dad573
commit b72e5fd82f

@ -87,8 +87,8 @@ ranging from networking to HTML display and image manipulation.
%package -n %{wxbasename}-devel
Summary: Development files for the wxBase3 library
Requires: %{wxbasename}%{?_isa} = %{version}-%{release}
Requires(post): %{_sbindir}/update-alternatives
Requires(postun): %{_sbindir}/update-alternatives
Requires(post): /usr/sbin/update-alternatives
Requires(postun): /usr/sbin/update-alternatives
%description -n %{wxbasename}-devel
This package include files needed to link with the wxBase3 library.
@ -357,15 +357,15 @@ popd
if [ -f %{_bindir}/wx-config ] && [ ! -h %{_bindir}/wx-config ] ; then
rm %{_bindir}/wx-config
fi
%{_sbindir}/update-alternatives --install %{_bindir}/wx-config \
/usr/sbin/update-alternatives --install %{_bindir}/wx-config \
wx-config %{_libexecdir}/%{name}/wx-config 3
%{_sbindir}/update-alternatives --install %{_bindir}/wxrc \
/usr/sbin/update-alternatives --install %{_bindir}/wxrc \
wxrc %{_libexecdir}/%{name}/wxrc 3
%postun -n %{wxbasename}-devel
if [ $1 -eq 0 ] ; then
%{_sbindir}/update-alternatives --remove wx-config %{_libexecdir}/%{name}/wx-config
%{_sbindir}/update-alternatives --remove wxrc %{_libexecdir}/%{name}/wxrc
/usr/sbin/update-alternatives --remove wx-config %{_libexecdir}/%{name}/wx-config
/usr/sbin/update-alternatives --remove wxrc %{_libexecdir}/%{name}/wxrc
fi
%files

Loading…
Cancel
Save