vim.spec 8.8 KB

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