From dd52d158de068c774c80efc75adb0ca66f231721 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sun, 4 Feb 2018 11:53:20 +0100 Subject: [PATCH] implement transfiletrigger* for regenerating cache Signed-off-by: Igor Gnatenko --- texinfo.spec | 35 +++++------------------------------ 1 file changed, 5 insertions(+), 30 deletions(-) diff --git a/texinfo.spec b/texinfo.spec index e0e3dad..630eb0a 100644 --- a/texinfo.spec +++ b/texinfo.spec @@ -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