vim.spec 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  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 267
  29. # package options
  30. %option with_x11 no
  31. # package information
  32. Name: vim
  33. Summary: The Vi (Improved) Text Editor
  34. URL: http://www.vim.org/
  35. Vendor: Bram Moolenaar et al.
  36. Packager: The OpenPKG Project
  37. Distribution: OpenPKG [CORE]
  38. Group: Editor
  39. License: Charityware
  40. Version: %{V_vl}.%{V_pl}
  41. Release: 20021230
  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. # build information
  118. Prefix: %{l_prefix}
  119. BuildRoot: %{l_buildroot}
  120. BuildPreReq: OpenPKG, openpkg >= 20021230
  121. PreReq: OpenPKG, openpkg >= 20021230
  122. %if "%{with_x11}" == "yes"
  123. BuildPreReq: X11, gtk
  124. PreReq: X11, gtk
  125. %endif
  126. AutoReq: no
  127. AutoReqProv: no
  128. %description
  129. Vim (Vi Improved) is a text editor that is upwards compatible with the
  130. classical Unix Vi. It can be used to edit any ASCII text. It is especially
  131. useful for editing programs. Vim offers a lot of enhancements not
  132. available in the traditional Vi. For example, Vim has multi level undo,
  133. multi windows and buffers, syntax highlighting, com- mand line editing,
  134. filename completion, on-line help, and visual selection.
  135. %options
  136. %prep
  137. %setup0 -q -c
  138. %setup1 -q -T -D -a 1
  139. %setup2 -q -T -D -a 2
  140. %setup3 -q -T -D -a 3
  141. %{l_gzip} -d -c $RPM_SOURCE_DIR/%{V_vl}.1-100.gz |\
  142. %{l_patch} -p0 -E -t -s >/dev/null 2>&1 || true
  143. %{l_gzip} -d -c $RPM_SOURCE_DIR/%{V_vl}.101-200.gz |\
  144. %{l_patch} -p0 -E -t -s >/dev/null 2>&1 || true
  145. i=201
  146. while [ $i -le %{V_pl} ]; do
  147. cat $RPM_SOURCE_DIR/%{V_vl}.`echo $i | awk '{ printf("%03d", $0); }'` |\
  148. %{l_patch} -p0 -E -t -s >/dev/null 2>&1 || true
  149. i=`expr $i + 1`
  150. done
  151. %build
  152. ( cd vim%{V_vs}/src
  153. CC="%{l_cc}" \
  154. CFLAGS="%{l_cflags -O}" \
  155. CPPFLAGS="%{l_cppflags}" \
  156. LDFLAGS="%{l_ldflags}" \
  157. ./configure \
  158. --prefix=%{l_prefix} \
  159. --enable-max-features \
  160. --with-tlib=termcap \
  161. %if "%{with_x11}" == "yes"
  162. --with-x \
  163. --x-includes=`%{l_prefix}/etc/rc --query x11_incdir` \
  164. --x-libraries=`%{l_prefix}/etc/rc --query x11_libdir` \
  165. --enable-gui=gtk \
  166. --with-gtk-prefix=%{l_prefix} \
  167. --disable-gtktest \
  168. --without-gnome
  169. %else
  170. --without-x \
  171. --disable-gui
  172. %endif
  173. %{l_make} %{l_mflags -O}
  174. )
  175. %install
  176. ( cd vim%{V_vs}/src
  177. rm -rf $RPM_BUILD_ROOT
  178. %{l_make} %{l_mflags} install \
  179. prefix=$RPM_BUILD_ROOT%{l_prefix}
  180. )
  181. strip $RPM_BUILD_ROOT%{l_prefix}/bin/vim
  182. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/xxd
  183. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/xxd.1
  184. for link in vi ex rview rvim view; do
  185. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/$link
  186. ln $RPM_BUILD_ROOT%{l_prefix}/bin/vim \
  187. $RPM_BUILD_ROOT%{l_prefix}/bin/$link
  188. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/$link.1
  189. ln $RPM_BUILD_ROOT%{l_prefix}/man/man1/vim.1 \
  190. $RPM_BUILD_ROOT%{l_prefix}/man/man1/$link.1
  191. done
  192. %{l_shtool} mkdir -f -p -m 755 \
  193. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  194. %{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \
  195. %{SOURCE rc.vim} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  196. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  197. %files -f files
  198. %clean
  199. rm -rf $RPM_BUILD_ROOT