vim.spec 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. ##
  2. ## vim.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2003 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 versions
  26. %define V_vl 6.1
  27. %define V_vs 61
  28. %define V_pl 284
  29. # package information
  30. Name: vim
  31. Summary: The Vi (Improved) Text Editor
  32. URL: http://www.vim.org/
  33. Vendor: Bram Moolenaar et al.
  34. Packager: The OpenPKG Project
  35. Distribution: OpenPKG [CORE]
  36. Group: Editor
  37. License: Charityware
  38. Version: %{V_vl}.%{V_pl}
  39. Release: 20030108
  40. # package options
  41. %option with_x11 no
  42. # list of sources
  43. Source0: ftp://ftp.vim.org/pub/vim/unix/vim-%{V_vl}-src1.tar.gz
  44. Source1: ftp://ftp.vim.org/pub/vim/unix/vim-%{V_vl}-src2.tar.gz
  45. Source2: ftp://ftp.vim.org/pub/vim/unix/vim-%{V_vl}-rt1.tar.gz
  46. Source3: ftp://ftp.vim.org/pub/vim/unix/vim-%{V_vl}-rt2.tar.gz
  47. Source6: rc.vim
  48. Patch1: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.1-100.gz
  49. Patch2: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.101-200.gz
  50. Patch201: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.201
  51. Patch202: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.202
  52. Patch203: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.203
  53. Patch204: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.204
  54. Patch205: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.205
  55. Patch206: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.206
  56. Patch207: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.207
  57. Patch208: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.208
  58. Patch209: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.209
  59. Patch210: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.210
  60. Patch211: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.211
  61. Patch212: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.212
  62. Patch213: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.213
  63. Patch214: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.214
  64. Patch215: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.215
  65. Patch216: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.216
  66. Patch217: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.217
  67. Patch218: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.218
  68. Patch219: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.219
  69. Patch220: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.220
  70. Patch221: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.221
  71. Patch222: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.222
  72. Patch223: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.223
  73. Patch224: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.224
  74. Patch225: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.225
  75. Patch226: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.226
  76. Patch227: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.227
  77. Patch228: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.228
  78. Patch229: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.229
  79. Patch230: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.230
  80. Patch231: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.231
  81. Patch232: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.232
  82. Patch233: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.233
  83. Patch234: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.234
  84. Patch235: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.235
  85. Patch236: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.236
  86. Patch237: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.237
  87. Patch238: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.238
  88. Patch239: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.239
  89. Patch240: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.240
  90. Patch241: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.241
  91. Patch242: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.242
  92. Patch243: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.243
  93. Patch244: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.244
  94. Patch245: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.245
  95. Patch246: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.246
  96. Patch247: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.247
  97. Patch248: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.248
  98. Patch249: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.249
  99. Patch250: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.250
  100. Patch251: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.251
  101. Patch252: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.252
  102. Patch253: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.253
  103. Patch254: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.254
  104. Patch255: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.255
  105. Patch256: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.256
  106. Patch257: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.257
  107. Patch258: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.258
  108. Patch259: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.259
  109. Patch260: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.260
  110. Patch261: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.261
  111. Patch262: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.262
  112. Patch263: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.263
  113. Patch264: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.264
  114. Patch265: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.265
  115. Patch266: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.266
  116. Patch267: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.267
  117. Patch268: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.268
  118. Patch269: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.269
  119. Patch270: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.270
  120. Patch271: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.271
  121. Patch272: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.272
  122. Patch273: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.273
  123. Patch274: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.274
  124. Patch275: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.275
  125. Patch276: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.276
  126. Patch277: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.277
  127. Patch278: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.278
  128. Patch279: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.279
  129. Patch280: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.280
  130. Patch281: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.281
  131. Patch282: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.282
  132. Patch283: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.283
  133. Patch284: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.284
  134. # build information
  135. Prefix: %{l_prefix}
  136. BuildRoot: %{l_buildroot}
  137. BuildPreReq: OpenPKG, openpkg >= 20030103
  138. PreReq: OpenPKG, openpkg >= 20030103
  139. %if "%{with_x11}" == "yes"
  140. BuildPreReq: X11, gtk
  141. PreReq: X11, gtk
  142. %endif
  143. AutoReq: no
  144. AutoReqProv: no
  145. %description
  146. Vim (Vi Improved) is a text editor that is upwards compatible with the
  147. classical Unix Vi. It can be used to edit any ASCII text. It is especially
  148. useful for editing programs. Vim offers a lot of enhancements not
  149. available in the traditional Vi. For example, Vim has multi level undo,
  150. multi windows and buffers, syntax highlighting, com- mand line editing,
  151. filename completion, on-line help, and visual selection.
  152. %prep
  153. %setup0 -q -c
  154. %setup1 -q -T -D -a 1
  155. %setup2 -q -T -D -a 2
  156. %setup3 -q -T -D -a 3
  157. %{l_gzip} -d -c $RPM_SOURCE_DIR/%{V_vl}.1-100.gz |\
  158. %{l_patch} -p0 -E -t -s >/dev/null 2>&1 || true
  159. %{l_gzip} -d -c $RPM_SOURCE_DIR/%{V_vl}.101-200.gz |\
  160. %{l_patch} -p0 -E -t -s >/dev/null 2>&1 || true
  161. i=201
  162. while [ $i -le %{V_pl} ]; do
  163. cat $RPM_SOURCE_DIR/%{V_vl}.`echo $i | awk '{ printf("%03d", $0); }'` |\
  164. %{l_patch} -p0 -E -t -s >/dev/null 2>&1 || true
  165. i=`expr $i + 1`
  166. done
  167. %build
  168. ( cd vim%{V_vs}/src
  169. CC="%{l_cc}" \
  170. CFLAGS="%{l_cflags -O}" \
  171. CPPFLAGS="%{l_cppflags}" \
  172. LDFLAGS="%{l_ldflags}" \
  173. ./configure \
  174. --prefix=%{l_prefix} \
  175. --enable-max-features \
  176. --with-tlib=termcap \
  177. %if "%{with_x11}" == "yes"
  178. --with-x \
  179. --x-includes=`%{l_prefix}/etc/rc --query x11_incdir` \
  180. --x-libraries=`%{l_prefix}/etc/rc --query x11_libdir` \
  181. --enable-gui=gtk \
  182. --with-gtk-prefix=%{l_prefix} \
  183. --disable-gtktest \
  184. --without-gnome
  185. %else
  186. --without-x \
  187. --disable-gui
  188. %endif
  189. %{l_make} %{l_mflags -O}
  190. )
  191. %install
  192. ( cd vim%{V_vs}/src
  193. rm -rf $RPM_BUILD_ROOT
  194. %{l_make} %{l_mflags} install \
  195. prefix=$RPM_BUILD_ROOT%{l_prefix}
  196. )
  197. strip $RPM_BUILD_ROOT%{l_prefix}/bin/vim
  198. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/xxd
  199. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/xxd.1
  200. for link in vi ex rview rvim view; do
  201. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/$link
  202. ln $RPM_BUILD_ROOT%{l_prefix}/bin/vim \
  203. $RPM_BUILD_ROOT%{l_prefix}/bin/$link
  204. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/$link.1
  205. ln $RPM_BUILD_ROOT%{l_prefix}/man/man1/vim.1 \
  206. $RPM_BUILD_ROOT%{l_prefix}/man/man1/$link.1
  207. done
  208. %{l_shtool} mkdir -f -p -m 755 \
  209. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  210. %{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \
  211. %{SOURCE rc.vim} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  212. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  213. %files -f files
  214. %clean
  215. rm -rf $RPM_BUILD_ROOT