vim.spec 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. ##
  2. ## vim.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. %define V_vl 6.1
  26. %define V_vs 61
  27. # package information
  28. Name: vim
  29. Summary: The Vi (Improved) Text Editor
  30. URL: http://www.vim.org/
  31. Vendor: Bram Moolenaar et al.
  32. Packager: The OpenPKG Project
  33. Distribution: OpenPKG [REL]
  34. Group: Editor
  35. License: Charityware
  36. Version: %{V_vl}
  37. Release: 20020326
  38. # list of sources
  39. Source0: ftp://ftp.vim.org/pub/vim/unix/vim-%{V_vl}-src1.tar.gz
  40. Source1: ftp://ftp.vim.org/pub/vim/unix/vim-%{V_vl}-src2.tar.gz
  41. Source2: ftp://ftp.vim.org/pub/vim/unix/vim-%{V_vl}-rt1.tar.gz
  42. Source3: ftp://ftp.vim.org/pub/vim/unix/vim-%{V_vl}-rt2.tar.gz
  43. Source6: rc.vim
  44. # build information
  45. Prefix: %{l_prefix}
  46. BuildRoot: %{l_buildroot}
  47. BuildPreReq: OpenPKG, openpkg >= 20020206
  48. PreReq: OpenPKG, openpkg >= 20020206
  49. AutoReq: no
  50. AutoReqProv: no
  51. %description
  52. Vim (Vi Improved) is a text editor that is upwards compatible to the
  53. classical Unix Vi. It can be used to edit any ASCII text. It is especially
  54. useful for editing programs. There are a lot of enhancements above Vi:
  55. multi level undo, multi windows and buffers, syntax highlighting, com-
  56. mand line editing, filename completion, on-line help, visual selection,
  57. etc.
  58. %prep
  59. %setup0 -q -c
  60. %setup1 -q -T -D -a 1
  61. %setup2 -q -T -D -a 2
  62. %setup3 -q -T -D -a 3
  63. %build
  64. ( cd vim%{V_vs}/src
  65. CC="%{l_cc}" \
  66. CFLAGS="%{l_cflags -O}" \
  67. ./configure \
  68. --prefix=%{l_prefix} \
  69. --enable-max-features \
  70. --without-x \
  71. --with-tlib=termcap \
  72. --disable-gui
  73. %{l_make} %{l_mflags -O}
  74. )
  75. %install
  76. ( cd vim%{V_vs}/src
  77. rm -rf $RPM_BUILD_ROOT
  78. %{l_make} %{l_mflags} install \
  79. prefix=$RPM_BUILD_ROOT%{l_prefix}
  80. )
  81. strip $RPM_BUILD_ROOT%{l_prefix}/bin/vim
  82. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/xxd
  83. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/xxd.1
  84. for link in vi ex rview rvim view; do
  85. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/$link
  86. ln $RPM_BUILD_ROOT%{l_prefix}/bin/vim \
  87. $RPM_BUILD_ROOT%{l_prefix}/bin/$link
  88. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/$link.1
  89. ln $RPM_BUILD_ROOT%{l_prefix}/man/man1/vim.1 \
  90. $RPM_BUILD_ROOT%{l_prefix}/man/man1/$link.1
  91. done
  92. %{l_shtool} mkdir -f -p -m 755 \
  93. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  94. %{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \
  95. %{SOURCE rc.vim} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  96. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  97. %files -f files
  98. %clean
  99. rm -rf $RPM_BUILD_ROOT