Make obsolete scriptlets conditional for EPEL < 8

This commit is contained in:
Robert Scheck 2019-02-09 14:02:33 +01:00
parent fffa15d83c
commit cd99bb8d82

View File

@ -31,6 +31,10 @@ developing applications that use libidn2.
Summary: IDNA2008 internationalized domain names conversion tool
License: GPLv3+
Requires: %{name}%{?_isa} = %{version}-%{release}
%if 0%{?rhel} && 0%{?rhel} <= 7
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
%endif
%description -n idn2
The idn2 package contains the idn2 command line tool for testing
@ -66,6 +70,16 @@ make %{?_smp_mflags} -C tests check
%ldconfig_scriptlets
%if 0%{?rhel} && 0%{?rhel} <= 7
%post -n idn2
/sbin/install-info %{_infodir}/%{name}.info.gz %{_infodir}/dir || :
%preun -n idn2
if [ $1 = 0 ]; then
/sbin/install-info --delete %{_infodir}/%{name}.info.gz %{_infodir}/dir || :
fi
%endif
%files -f %{name}.lang
%license COPYING COPYING.LESSERv3 COPYING.unicode COPYINGv2
%doc AUTHORS NEWS README.md