Inline %post and %postun code for llvm-devel

This commit is contained in:
Konrad Kleine 2024-05-08 11:04:38 +00:00
parent 94e85e9ee1
commit ead79795eb
3 changed files with 11 additions and 13 deletions

View file

@ -90,13 +90,21 @@ exec &>> >(/usr/bin/ts)
%if %{undefined rhel}
exec &>> >(/usr/bin/ts)
%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 -n %{pkg_name_llvm}-devel
%if %{undefined rhel}
exec &>> >(/usr/bin/ts)
exec &>> >(/usr/bin/ts)
%endif
%include %{_sourcedir}/postun_devel.spec.inc
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
%include %{_sourcedir}/files.spec.inc

View file

@ -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

View file

@ -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