vim.spec 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  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.0
  26. %define V_vs 60
  27. %define V_pl 270
  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: 20020222
  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. Source4: rc.vim
  45. Patch0: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.1-200.gz
  46. Patch201: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.201
  47. Patch202: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.202
  48. Patch203: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.203
  49. Patch204: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.204
  50. Patch205: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.205
  51. Patch206: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.206
  52. Patch207: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.207
  53. Patch208: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.208
  54. Patch209: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.209
  55. Patch210: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.210
  56. Patch211: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.211
  57. Patch212: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.212
  58. Patch213: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.213
  59. Patch214: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.214
  60. Patch215: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.215
  61. Patch216: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.216
  62. Patch217: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.217
  63. Patch218: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.218
  64. Patch219: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.219
  65. Patch220: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.220
  66. Patch221: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.221
  67. Patch222: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.222
  68. Patch223: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.223
  69. Patch224: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.224
  70. Patch225: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.225
  71. Patch226: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.226
  72. Patch227: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.227
  73. Patch228: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.228
  74. Patch229: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.229
  75. Patch230: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.230
  76. Patch231: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.231
  77. Patch232: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.232
  78. Patch233: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.233
  79. Patch234: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.234
  80. Patch235: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.235
  81. Patch236: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.236
  82. Patch237: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.237
  83. Patch238: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.238
  84. Patch239: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.239
  85. Patch240: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.240
  86. Patch241: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.241
  87. Patch242: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.242
  88. Patch243: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.243
  89. Patch244: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.244
  90. Patch245: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.245
  91. Patch246: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.246
  92. Patch247: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.247
  93. Patch248: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.248
  94. Patch249: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.249
  95. Patch250: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.250
  96. Patch251: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.251
  97. Patch252: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.252
  98. Patch253: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.253
  99. Patch254: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.254
  100. Patch255: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.255
  101. Patch256: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.256
  102. Patch257: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.257
  103. Patch258: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.258
  104. Patch259: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.259
  105. Patch260: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.260
  106. Patch261: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.261
  107. Patch262: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.262
  108. Patch263: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.263
  109. Patch264: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.264
  110. Patch265: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.265
  111. Patch266: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.266
  112. Patch267: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.267
  113. Patch268: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.268
  114. Patch269: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.269
  115. Patch270: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.270
  116. # build information
  117. Prefix: %{l_prefix}
  118. BuildRoot: %{l_buildroot}
  119. BuildPreReq: OpenPKG, openpkg >= 20020206, gzip, patch
  120. PreReq: OpenPKG, openpkg >= 20020206
  121. AutoReq: no
  122. AutoReqProv: no
  123. %description
  124. Vim (Vi Improved) is a text editor that is upwards compatible to the
  125. classical Unix Vi. It can be used to edit any ASCII text. It is especially
  126. useful for editing programs. There are a lot of enhancements above Vi:
  127. multi level undo, multi windows and buffers, syntax highlighting, com-
  128. mand line editing, filename completion, on-line help, visual selection,
  129. etc.
  130. %prep
  131. %setup0 -q -c
  132. %setup1 -q -T -D -a 1
  133. %setup2 -q -T -D -a 2
  134. %setup3 -q -T -D -a 3
  135. cd vim%{V_vs}
  136. # apply vendor mega patch 6.0.001-6.0.200
  137. %{l_prefix}/bin/gzip -d -c %{PATCH 6.0.1-200.gz} |\
  138. %{l_prefix}/bin/patch -p0 -E -t -s >/dev/null 2>&1 || true
  139. # apply remaining vendor patches 6.0.201-6.0.xxx
  140. i=201
  141. while [ $i -le 270 ]; do
  142. cat $RPM_SOURCE_DIR/6.0.$i |\
  143. %{l_prefix}/bin/patch -p0 -E -t -s >/dev/null 2>&1 || true
  144. i=`expr $i + 1`
  145. done
  146. # prevent execution of autoconf
  147. touch src/auto/configure
  148. %build
  149. ( cd vim%{V_vs}/src
  150. CC="%{l_cc}" \
  151. CFLAGS="%{l_cflags -O}" \
  152. ./configure \
  153. --prefix=%{l_prefix} \
  154. --enable-max-features \
  155. --without-x \
  156. --with-tlib=termcap \
  157. --disable-gui
  158. %{l_make} %{l_mflags -O}
  159. )
  160. %install
  161. ( cd vim%{V_vs}/src
  162. rm -rf $RPM_BUILD_ROOT
  163. %{l_make} %{l_mflags} install prefix=$RPM_BUILD_ROOT%{l_prefix}
  164. )
  165. strip $RPM_BUILD_ROOT%{l_prefix}/bin/vim
  166. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/xxd
  167. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/xxd.1
  168. for link in vi ex rview rvim view; do
  169. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/$link
  170. ln $RPM_BUILD_ROOT%{l_prefix}/bin/vim \
  171. $RPM_BUILD_ROOT%{l_prefix}/bin/$link
  172. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/$link.1
  173. ln $RPM_BUILD_ROOT%{l_prefix}/man/man1/vim.1 \
  174. $RPM_BUILD_ROOT%{l_prefix}/man/man1/$link.1
  175. done
  176. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  177. %{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \
  178. %{SOURCE rc.vim} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  179. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  180. %files -f files
  181. %clean
  182. rm -rf $RPM_BUILD_ROOT