diff --git a/libidn2.spec b/libidn2.spec index 586f089..882ab82 100644 --- a/libidn2.spec +++ b/libidn2.spec @@ -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