implement transfiletrigger* for regenerating cache

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
This commit is contained in:
Igor Gnatenko 2018-02-04 11:53:20 +01:00
parent b4f2a66a3f
commit dd52d158de
No known key found for this signature in database
GPG Key ID: 695714BD1BBC5F4C
1 changed files with 5 additions and 30 deletions

View File

@ -16,8 +16,6 @@ Patch0: texinfo-4.12-zlib.patch
Patch1: texinfo-6.0-disable-failing-info-test.patch
# Patch2: rhbz#1348671, because of OSTree
Patch2: texinfo-6.1-install-info-use-create-tmp-then-rename-pattern.patch
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
BuildRequires: gcc
BuildRequires: perl-generators
BuildRequires: zlib-devel, ncurses-devel, help2man, perl(Data::Dumper)
@ -93,40 +91,17 @@ cp %{SOURCE5} $RPM_BUILD_ROOT%{_rpmconfigdir}/macros.d
export ALL_TESTS=yes
%make_build check
%post
if [ -f %{_infodir}/texinfo.gz ]; then # --excludedocs?
/sbin/install-info %{_infodir}/texinfo.gz %{_infodir}/dir || :
fi
%preun
if [ $1 = 0 ]; then
if [ -f %{_infodir}/texinfo.gz ]; then # --excludedocs?
/sbin/install-info --delete %{_infodir}/texinfo.gz %{_infodir}/dir || :
fi
fi
%post -n info
if [ -f %{_infodir}/info-stnd.info ]; then # --excludedocs?
/sbin/install-info %{_infodir}/info-stnd.info %{_infodir}/dir
fi
if [ -x /bin/sed ]; then
/bin/sed -i '/^This is.*produced by makeinfo.*from/d' %{_infodir}/dir || :
fi
%preun -n info
if [ $1 = 0 ]; then
if [ -f %{_infodir}/info-stnd.info ]; then # --excludedocs?
/sbin/install-info --delete %{_infodir}/info-stnd.info %{_infodir}/dir \
|| :
fi
fi
%post tex
%{_bindir}/texconfig-sys rehash 2> /dev/null || :
%postun tex
%{_bindir}/texconfig-sys rehash 2> /dev/null || :
%transfiletriggerin -n info -- %{_infodir}
%{_sbindir}/fix-info-dir %{_infodir}/dir
%transfiletriggerpostun -n info -- %{_infodir}
%{_sbindir}/fix-info-dir --delete %{_infodir}/dir
%files -f %{name}.lang -f %{name}_document.lang
%doc AUTHORS ChangeLog NEWS README TODO