vim.spec 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  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 126
  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 [REL]
  40. Group: Editor
  41. License: Charityware
  42. Version: %{V_vl}.%{V_pl}
  43. Release: 20020710
  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}.001
  51. Patch2: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.002
  52. Patch3: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.003
  53. Patch4: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.004
  54. Patch5: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.005
  55. Patch6: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.006
  56. Patch7: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.007
  57. Patch8: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.008
  58. Patch9: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.009
  59. Patch10: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.010
  60. Patch11: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.011
  61. Patch12: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.012
  62. Patch13: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.013
  63. Patch14: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.014
  64. Patch15: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.015
  65. Patch16: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.016
  66. Patch17: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.017
  67. Patch18: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.018
  68. Patch19: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.019
  69. Patch20: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.020
  70. Patch21: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.021
  71. Patch22: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.022
  72. Patch23: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.023
  73. Patch24: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.024
  74. Patch25: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.025
  75. Patch26: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.026
  76. Patch27: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.027
  77. Patch28: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.028
  78. Patch29: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.029
  79. Patch30: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.030
  80. Patch31: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.031
  81. Patch32: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.032
  82. Patch33: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.033
  83. Patch34: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.034
  84. Patch35: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.035
  85. Patch36: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.036
  86. Patch37: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.037
  87. Patch38: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.038
  88. Patch39: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.039
  89. Patch40: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.040
  90. Patch41: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.041
  91. Patch42: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.042
  92. Patch43: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.043
  93. Patch44: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.044
  94. Patch45: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.045
  95. Patch46: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.046
  96. Patch47: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.047
  97. Patch48: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.048
  98. Patch49: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.049
  99. Patch50: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.050
  100. Patch51: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.051
  101. Patch52: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.052
  102. Patch53: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.053
  103. Patch54: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.054
  104. Patch55: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.055
  105. Patch56: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.056
  106. Patch57: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.057
  107. Patch58: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.058
  108. Patch59: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.059
  109. Patch60: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.060
  110. Patch61: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.061
  111. Patch62: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.062
  112. Patch63: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.063
  113. Patch64: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.064
  114. Patch65: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.065
  115. Patch66: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.066
  116. Patch67: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.067
  117. Patch68: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.068
  118. Patch69: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.069
  119. Patch70: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.070
  120. Patch71: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.071
  121. Patch72: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.072
  122. Patch73: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.073
  123. Patch74: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.074
  124. Patch75: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.075
  125. Patch76: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.076
  126. Patch77: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.077
  127. Patch78: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.078
  128. Patch79: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.079
  129. Patch80: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.080
  130. Patch81: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.081
  131. Patch82: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.082
  132. Patch83: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.083
  133. Patch84: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.084
  134. Patch85: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.085
  135. Patch86: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.086
  136. Patch87: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.087
  137. Patch88: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.088
  138. Patch89: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.089
  139. Patch90: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.090
  140. Patch91: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.091
  141. Patch92: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.092
  142. Patch93: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.093
  143. Patch94: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.094
  144. Patch95: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.095
  145. Patch96: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.096
  146. Patch97: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.097
  147. Patch98: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.098
  148. Patch99: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.099
  149. Patch100: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.100
  150. Patch101: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.101
  151. Patch102: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.102
  152. Patch103: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.103
  153. Patch104: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.104
  154. Patch105: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.105
  155. Patch106: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.106
  156. Patch107: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.107
  157. Patch108: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.108
  158. Patch109: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.109
  159. Patch110: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.110
  160. Patch111: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.111
  161. Patch112: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.112
  162. Patch113: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.113
  163. Patch114: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.114
  164. Patch115: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.115
  165. Patch116: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.116
  166. Patch117: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.117
  167. Patch118: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.118
  168. Patch119: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.119
  169. Patch120: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.120
  170. Patch121: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.121
  171. Patch122: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.122
  172. Patch123: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.123
  173. Patch124: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.124
  174. Patch125: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.125
  175. Patch126: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.126
  176. # build information
  177. Prefix: %{l_prefix}
  178. BuildRoot: %{l_buildroot}
  179. BuildPreReq: OpenPKG, openpkg >= 20020206, gzip, patch
  180. PreReq: OpenPKG, openpkg >= 20020206
  181. %if "%{with_x11}" == "yes"
  182. BuildPreReq: X11, gtk
  183. PreReq: X11, gtk
  184. %endif
  185. AutoReq: no
  186. AutoReqProv: no
  187. %description
  188. Vim (Vi Improved) is a text editor that is upwards compatible with the
  189. classical Unix Vi. It can be used to edit any ASCII text. It is especially
  190. useful for editing programs. Vim offers a lot of enhancements not
  191. available in the traditional Vi. For example, Vim has multi level undo,
  192. multi windows and buffers, syntax highlighting, com- mand line editing,
  193. filename completion, on-line help, and visual selection.
  194. %prep
  195. %setup0 -q -c
  196. %setup1 -q -T -D -a 1
  197. %setup2 -q -T -D -a 2
  198. %setup3 -q -T -D -a 3
  199. i=1
  200. while [ $i -le %{V_pl} ]; do
  201. cat $RPM_SOURCE_DIR/%{V_vl}.`echo $i | awk '{ printf("%03d", $0); }'` |\
  202. %{l_prefix}/bin/patch -p0 -E -t -s >/dev/null 2>&1 || true
  203. i=`expr $i + 1`
  204. done
  205. %build
  206. ( cd vim%{V_vs}/src
  207. CC="%{l_cc}" \
  208. CFLAGS="%{l_cflags -O}" \
  209. ./configure \
  210. --prefix=%{l_prefix} \
  211. --enable-max-features \
  212. --with-tlib=termcap \
  213. %if "%{with_x11}" == "yes"
  214. --with-x \
  215. --x-includes=`%{l_prefix}/etc/rc --query x11_incdir` \
  216. --x-libraries=`%{l_prefix}/etc/rc --query x11_libdir` \
  217. --enable-gui=gtk \
  218. --with-gtk-prefix=%{l_prefix} \
  219. --disable-gtktest \
  220. --without-gnome
  221. %else
  222. --without-x \
  223. --disable-gui
  224. %endif
  225. %{l_make} %{l_mflags -O}
  226. )
  227. %install
  228. ( cd vim%{V_vs}/src
  229. rm -rf $RPM_BUILD_ROOT
  230. %{l_make} %{l_mflags} install \
  231. prefix=$RPM_BUILD_ROOT%{l_prefix}
  232. )
  233. strip $RPM_BUILD_ROOT%{l_prefix}/bin/vim
  234. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/xxd
  235. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/xxd.1
  236. for link in vi ex rview rvim view; do
  237. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/$link
  238. ln $RPM_BUILD_ROOT%{l_prefix}/bin/vim \
  239. $RPM_BUILD_ROOT%{l_prefix}/bin/$link
  240. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/$link.1
  241. ln $RPM_BUILD_ROOT%{l_prefix}/man/man1/vim.1 \
  242. $RPM_BUILD_ROOT%{l_prefix}/man/man1/$link.1
  243. done
  244. %{l_shtool} mkdir -f -p -m 755 \
  245. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  246. %{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \
  247. %{SOURCE rc.vim} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  248. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  249. %files -f files
  250. %clean
  251. rm -rf $RPM_BUILD_ROOT