less-vl.spec 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300
  1. Summary: A text file browser similar to more, but better
  2. Summary(ja): more よりも高機能な日本語対応ページャ
  3. Name: less
  4. Version: 668
  5. Release: 1%{?_dist_release}
  6. Group: accessories
  7. Vendor: Project Vine
  8. Distribution: Vine Linux
  9. Packager: daisuke
  10. License: GPLv3+
  11. URL: https://www.greenwoodsoftware.com/less/
  12. Source: https://www.greenwoodsoftware.com/less/%{name}-%{version}.tar.gz
  13. Source1: lesspipe.sh
  14. Source2: less.sh
  15. Source3: less.csh
  16. Patch4: less-394-time.patch
  17. Patch5: less-475-fsync.patch
  18. Patch6: less-436-manpage-add-old-bot-option.patch
  19. Patch8: less-458-lessecho-usage.patch
  20. Patch9: less-458-less-filters-man.patch
  21. Patch10: less-458-lesskey-usage.patch
  22. Patch11: less-458-old-bot-in-help.patch
  23. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  24. BuildRequires: ncurses-devel
  25. BuildRequires: pcre2-devel
  26. BuildRequires: autoconf automake libtool
  27. Requires(post): alternatives
  28. Requires(preun): alternatives
  29. Requires: gzip, bzip2
  30. Requires: file >= 3.33
  31. Provides: pager
  32. %description
  33. The less utility is a text file browser that resembles more, but has
  34. more capabilities. Less allows you to move backwards in the file as
  35. well as forwards. Since less doesn't have to read the entire input file
  36. before it starts, less starts up more quickly than text editors (for
  37. example, vi).
  38. You should install less because it is a basic utility for viewing text
  39. files, and you'll use it frequently.
  40. %description -l ja
  41. less は more よりも高機能な日本語対応ページャです.less は起動時にテキスト
  42. ファイルを完全に読み込む必要がないので,vi などの テキストエディタに比べて
  43. 高速に起動することができます.
  44. 環境変数 LESSOPEN を "|lesspipe.sh %s" に設定することによって, gzip や
  45. compress で圧縮されたファイルを自動的に展開して表示することもできます.
  46. less はテキストファイルを表示するためによく使用する基本的なツールなので,
  47. インストールしておくべきでしょう.
  48. %debug_package
  49. %prep
  50. %setup -q
  51. %patch4 -p1 -b .time
  52. %patch5 -p1 -b .fsync
  53. #sed -i -e 's/fsync popen _setjmp/popen _setjmp/' configure.ac
  54. %patch6 -p1 -b .manpage-add-old-bot-option
  55. %patch8 -p1 -b .lessecho-usage
  56. %patch9 -p1 -b .less-filters-man
  57. %patch10 -p1 -b .lesskey-usage
  58. %patch11 -p1 -b .old-bot
  59. autoreconf -ivf
  60. chmod -R a+w *
  61. chmod 644 lessecho.c lesskey.c version.c LICENSE
  62. %build
  63. %configure --with-regex=pcre2
  64. make CFLAGS="%{optflags} -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 `pcre-config --cflags`" datadir=%{_docdir}
  65. %install
  66. rm -rf %{buildroot}
  67. %makeinstall
  68. strip -R .comment %{buildroot}/%{_bindir}/less
  69. mkdir -p %{buildroot}/etc/profile.d
  70. install -p -c -m 755 %{SOURCE1} %{buildroot}/%{_bindir}
  71. install -p -c -m 644 %{SOURCE2} %{buildroot}/etc/profile.d
  72. install -p -c -m 644 %{SOURCE3} %{buildroot}/etc/profile.d
  73. ls -la %{buildroot}/etc/profile.d
  74. %post
  75. /sbin/update-alternatives --install %{_bindir}/pager pager %{_bindir}/less 50
  76. # fix broken symlink if it's there
  77. if [ ! -f %{_bindir}/pager ] ; then
  78. /sbin/update-alternatives --auto pager
  79. fi
  80. %preun
  81. if [ $1 -eq 0 ]; then
  82. /sbin/update-alternatives --remove pager %{_bindir}/less
  83. /sbin/update-alternatives --auto pager
  84. fi
  85. %files
  86. %license COPYING LICENSE
  87. %doc NEWS README
  88. %config %{_sysconfdir}/profile.d/*
  89. %{_bindir}/less
  90. %{_bindir}/lesskey
  91. %{_bindir}/lessecho
  92. %{_bindir}/lesspipe.sh
  93. %{_mandir}/man1/less.1*
  94. %{_mandir}/man1/lesskey.1*
  95. %{_mandir}/man1/lessecho.1*
  96. %changelog
  97. * Fri Jun 13 2025 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 668-1
  98. - updated to 668.
  99. * Thu Jul 18 2024 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 661-1
  100. - updated to 661.
  101. * Mon Jun 17 2024 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 643-1
  102. - updated to 643.
  103. * Fri Feb 17 2023 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 608-2
  104. - imported Patch1000 to fix CVE-2022-46663 from upstream.
  105. * Thu Nov 03 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 608-1
  106. - updated to 608.
  107. - updated lesspipe.sh
  108. * Tue Jul 27 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 590-1
  109. - updated to 590.
  110. * Wed Apr 21 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 581-1
  111. - updated to 581.
  112. * Tue Feb 23 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 563-1
  113. - updated to 563.
  114. - disable Patch5: got same effect by sed.
  115. - updated Patch9.
  116. * Mon Mar 09 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 551-1
  117. - updated to 551.
  118. - updated Patch5.
  119. - imported Patch8-11 from rawhide.
  120. - dropped Patch1: less-481-Foption.patch.
  121. * Sun Dec 20 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 481-1
  122. - update to 481
  123. - update Patch1 (less-481-Foption.patch)
  124. * Mon Jan 20 2014 Daisuke SUZUKI <daisuke@linux.or.jp> 458-1
  125. - update to 458
  126. * Wed Oct 24 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 451-1
  127. - update to 451
  128. - build with pcre-8.31
  129. * Sun Oct 02 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 444-1
  130. - update to 444
  131. * Sat Mar 19 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 436-3
  132. - split Requires(post,preun)
  133. * Sun Sep 19 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 436-2
  134. - updated japanese summary and description
  135. * Thu Jul 29 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 436-1
  136. - updated to 436
  137. * Fri Aug 15 2008 Shu KONNO <owa@bg.wakwak.com> 382-1vl5
  138. - applied new versioning policy, spec in utf-8
  139. * Fri Apr 13 2007 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 382-0vl6
  140. - add Provides: pager
  141. - add Requires(post,preun): alternatives
  142. * Mon Apr 09 2007 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 382-0vl5
  143. - add update-alternatives: pager in %%post, %%preun scriptlet
  144. * Thu Nov 09 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 382-0vl4
  145. - revert to 382-iso259 ([VineSeed:12552])
  146. * Wed Nov 08 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 382-0vl3
  147. - update jless patch to 382-iso262
  148. - update description (iso254 to iso262)
  149. * Sun Nov 05 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 382-0vl2
  150. - change log was missing in 382-0vl1
  151. * Sun Nov 05 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 382-0vl1
  152. - new upstream release
  153. - update jless patch to 382-iso258
  154. * Tue Dec 14 2004 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 358-0vl10
  155. - set _FILE_OFFSET_BITS 64
  156. * Sat May 17 2003 KAZUKI SHIMURA <rito@pos.to> 358-0vl9
  157. - rebuild with new toolchain
  158. - fix description (iso242 to iso254)
  159. * Thu Apr 25 2002 Kosaku Nagasaka <nagasaka@math.tsukuba.ac.jp>
  160. - 358-0vl8: temporary fix: consistency of the nls-patch and (J)LESSCHARSET
  161. * Sun Mar 31 2002 NISHIMURA Daisuke <nishi@graco.c.u-tokyo.ac.jp>
  162. - 358-0vl7: fix lesspipe.sh for file names with spaces
  163. * Wed Aug 22 2001 Toru Sagami <sagami@vinelinux.org>
  164. - 358-0vl6: rebuild on ncurses-5.2 (as asked to do so)
  165. * Sun Aug 19 2001 Toru Sagami <sagami@vinelinux.org>
  166. - 358-0vl5: added more documents (COPYING, LICENSE)
  167. - fix lesspipe.sh again and tweak lesspipe.csh a bit with %%config marked
  168. * Wed Jun 27 2001 Jun Nishii <jun@vinelinux.org> 358-0vl4
  169. - fix lesspipe.sh
  170. - do not REset LESSOPEN in profile.d/less.sh
  171. * Sat Jan 13 2001 Lisa Sagami <czs14350@mb.infoweb.ne.jp>
  172. - 358-0vl3
  173. - fixed lesspipe.sh
  174. * Fri Jan 12 2001 Lisa Sagami <czs14350@mb.infoweb.ne.jp>
  175. - 358-0vl2
  176. - added bzip2/lha support to lesspipe.sh
  177. - minor spec fixes
  178. * Thu Jan 11 2001 Jun Nishii <jun@vinelinux.org>
  179. - 358-0vl1
  180. - more fix of lesspipe.sh
  181. - requires file >= 3.33
  182. - more macros in spec
  183. * Thu Jan 11 2001 Jun Nishii <jun@vinelinux.org>
  184. - 354-0vl5
  185. - modify lesspipe.sh to adapt to file-3.33 and to view gzipped nroff file
  186. * Tue Dec 26 2000 Tomoya TAKA <tomoya@olive.plala.or.jp> 354-0vl3
  187. - some fixes to handle man pages correctly
  188. * Sun Nov 12 2000 MACHINO, Satoshi <machino@vinelinux.org> 354-0vl2
  189. - build on gcc-2.95.3
  190. - partially used rpmmacros
  191. * Wed Jul 5 2000 Yasuyuki Furukawa <furukawa@vinelinux.org>
  192. - added Sagam's patch to fix parse ctrl code for Japanese. Very thanks Sagami-san.
  193. * Wed Jun 21 2000 Jun Nishii <jun@vinelinux.org>
  194. - less-354-0vl1
  195. * Mon Jan 17 2000 Yasuyuki Furukawa <furukawa@vinelinux.org>
  196. - updated ja_nls patch for memory leaks.
  197. * Mon Jan 10 2000 Jun Nishii <jun@vinelinux.org>
  198. - rel.7 (5vl2 makes harm for update from Vine-1.1)
  199. * Fri Jan 7 2000 Yasuyuki Furukawa <furukawa@vinelinux.org>
  200. - rel 5vl2
  201. - added ja_nls and bzip2 patches
  202. - added Requires for bzip2 and gzip.
  203. * Fri Jan 7 2000 Jun Nishii <jun@vinelinux.org>
  204. - rel.6
  205. - change group
  206. * Mon Sep 6 1999 Jun NISHII <jun@flatout.org>
  207. - rel.5
  208. - remove LESS=-r to avoid somed troubles
  209. * Sat Aug 21 1999 Jun NISHII <jun@flatout.org>
  210. - rel.4
  211. - change groff path in lesspipe.sh to adapt groff-1.11
  212. - added /etc/profile.d/less{.,.csh}
  213. * Thu Jun 24 1999 Norihito Ohmori <ohmori@flatout.org>
  214. - rebuild for glibc-2.1
  215. * Mon Feb 15 1999 Jun NISHII <jun@flatout.org>
  216. - rel.2
  217. - added preprocess for bzip2ed file
  218. - added Japanese summary
  219. * Wed Dec 2 1998 Jun NISHII <jun@flatout.org>
  220. - rename from less-332iso242-4 to less-332_jp-1
  221. - strip bins
  222. * Thu Oct 8 1998 Jun NISHII <jun@flatout.org>
  223. - release 4
  224. - modify header of spec file
  225. * Sat Sep 26 1998 Jun NISHII <jun@flatout.org>
  226. - release 3
  227. - added lesspipe.sh