vim.spec 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  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 392
  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: 20030315
  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. Patch391: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.391
  146. Patch392: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.392
  147. # build information
  148. Prefix: %{l_prefix}
  149. BuildRoot: %{l_buildroot}
  150. BuildPreReq: OpenPKG, openpkg >= 20030103
  151. PreReq: OpenPKG, openpkg >= 20030103
  152. %if "%{with_x11}" == "yes"
  153. BuildPreReq: X11, gtk
  154. PreReq: X11, gtk
  155. %endif
  156. %if "%{with_perl}" == "yes"
  157. BuildPreReq: perl
  158. PreReq: perl
  159. %endif
  160. %if "%{with_python}" == "yes"
  161. BuildPreReq: python
  162. PreReq: python
  163. %endif
  164. AutoReq: no
  165. AutoReqProv: no
  166. %description
  167. Vim (Vi Improved) is a text editor that is upwards compatible with the
  168. classical Unix Vi. It can be used to edit any ASCII text. It is especially
  169. useful for editing programs. Vim offers a lot of enhancements not
  170. available in the traditional Vi. For example, Vim has multi level undo,
  171. multi windows and buffers, syntax highlighting, com- mand line editing,
  172. filename completion, on-line help, and visual selection.
  173. %prep
  174. %setup0 -q -c
  175. %setup1 -q -T -D -a 1
  176. %setup2 -q -T -D -a 2
  177. %setup3 -q -T -D -a 3
  178. %{l_gzip} -d -c $RPM_SOURCE_DIR/%{V_vl}.1-100.gz |\
  179. %{l_patch} -p0 -E -t -s >/dev/null 2>&1 || true
  180. %{l_gzip} -d -c $RPM_SOURCE_DIR/%{V_vl}.101-200.gz |\
  181. %{l_patch} -p0 -E -t -s >/dev/null 2>&1 || true
  182. %{l_gzip} -d -c $RPM_SOURCE_DIR/%{V_vl}.201-300.gz |\
  183. %{l_patch} -p0 -E -t -s >/dev/null 2>&1 || true
  184. i=301
  185. while [ $i -le %{V_pl} ]; do
  186. cat $RPM_SOURCE_DIR/%{V_vl}.`echo $i | awk '{ printf("%03d", $0); }'` |\
  187. %{l_patch} -p0 -E -t -s >/dev/null 2>&1 || true
  188. i=`expr $i + 1`
  189. done
  190. %build
  191. ( cd vim%{V_vs}/src
  192. CC="%{l_cc}" \
  193. CFLAGS="%{l_cflags -O}" \
  194. CPPFLAGS="%{l_cppflags}" \
  195. LDFLAGS="%{l_ldflags}" \
  196. ./configure \
  197. --prefix=%{l_prefix} \
  198. --with-tlib=termcap \
  199. %if "%{with_x11}" == "yes"
  200. --with-x \
  201. --x-includes=`%{l_prefix}/etc/rc --query x11_incdir` \
  202. --x-libraries=`%{l_prefix}/etc/rc --query x11_libdir` \
  203. --enable-gui=gtk \
  204. --with-gtk-prefix=%{l_prefix} \
  205. --disable-gtktest \
  206. --without-gnome \
  207. %else
  208. --without-x \
  209. --disable-gui \
  210. %endif
  211. %if "%{with_features}" == "huge"
  212. --with-features=huge \
  213. %else
  214. %if "%{with_features}" == "big"
  215. --with-features=big \
  216. %else
  217. %if "%{with_features}" == "small"
  218. --with-features=small \
  219. %else
  220. --with-features=normal \
  221. %endif
  222. %endif
  223. %endif
  224. %if "%{with_multibyte}" == "yes"
  225. --enable-multibyte \
  226. %endif
  227. %if "%{with_perl}" == "yes"
  228. --enable-perlinterp=%{l_prefix}/bin/perl \
  229. %endif
  230. %if "%{with_python}" == "yes"
  231. --enable-pythoninterp=%{l_prefix}/bin/python \
  232. %endif
  233. --disable-nls
  234. %{l_make} %{l_mflags -O}
  235. )
  236. %install
  237. ( cd vim%{V_vs}/src
  238. rm -rf $RPM_BUILD_ROOT
  239. %{l_make} %{l_mflags} install \
  240. prefix=$RPM_BUILD_ROOT%{l_prefix}
  241. )
  242. strip $RPM_BUILD_ROOT%{l_prefix}/bin/vim
  243. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/xxd
  244. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/xxd.1
  245. for link in vi ex rview rvim view; do
  246. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/$link
  247. ln $RPM_BUILD_ROOT%{l_prefix}/bin/vim \
  248. $RPM_BUILD_ROOT%{l_prefix}/bin/$link
  249. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/$link.1
  250. ln $RPM_BUILD_ROOT%{l_prefix}/man/man1/vim.1 \
  251. $RPM_BUILD_ROOT%{l_prefix}/man/man1/$link.1
  252. done
  253. %{l_shtool} mkdir -f -p -m 755 \
  254. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  255. %{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \
  256. %{SOURCE rc.vim} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  257. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  258. %files -f files
  259. %clean
  260. rm -rf $RPM_BUILD_ROOT