less.spec 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. ##
  2. ## less.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2009 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ##
  5. ## Permission to use, copy, modify, and distribute this software for
  6. ## any purpose with or without fee is hereby granted, provided that
  7. ## the above copyright notice and this permission notice appear in all
  8. ## copies.
  9. ##
  10. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  11. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  12. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  13. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  14. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  15. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  16. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  17. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  18. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  19. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  20. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  21. ## SUCH DAMAGE.
  22. ##
  23. # package information
  24. Name: less
  25. Summary: Text File Pager
  26. URL: http://www.greenwoodsoftware.com/less/
  27. Vendor: Free Software Foundation
  28. Packager: OpenPKG Foundation e.V.
  29. Distribution: OpenPKG Community
  30. Class: BASE
  31. Group: ShellUtils
  32. License: GPL
  33. Version: 436
  34. Release: 20090708
  35. # list of sources
  36. Source0: http://www.greenwoodsoftware.com/less/less-%{version}.tar.gz
  37. Source1: lesspipe
  38. Source2: rc.less
  39. Patch0: less.patch
  40. # build information
  41. Prefix: %{l_prefix}
  42. BuildRoot: %{l_buildroot}
  43. BuildPreReq: OpenPKG, openpkg >= 20060823
  44. PreReq: OpenPKG, openpkg >= 20060823
  45. AutoReq: no
  46. AutoReqProv: no
  47. %description
  48. Less is a program similar to more(1), but which allows backward movement
  49. in the file as well as forward movement. Also, less does not have to read
  50. the entire input file before starting, so with large input files it starts
  51. up faster than text editors like vi(1). Less uses termcap (or terminfo on
  52. some systems), so it can run on a variety of terminals. There is even
  53. limited support for hardcopy terminals. (On a hardcopy terminal, lines
  54. which should be printed at the top of the screen are prefixed with a
  55. caret.) Commands are based on both more and vi. Commands may be preceded
  56. by a decimal number, called N in the descriptions below. The number is
  57. used by some commands, as indicated. This package also provides more(1),
  58. because less(1) is backward compatible to more(1).
  59. %track
  60. prog less = {
  61. version = %{version}
  62. url = http://www.greenwoodsoftware.com/less/download.html
  63. regex = less-(__VER__)\.tar\.gz
  64. }
  65. %prep
  66. %setup -q
  67. %patch -p0
  68. %build
  69. CC="%{l_cc}" \
  70. CFLAGS="%{l_cflags -O} %{l_cppflags}" \
  71. CPPFLAGS="%{l_cppflags}" \
  72. LDFLAGS="%{l_ldflags}" \
  73. GREP="grep" \
  74. ./configure \
  75. --prefix=%{l_prefix} \
  76. --mandir=%{l_prefix}/man
  77. %{l_make} %{l_mflags -O}
  78. %install
  79. rm -rf $RPM_BUILD_ROOT
  80. %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
  81. strip $RPM_BUILD_ROOT%{l_prefix}/bin/less*
  82. ln $RPM_BUILD_ROOT%{l_prefix}/bin/less \
  83. $RPM_BUILD_ROOT%{l_prefix}/bin/more
  84. ln $RPM_BUILD_ROOT%{l_prefix}/man/man1/less.1 \
  85. $RPM_BUILD_ROOT%{l_prefix}/man/man1/more.1
  86. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  87. %{SOURCE lesspipe} $RPM_BUILD_ROOT%{l_prefix}/bin/
  88. %{l_shtool} mkdir -f -p -m 755 \
  89. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  90. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  91. %{SOURCE rc.less} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  92. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  93. %files -f files
  94. %clean
  95. rm -rf $RPM_BUILD_ROOT