vim.spec 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  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 390
  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: 20030313
  40. # package options
  41. %option with_x11 no
  42. %option with_features normal
  43. %option with_multibyte no
  44. %option with_perl no
  45. %option with_python no
  46. # list of sources
  47. Source0: ftp://ftp.vim.org/pub/vim/unix/vim-%{V_vl}-src1.tar.gz
  48. Source1: ftp://ftp.vim.org/pub/vim/unix/vim-%{V_vl}-src2.tar.gz
  49. Source2: ftp://ftp.vim.org/pub/vim/unix/vim-%{V_vl}-rt1.tar.gz
  50. Source3: ftp://ftp.vim.org/pub/vim/unix/vim-%{V_vl}-rt2.tar.gz
  51. Source4: rc.vim
  52. Patch1: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.1-100.gz
  53. Patch2: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.101-200.gz
  54. Patch3: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.201-300.gz
  55. Patch301: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.301
  56. Patch302: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.302
  57. Patch303: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.303
  58. Patch304: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.304
  59. Patch305: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.305
  60. Patch306: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.306
  61. Patch307: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.307
  62. Patch308: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.308
  63. Patch309: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.309
  64. Patch310: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.310
  65. Patch311: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.311
  66. Patch312: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.312
  67. Patch313: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.313
  68. Patch314: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.314
  69. Patch315: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.315
  70. Patch316: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.316
  71. Patch317: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.317
  72. Patch318: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.318
  73. Patch319: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.319
  74. Patch320: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.320
  75. Patch321: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.321
  76. Patch323: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.322
  77. Patch323: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.323
  78. Patch324: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.324
  79. Patch325: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.325
  80. Patch326: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.326
  81. Patch327: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.327
  82. Patch328: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.328
  83. Patch329: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.329
  84. Patch330: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.330
  85. Patch331: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.331
  86. Patch332: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.332
  87. Patch333: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.333
  88. Patch334: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.334
  89. Patch335: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.335
  90. Patch336: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.336
  91. Patch337: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.337
  92. Patch338: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.338
  93. Patch339: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.339
  94. Patch340: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.340
  95. Patch341: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.341
  96. Patch342: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.342
  97. Patch343: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.343
  98. Patch344: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.344
  99. Patch345: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.345
  100. Patch346: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.346
  101. Patch347: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.347
  102. Patch348: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.348
  103. Patch349: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.349
  104. Patch350: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.350
  105. Patch351: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.351
  106. Patch352: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.352
  107. Patch353: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.353
  108. Patch354: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.354
  109. Patch355: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.355
  110. Patch356: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.356
  111. Patch357: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.357
  112. Patch358: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.358
  113. Patch359: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.359
  114. Patch360: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.360
  115. Patch361: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.361
  116. Patch362: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.362
  117. Patch363: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.363
  118. Patch364: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.364
  119. Patch365: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.365
  120. Patch366: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.366
  121. Patch367: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.367
  122. Patch368: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.368
  123. Patch369: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.369
  124. Patch370: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.370
  125. Patch371: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.371
  126. Patch372: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.372
  127. Patch373: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.373
  128. Patch374: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.374
  129. Patch375: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.375
  130. Patch376: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.376
  131. Patch377: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.377
  132. Patch378: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.378
  133. Patch379: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.379
  134. Patch380: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.380
  135. Patch381: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.381
  136. Patch382: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.382
  137. Patch383: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.383
  138. Patch384: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.384
  139. Patch385: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.385
  140. Patch386: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.386
  141. Patch387: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.387
  142. Patch388: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.388
  143. Patch389: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.389
  144. Patch390: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.390
  145. # build information
  146. Prefix: %{l_prefix}
  147. BuildRoot: %{l_buildroot}
  148. BuildPreReq: OpenPKG, openpkg >= 20030103
  149. PreReq: OpenPKG, openpkg >= 20030103
  150. %if "%{with_x11}" == "yes"
  151. BuildPreReq: X11, gtk
  152. PreReq: X11, gtk
  153. %endif
  154. %if "%{with_perl}" == "yes"
  155. BuildPreReq: perl
  156. PreReq: perl
  157. %endif
  158. %if "%{with_python}" == "yes"
  159. BuildPreReq: python
  160. PreReq: python
  161. %endif
  162. AutoReq: no
  163. AutoReqProv: no
  164. %description
  165. Vim (Vi Improved) is a text editor that is upwards compatible with the
  166. classical Unix Vi. It can be used to edit any ASCII text. It is especially
  167. useful for editing programs. Vim offers a lot of enhancements not
  168. available in the traditional Vi. For example, Vim has multi level undo,
  169. multi windows and buffers, syntax highlighting, com- mand line editing,
  170. filename completion, on-line help, and visual selection.
  171. %prep
  172. %setup0 -q -c
  173. %setup1 -q -T -D -a 1
  174. %setup2 -q -T -D -a 2
  175. %setup3 -q -T -D -a 3
  176. %{l_gzip} -d -c $RPM_SOURCE_DIR/%{V_vl}.1-100.gz |\
  177. %{l_patch} -p0 -E -t -s >/dev/null 2>&1 || true
  178. %{l_gzip} -d -c $RPM_SOURCE_DIR/%{V_vl}.101-200.gz |\
  179. %{l_patch} -p0 -E -t -s >/dev/null 2>&1 || true
  180. %{l_gzip} -d -c $RPM_SOURCE_DIR/%{V_vl}.201-300.gz |\
  181. %{l_patch} -p0 -E -t -s >/dev/null 2>&1 || true
  182. i=301
  183. while [ $i -le %{V_pl} ]; do
  184. cat $RPM_SOURCE_DIR/%{V_vl}.`echo $i | awk '{ printf("%03d", $0); }'` |\
  185. %{l_patch} -p0 -E -t -s >/dev/null 2>&1 || true
  186. i=`expr $i + 1`
  187. done
  188. %build
  189. ( cd vim%{V_vs}/src
  190. CC="%{l_cc}" \
  191. CFLAGS="%{l_cflags -O}" \
  192. CPPFLAGS="%{l_cppflags}" \
  193. LDFLAGS="%{l_ldflags}" \
  194. ./configure \
  195. --prefix=%{l_prefix} \
  196. --with-tlib=termcap \
  197. %if "%{with_x11}" == "yes"
  198. --with-x \
  199. --x-includes=`%{l_prefix}/etc/rc --query x11_incdir` \
  200. --x-libraries=`%{l_prefix}/etc/rc --query x11_libdir` \
  201. --enable-gui=gtk \
  202. --with-gtk-prefix=%{l_prefix} \
  203. --disable-gtktest \
  204. --without-gnome \
  205. %else
  206. --without-x \
  207. --disable-gui \
  208. %endif
  209. %if "%{with_features}" == "huge"
  210. --with-features=huge \
  211. %else
  212. %if "%{with_features}" == "big"
  213. --with-features=big \
  214. %else
  215. %if "%{with_features}" == "small"
  216. --with-features=small \
  217. %else
  218. --with-features=normal \
  219. %endif
  220. %endif
  221. %endif
  222. %if "%{with_multibyte}" == "yes"
  223. --enable-multibyte \
  224. %endif
  225. %if "%{with_perl}" == "yes"
  226. --enable-perlinterp=%{l_prefix}/bin/perl \
  227. %endif
  228. %if "%{with_python}" == "yes"
  229. --enable-pythoninterp=%{l_prefix}/bin/python \
  230. %endif
  231. --disable-nls
  232. %{l_make} %{l_mflags -O}
  233. )
  234. %install
  235. ( cd vim%{V_vs}/src
  236. rm -rf $RPM_BUILD_ROOT
  237. %{l_make} %{l_mflags} install \
  238. prefix=$RPM_BUILD_ROOT%{l_prefix}
  239. )
  240. strip $RPM_BUILD_ROOT%{l_prefix}/bin/vim
  241. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/xxd
  242. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/xxd.1
  243. for link in vi ex rview rvim view; do
  244. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/$link
  245. ln $RPM_BUILD_ROOT%{l_prefix}/bin/vim \
  246. $RPM_BUILD_ROOT%{l_prefix}/bin/$link
  247. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/$link.1
  248. ln $RPM_BUILD_ROOT%{l_prefix}/man/man1/vim.1 \
  249. $RPM_BUILD_ROOT%{l_prefix}/man/man1/$link.1
  250. done
  251. %{l_shtool} mkdir -f -p -m 755 \
  252. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  253. %{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \
  254. %{SOURCE rc.vim} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  255. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  256. %files -f files
  257. %clean
  258. rm -rf $RPM_BUILD_ROOT