man-db-vl.spec 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. %bcond_with systemd
  2. %bcond_with check
  3. %global cache /var/cache/man
  4. # Basic Information
  5. Name: man-db
  6. Summary: the man-db manual pager suite
  7. Summary(ja): man-dbマニュアルページャスイート
  8. Version: 2.13.1
  9. Release: 1%{?_dist_release}%{?with_systemd:.systemd}
  10. License: GPL
  11. Group: system,documentation
  12. Vendor: Project Vine
  13. Distribution: Vine Linux
  14. URL: https://savannah.nongnu.org/projects/man-db
  15. Source0: https://download.savannah.nongnu.org/releases/%{name}/%{name}-%{version}.tar.xz
  16. Source1: man-db.crondaily
  17. Source2: man-db.sysconfig
  18. Source5: man-db-cache-update.service
  19. Source6: man-db-restart-cache-update.service
  20. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  21. # Dependency
  22. Requires: groff >= 1.20.1
  23. BuildRequires: groff >= 1.20.1
  24. Requires: gdbm
  25. BuildRequires: gdbm-devel
  26. BuildRequires: libpipeline-devel >= 1.1.0
  27. BuildRequires: pkgconfig(zlib)
  28. BuildRequires: po4a
  29. Obsoletes: man
  30. Provides: man
  31. %description
  32. This package provides the man command. This utility is the primary way of
  33. examining the on-line help files (manual pages). Other utilities provided
  34. include the whatis and apropos commands for searching the manual page
  35. database, the manpath utility for determining the manual page search path,
  36. and the maintenance utilities mandb, catman, and zsoelim. This package uses
  37. the groff suite of programs to format and display the manual pages.
  38. %description -l ja
  39. このパッケージは、man コマンドを提供します。このユーティリティの主な用途は
  40. ヘルプファイル(マニュアルページ)を調べることです。他のユーティリティとして
  41. マニュアルページデータベースを検索するための whatis と apropos コマンド、
  42. マニュアルページの検索パスを決定する manpath ユーティリティ、および
  43. メンテナンスユーティリティである mandb、catman および zsoelim を提供します。
  44. このパッケージは、マニュアルページを整形および表示するために groff プログラム
  45. スイートを利用しています。
  46. %debug_package
  47. %prep
  48. %autosetup -p1
  49. %build
  50. %configure \
  51. --disable-setuid --disable-cache-owner \
  52. --with-systemdsystemunitdir=no \
  53. --with-browser=elinks --with-lzip=lzip \
  54. --with-override-dir=overrides
  55. %{__make} %{?_smp_mflags}
  56. %install
  57. make install DESTDIR=%{buildroot} prefix=%{_prefix} INSTALL='install -p'
  58. # move the documentation to the relevant place
  59. mv %{buildroot}%{_datadir}/doc/man-db/* ./
  60. # remove zsoelim man page - part of groff package
  61. rm %{buildroot}%{_datadir}/man/man1/zsoelim.1
  62. # remove libtool archives
  63. rm %{buildroot}%{_libdir}/man-db/*.la
  64. %if %{with systemd}
  65. # man-db-cache-update.service and man-db-restart-cache-update.service
  66. install -D -p -m 0644 %{SOURCE5} $RPM_BUILD_ROOT%{_unitdir}/man-db-cache-update.service
  67. install -D -p -m 0644 %{SOURCE6} $RPM_BUILD_ROOT%{_unitdir}/man-db-restart-cache-update.service
  68. %else
  69. rm -f %{buildroot}/usr/lib/tmpfiles.d/man-db.conf
  70. # install cron script for man-db creation/update
  71. mkdir -p %{buildroot}%{_sysconfdir}/cron.daily
  72. install -D -p -m 0755 %{SOURCE1} %{buildroot}%{_sysconfdir}/cron.daily/man-db.cron
  73. %endif
  74. # config for cron script
  75. mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
  76. install -D -p -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/man-db
  77. # install cache directory
  78. install -d -m 0755 %{buildroot}%{cache}
  79. %find_lang %{name}
  80. %find_lang %{name}-gnulib
  81. %if %{with check}
  82. %check
  83. make check
  84. %endif
  85. %pre
  86. # stop and disable timer from previous builds
  87. if [ -e /usr/lib/systemd/system/mandb.timer ]; then
  88. if test -d /run/systemd; then
  89. systemctl stop man-db.timer >/dev/null 2>&1 || :
  90. systemctl -q disable man-db.timer >/dev/null 2>&1 || :
  91. fi
  92. fi
  93. %post
  94. # clear the old cache
  95. %{__rm} -rf %{cache}/*
  96. %transfiletriggerin -- %{_mandir}
  97. # update cache
  98. if [ -x /usr/bin/systemd-run -a -x /usr/bin/systemctl ]; then
  99. /usr/bin/systemd-run /usr/bin/systemctl start man-db-cache-update >/dev/null 2>&1 || :
  100. fi
  101. %transfiletriggerpostun -- %{_mandir}
  102. # update cache
  103. if [ -x /usr/bin/systemd-run -a -x /usr/bin/systemctl ]; then
  104. /usr/bin/systemd-run /usr/bin/systemctl start man-db-cache-update >/dev/null 2>&1 || :
  105. fi
  106. %files -f %{name}.lang -f %{name}-gnulib.lang
  107. %doc ChangeLog NEWS README
  108. %config(noreplace) %{_sysconfdir}/man_db.conf
  109. %config(noreplace) %{_sysconfdir}/sysconfig/man-db
  110. %if %{with systemd}
  111. %{_unitdir}/man-db-cache-update.service
  112. %{_unitdir}/man-db-restart-cache-update.service
  113. %config(noreplace) %{_tmpfilesdir}/man-db.conf
  114. %else
  115. %{_sysconfdir}/cron.daily/man-db.cron
  116. %endif
  117. %{_bindir}/apropos
  118. %{_bindir}/catman
  119. %{_bindir}/lexgrog
  120. %{_bindir}/man
  121. %{_bindir}/man-recode
  122. %{_bindir}/mandb
  123. %{_bindir}/manpath
  124. %{_bindir}/whatis
  125. %{_libdir}/man-db
  126. %{_libexecdir}/man-db
  127. %{_sbindir}/accessdb
  128. %{_defaultdocdir}/man-db
  129. %attr(0755,root,root) %dir %{cache}
  130. %lang(da) %{_mandir}/da/man*/*
  131. %lang(de) %{_mandir}/de/man*/*
  132. %lang(es) %{_mandir}/es/man*/*
  133. %lang(fr) %{_mandir}/fr/man*/*
  134. %lang(id) %{_mandir}/id/man*/*
  135. %lang(it) %{_mandir}/it/man*/*
  136. %lang(ja) %{_mandir}/ja/man*/*
  137. %lang(ko) %{_mandir}/ko/man*/*
  138. %lang(nl) %{_mandir}/nl/man*/*
  139. %lang(pl) %{_mandir}/pl/man*/*
  140. %lang(pt) %{_mandir}/pt/man*/*
  141. %lang(pt_BR) %{_mandir}/pt_BR/man*/*
  142. %lang(ru) %{_mandir}/ru/man*/*
  143. %lang(ro) %{_mandir}/ro/man*/*
  144. %lang(sr) %{_mandir}/sr/man*/*
  145. %lang(sv) %{_mandir}/sv/man*/*
  146. %lang(tr) %{_mandir}/tr/man*/*
  147. %lang(uk) %{_mandir}/uk/man*/*
  148. %lang(zh_CN) %{_mandir}/zh_CN/man*/*
  149. %{_mandir}/man1/apropos.1.*
  150. %{_mandir}/man1/lexgrog.1.*
  151. %{_mandir}/man1/man.1.*
  152. %{_mandir}/man1/man-recode.1*
  153. %{_mandir}/man1/manconv.1.*
  154. %{_mandir}/man1/manpath.1.*
  155. %{_mandir}/man1/whatis.1.*
  156. %{_mandir}/man5/manpath.5.*
  157. %{_mandir}/man8/accessdb.8.*
  158. %{_mandir}/man8/catman.8.*
  159. %{_mandir}/man8/mandb.8.*
  160. %changelog
  161. * Mon Jun 16 2025 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.13.1-1
  162. - new upstream release.
  163. * Wed May 15 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.8.5-2
  164. - fixed options for configure.
  165. - imported Patch1 and 1 from rawhide.
  166. * Mon May 13 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.8.5-1
  167. - new upstream release.
  168. - added BR:zlib-devel.
  169. * Sat Jan 25 2014 Yasumichi Akahoshi <yasumichi@vinelinux.org> 2.6.6-1
  170. - new upstream release
  171. * Thu Nov 29 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 2.6.3-1
  172. - new upstream release
  173. - add BR: libpipeline-devel instead of libpipeline
  174. - add BR: po4a
  175. * Fri Sep 23 2011 Yasumichi Akahoshi <yasumichi@vinelinux.org> 2.6.0.2-1
  176. - new upstream release.
  177. - remove Patch0.
  178. * Wed Mar 30 2011 Yasumichi Akahoshi <yasumichi@vinelinux.org> 2.5.9-1
  179. - new upstream release.
  180. - add Source1,Source2 and Patch0 from fedora.
  181. * Tue Nov 16 2010 Yasumichi Akahoshi <yasumichi@vinelinux.org> 2.5.8-1
  182. - initial build for Vine Linux