vim.spec 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  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. %define V_pl 61
  28. # package information
  29. Name: vim
  30. Summary: The Vi (Improved) Text Editor
  31. URL: http://www.vim.org/
  32. Vendor: Bram Moolenaar et al.
  33. Packager: The OpenPKG Project
  34. Distribution: OpenPKG [REL]
  35. Group: Editor
  36. License: Charityware
  37. Version: %{V_vl}.%{V_pl}
  38. Release: 20020512
  39. # list of sources
  40. Source0: ftp://ftp.vim.org/pub/vim/unix/vim-%{V_vl}-src1.tar.gz
  41. Source1: ftp://ftp.vim.org/pub/vim/unix/vim-%{V_vl}-src2.tar.gz
  42. Source2: ftp://ftp.vim.org/pub/vim/unix/vim-%{V_vl}-rt1.tar.gz
  43. Source3: ftp://ftp.vim.org/pub/vim/unix/vim-%{V_vl}-rt2.tar.gz
  44. Source6: rc.vim
  45. Patch1: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.001
  46. Patch2: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.002
  47. Patch3: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.003
  48. Patch4: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.004
  49. Patch5: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.005
  50. Patch6: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.006
  51. Patch7: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.007
  52. Patch8: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.008
  53. Patch9: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.009
  54. Patch10: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.010
  55. Patch11: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.011
  56. Patch12: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.012
  57. Patch13: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.013
  58. Patch14: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.014
  59. Patch15: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.015
  60. Patch16: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.016
  61. Patch17: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.017
  62. Patch18: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.018
  63. Patch19: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.019
  64. Patch20: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.020
  65. Patch21: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.021
  66. Patch22: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.022
  67. Patch23: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.023
  68. Patch24: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.024
  69. Patch25: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.025
  70. Patch26: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.026
  71. Patch27: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.027
  72. Patch28: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.028
  73. Patch29: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.029
  74. Patch30: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.030
  75. Patch31: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.031
  76. Patch32: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.032
  77. Patch33: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.033
  78. Patch34: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.034
  79. Patch35: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.035
  80. Patch36: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.036
  81. Patch37: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.037
  82. Patch38: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.038
  83. Patch39: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.039
  84. Patch40: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.040
  85. Patch41: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.041
  86. Patch42: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.042
  87. Patch43: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.043
  88. Patch44: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.044
  89. Patch45: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.045
  90. Patch46: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.046
  91. Patch47: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.047
  92. Patch48: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.048
  93. Patch49: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.049
  94. Patch50: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.050
  95. Patch51: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.051
  96. Patch52: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.052
  97. Patch53: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.053
  98. Patch54: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.054
  99. Patch55: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.055
  100. Patch56: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.056
  101. Patch57: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.057
  102. Patch58: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.058
  103. Patch59: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.059
  104. Patch60: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.060
  105. Patch61: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.061
  106. # build information
  107. Prefix: %{l_prefix}
  108. BuildRoot: %{l_buildroot}
  109. BuildPreReq: OpenPKG, openpkg >= 20020206, gzip, patch
  110. PreReq: OpenPKG, openpkg >= 20020206
  111. AutoReq: no
  112. AutoReqProv: no
  113. %description
  114. Vim (Vi Improved) is a text editor that is upwards compatible to the
  115. classical Unix Vi. It can be used to edit any ASCII text. It is especially
  116. useful for editing programs. There are a lot of enhancements above Vi:
  117. multi level undo, multi windows and buffers, syntax highlighting, com-
  118. mand line editing, filename completion, on-line help, visual selection,
  119. etc.
  120. %prep
  121. %setup0 -q -c
  122. %setup1 -q -T -D -a 1
  123. %setup2 -q -T -D -a 2
  124. %setup3 -q -T -D -a 3
  125. i=1
  126. while [ $i -le %{V_pl} ]; do
  127. cat $RPM_SOURCE_DIR/%{V_vl}.`echo $i | awk '{ printf("%03d", $0); }'` |\
  128. %{l_prefix}/bin/patch -p0 -E -t -s >/dev/null 2>&1 || true
  129. i=`expr $i + 1`
  130. done
  131. %build
  132. ( cd vim%{V_vs}/src
  133. CC="%{l_cc}" \
  134. CFLAGS="%{l_cflags -O}" \
  135. ./configure \
  136. --prefix=%{l_prefix} \
  137. --enable-max-features \
  138. --without-x \
  139. --with-tlib=termcap \
  140. --disable-gui
  141. %{l_make} %{l_mflags -O}
  142. )
  143. %install
  144. ( cd vim%{V_vs}/src
  145. rm -rf $RPM_BUILD_ROOT
  146. %{l_make} %{l_mflags} install \
  147. prefix=$RPM_BUILD_ROOT%{l_prefix}
  148. )
  149. strip $RPM_BUILD_ROOT%{l_prefix}/bin/vim
  150. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/xxd
  151. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/xxd.1
  152. for link in vi ex rview rvim view; do
  153. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/$link
  154. ln $RPM_BUILD_ROOT%{l_prefix}/bin/vim \
  155. $RPM_BUILD_ROOT%{l_prefix}/bin/$link
  156. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/$link.1
  157. ln $RPM_BUILD_ROOT%{l_prefix}/man/man1/vim.1 \
  158. $RPM_BUILD_ROOT%{l_prefix}/man/man1/$link.1
  159. done
  160. %{l_shtool} mkdir -f -p -m 755 \
  161. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  162. %{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \
  163. %{SOURCE rc.vim} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  164. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  165. %files -f files
  166. %clean
  167. rm -rf $RPM_BUILD_ROOT