less.spec 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. ##
  2. ## less.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2001 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2001 Ralf S. Engelschall <rse@engelschall.com>
  5. ##
  6. ## Permission to use, copy, modify, and distribute this software for
  7. ## any purpose with or without fee is hereby granted, provided that
  8. ## the above copyright notice and this permission notice appear in all
  9. ## copies.
  10. ##
  11. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  12. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  13. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  14. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  15. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  16. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  17. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  18. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  19. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  20. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  21. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  22. ## SUCH DAMAGE.
  23. ##
  24. # package information
  25. Name: less
  26. Summary: Text File Pager
  27. URL: http://home.flash.net/~marknu/less/
  28. Vendor: Free Software Foundation
  29. Packager: The OpenPKG Project
  30. Distribution: OpenPKG [EXP]
  31. Group: Text
  32. License: GPL
  33. Version: 358
  34. Release: %{l_branch}.0
  35. # list of sources
  36. Source0: ftp://ftp.gnu.org/gnu/less/less-%{version}.tar.gz
  37. Source1: lesspipe
  38. Source2: rc.less
  39. Patch0: less-%{version}.patch
  40. # build information
  41. Prefix: %{l_prefix}
  42. BuildRoot: %{l_buildroot}
  43. BuildPreReq: OpenPKG, openpkg >= 0.9-33, ncurses
  44. PreReq: OpenPKG, openpkg >= 0.9-33, ncurses
  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. %prep
  60. %setup -q
  61. %patch -p1
  62. %build
  63. CC="%{l_cc}" \
  64. CPPFLAGS="-I%{l_prefix}/include" \
  65. CFLAGS="%{l_cflags -O} -I%{l_prefix}/include" \
  66. LDFLAGS="-L%{l_prefix}/lib" \
  67. ./configure \
  68. --prefix=%{l_prefix}
  69. %{l_make} %{l_mflags -O}
  70. %install
  71. rm -rf $RPM_BUILD_ROOT
  72. %{l_make} %{l_mflags} install prefix=$RPM_BUILD_ROOT%{l_prefix}
  73. strip $RPM_BUILD_ROOT%{l_prefix}/bin/less*
  74. ln $RPM_BUILD_ROOT%{l_prefix}/bin/less \
  75. $RPM_BUILD_ROOT%{l_prefix}/bin/more
  76. ln $RPM_BUILD_ROOT%{l_prefix}/man/man1/less.1 \
  77. $RPM_BUILD_ROOT%{l_prefix}/man/man1/more.1
  78. %{l_shtool} install -c -m 755 %{SOURCE lesspipe} $RPM_BUILD_ROOT%{l_prefix}/bin/
  79. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  80. %{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \
  81. %{SOURCE rc.less} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  82. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  83. %files -f files
  84. %clean
  85. rm -rf $RPM_BUILD_ROOT