less.spec 3.7 KB

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