diff --git a/llvm.spec b/llvm.spec index cbd3fae..23f251a 100644 --- a/llvm.spec +++ b/llvm.spec @@ -490,7 +490,10 @@ for v in 14 15 16; do fi done %endif -%include %{_sourcedir}/post_devel.spec.inc +%{_sbindir}/update-alternatives --install %{_bindir}/llvm-config%{exec_suffix} llvm-config%{exec_suffix} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} %{__isa_bits} +%if %{without compat_build} +%{_sbindir}/update-alternatives --install %{_bindir}/llvm-config-%{maj_ver} llvm-config-%{maj_ver} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} %{__isa_bits} +%endif %postun devel diff --git a/post_devel.spec.inc b/post_devel.spec.inc deleted file mode 100644 index ccfcbed..0000000 --- a/post_devel.spec.inc +++ /dev/null @@ -1,4 +0,0 @@ -%{_sbindir}/update-alternatives --install %{_bindir}/llvm-config%{exec_suffix} llvm-config%{exec_suffix} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} %{__isa_bits} -%if %{without compat_build} -%{_sbindir}/update-alternatives --install %{_bindir}/llvm-config-%{maj_ver} llvm-config-%{maj_ver} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} %{__isa_bits} -%endif diff --git a/postun_devel.spec.inc b/postun_devel.spec.inc deleted file mode 100644 index 6ce6c4c..0000000 --- a/postun_devel.spec.inc +++ /dev/null @@ -1,6 +0,0 @@ -if [ $1 -eq 0 ]; then - %{_sbindir}/update-alternatives --remove llvm-config%{exec_suffix} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} -%if %{without compat_build} - %{_sbindir}/update-alternatives --remove llvm-config-%{maj_ver} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} -%endif -fi \ No newline at end of file