diff --git a/install.spec.inc b/install.spec.inc index dbeea2d..c94d3c8 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -216,14 +216,6 @@ rm -Rvf %{buildroot}%{install_docdir}/LLVM/lld/html touch %{buildroot}%{_bindir}/ld install -D -m 644 -t %{buildroot}%{_mandir}/man1/ lld/docs/ld.lld.1 - -%post -n %{pkg_name_lld} -%{_sbindir}/update-alternatives --install %{_bindir}/ld ld %{_bindir}/ld.lld 1 - -%postun -n %{pkg_name_lld} -if [ $1 -eq 0 ] ; then - %{_sbindir}/update-alternatives --remove ld %{_bindir}/ld.lld -fi %endif #endregion diff --git a/llvm.spec b/llvm.spec index 603bfaf..fdf2e01 100644 --- a/llvm.spec +++ b/llvm.spec @@ -222,6 +222,16 @@ if [[ $1 -eq 0 fi %endif +%if %{without compat_build} +%post -n %{pkg_name_lld} +%{_sbindir}/update-alternatives --install %{_bindir}/ld ld %{_bindir}/ld.lld 1 + +%postun -n %{pkg_name_lld} +if [ $1 -eq 0 ] ; then + %{_sbindir}/update-alternatives --remove ld %{_bindir}/ld.lld +fi +%endif + %include %{_sourcedir}/files.spec.inc %changelog