vim.spec 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  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 288
  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: 20030113
  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. Patch285: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.285
  135. Patch286: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.286
  136. Patch287: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.287
  137. Patch288: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.288
  138. # build information
  139. Prefix: %{l_prefix}
  140. BuildRoot: %{l_buildroot}
  141. BuildPreReq: OpenPKG, openpkg >= 20030103
  142. PreReq: OpenPKG, openpkg >= 20030103
  143. %if "%{with_x11}" == "yes"
  144. BuildPreReq: X11, gtk
  145. PreReq: X11, gtk
  146. %endif
  147. AutoReq: no
  148. AutoReqProv: no
  149. %description
  150. Vim (Vi Improved) is a text editor that is upwards compatible with the
  151. classical Unix Vi. It can be used to edit any ASCII text. It is especially
  152. useful for editing programs. Vim offers a lot of enhancements not
  153. available in the traditional Vi. For example, Vim has multi level undo,
  154. multi windows and buffers, syntax highlighting, com- mand line editing,
  155. filename completion, on-line help, and visual selection.
  156. %prep
  157. %setup0 -q -c
  158. %setup1 -q -T -D -a 1
  159. %setup2 -q -T -D -a 2
  160. %setup3 -q -T -D -a 3
  161. %{l_gzip} -d -c $RPM_SOURCE_DIR/%{V_vl}.1-100.gz |\
  162. %{l_patch} -p0 -E -t -s >/dev/null 2>&1 || true
  163. %{l_gzip} -d -c $RPM_SOURCE_DIR/%{V_vl}.101-200.gz |\
  164. %{l_patch} -p0 -E -t -s >/dev/null 2>&1 || true
  165. i=201
  166. while [ $i -le %{V_pl} ]; do
  167. cat $RPM_SOURCE_DIR/%{V_vl}.`echo $i | awk '{ printf("%03d", $0); }'` |\
  168. %{l_patch} -p0 -E -t -s >/dev/null 2>&1 || true
  169. i=`expr $i + 1`
  170. done
  171. %build
  172. ( cd vim%{V_vs}/src
  173. CC="%{l_cc}" \
  174. CFLAGS="%{l_cflags -O}" \
  175. CPPFLAGS="%{l_cppflags}" \
  176. LDFLAGS="%{l_ldflags}" \
  177. ./configure \
  178. --prefix=%{l_prefix} \
  179. --enable-max-features \
  180. --with-tlib=termcap \
  181. %if "%{with_x11}" == "yes"
  182. --with-x \
  183. --x-includes=`%{l_prefix}/etc/rc --query x11_incdir` \
  184. --x-libraries=`%{l_prefix}/etc/rc --query x11_libdir` \
  185. --enable-gui=gtk \
  186. --with-gtk-prefix=%{l_prefix} \
  187. --disable-gtktest \
  188. --without-gnome
  189. %else
  190. --without-x \
  191. --disable-gui
  192. %endif
  193. %{l_make} %{l_mflags -O}
  194. )
  195. %install
  196. ( cd vim%{V_vs}/src
  197. rm -rf $RPM_BUILD_ROOT
  198. %{l_make} %{l_mflags} install \
  199. prefix=$RPM_BUILD_ROOT%{l_prefix}
  200. )
  201. strip $RPM_BUILD_ROOT%{l_prefix}/bin/vim
  202. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/xxd
  203. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/xxd.1
  204. for link in vi ex rview rvim view; do
  205. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/$link
  206. ln $RPM_BUILD_ROOT%{l_prefix}/bin/vim \
  207. $RPM_BUILD_ROOT%{l_prefix}/bin/$link
  208. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/$link.1
  209. ln $RPM_BUILD_ROOT%{l_prefix}/man/man1/vim.1 \
  210. $RPM_BUILD_ROOT%{l_prefix}/man/man1/$link.1
  211. done
  212. %{l_shtool} mkdir -f -p -m 755 \
  213. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  214. %{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \
  215. %{SOURCE rc.vim} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  216. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  217. %files -f files
  218. %clean
  219. rm -rf $RPM_BUILD_ROOT