Make obsolete scriptlets conditional for EPEL < 8

This commit is contained in:
Robert Scheck 2019-01-27 23:48:02 +01:00
parent ecef3dec97
commit 57c4e68d11

View File

@ -59,6 +59,10 @@ Requires: kde-filesystem >= 4
%if 0%{?rhel} >= 7 || 0%{?fedora}
Requires: kf5-filesystem >= 5
%endif
%if 0%{?rhel} && 0%{?rhel} <= 7
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
%endif
Requires(post): %{_sbindir}/alternatives, coreutils
Requires(preun): %{_sbindir}/alternatives
@ -126,6 +130,12 @@ cd releng
%ldconfig_scriptlets
%post -n xorriso
%if 0%{?rhel} && 0%{?rhel} <= 7
/sbin/install-info %{_infodir}/xorrecord.info.gz %{_infodir}/dir || :
/sbin/install-info %{_infodir}/xorriso.info.gz %{_infodir}/dir || :
/sbin/install-info %{_infodir}/xorrisofs.info.gz %{_infodir}/dir || :
%endif
link=`readlink %{_bindir}/mkisofs`
if [ "$link" == "xorriso" ]; then
rm -f %{_bindir}/mkisofs
@ -136,6 +146,12 @@ fi
%preun -n xorriso
if [ $1 = 0 ]; then
%if 0%{?rhel} && 0%{?rhel} <= 7
/sbin/install-info --delete %{_infodir}/xorrecord.info.gz %{_infodir}/dir || :
/sbin/install-info --delete %{_infodir}/xorriso.info.gz %{_infodir}/dir || :
/sbin/install-info --delete %{_infodir}/xorrisofs.info.gz %{_infodir}/dir || :
%endif
%{_sbindir}/alternatives --remove mkisofs %{_bindir}/xorriso
fi