Browse Source

texinfo-6.8-2

Tomohiro "Tomo-p" KATO 1 year ago
parent
commit
c98e3e46ff
1 changed files with 20 additions and 26 deletions
  1. 20 26
      t/texinfo/texinfo-vl.spec

+ 20 - 26
t/texinfo/texinfo-vl.spec

@@ -7,7 +7,7 @@ Summary:        Tools needed to create Texinfo format documentation files.
 Summary(ja):    Texinfo ドキュメントを作成する為に使うツール群
 Name:           texinfo
 Version:        6.8
-Release:        1%{?_dist_release}
+Release:        2%{?_dist_release}
 Group:          publishing
 Vendor:         Project Vine
 Distribution:   Vine Linux
@@ -33,9 +33,8 @@ Patch5: texinfo-6.5-covscan-fixes.patch
 Patch6: texinfo-6.8-undo-gnulib-nonnul.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
-Requires(post): install-info
-Requires(preun): install-info
 BuildRequires: autoconf libtool ncurses-devel zlib-devel help2man
+Requires: install-info
 
 # Texinfo perl packages are not installed in default perl library dirs
 %global __provides_exclude ^perl\\(.*Texinfo.*\\)$
@@ -74,7 +73,7 @@ Group:       system
 # ugly method of doing it (triggers which fire on set intersection would
 # be better), but it's the best we can do for now. Talk to Erik before
 # removing this.
-Requires(pre): bash install-info
+Requires(pre): bash
 Requires: install-info
 
 %description -n info
@@ -125,14 +124,14 @@ mkdir -p %{buildroot}/{etc,sbin}
 
 %makeinstall
 
-( cd %{buildroot}
+ ( cd %{buildroot}
   gzip -n -9f .%{_infodir}/*info*
   gzip -n -9f .%{_mandir}/*/*
-  install -m644 ${RPM_SOURCE_DIR}/info-dir ./etc/info-dir
-  ln -sf /etc/info-dir %{buildroot}%{_infodir}/dir
   mv -f .%{_bindir}/install-info ./sbin
 )
 
+install -Dpm0755 -t %{buildroot}%{_sbindir} contrib/fix-info-dir
+
 %find_lang %name
 %find_lang %{name}_document
 
@@ -143,28 +142,17 @@ export ALL_TESTS=yes
 %make_build check
 %endif
 
+
 %clean
 rm -rf %{buildroot}
 
 
-%post
-/sbin/install-info %{_infodir}/texinfo.info.gz %{_infodir}/dir
-
-
-%preun
-if [ $1 = 0 ]; then
-    /sbin/install-info --delete %{_infodir}/texinfo.info.gz %{_infodir}/dir
-fi
+%transfiletriggerin -n install-info -- %{_infodir}
+[ -f %{_infodir}/dir ] && create_arg="" || create_arg="--create"
+%{_sbindir}/fix-info-dir $create_arg %{_infodir}/dir &>/dev/null
 
-
-%post -n info
-/sbin/install-info %{_infodir}/info-stnd.info.gz %{_infodir}/dir
-
-
-%preun -n info
-if [ $1 = 0 ]; then
-    /sbin/install-info --delete %{_infodir}/info-stnd.info.gz %{_infodir}/dir
-fi
+%transfiletriggerpostun -n install-info -- %{_infodir}
+[ -f %{_infodir}/dir ] && %{_sbindir}/fix-info-dir --delete %{_infodir}/dir &>/dev/null
 
 
 %files -f %{name}.lang -f %{name}_document.lang
@@ -208,13 +196,19 @@ fi
 %files -n install-info
 %defattr(-,root,root)
 %license COPYING
-%config(noreplace) %verify(not md5 size mtime) /etc/info-dir
-%config(noreplace) %{_infodir}/dir
+%ghost %{_infodir}/dir
+%ghost %attr(644, root, root) %{_infodir}/dir.old
+%ghost %{_sysconfdir}/info-dir
 %{_syssbindir}/install-info
+%{_sbindir}/fix-info-dir
 %{_mandir}/man1/install-info.1*
 
 
 %changelog
+* Tue Sep 14 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 6.8-2
+- added filetriggers.
+- dropped install-info scriptlets.
+
 * Tue Jul 27 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 6.8-1
 - new upstream release.
 - dropped Patch0.