vim.spec 11 KB

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