vim.spec 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  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 84
  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: 20020602
  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. # build information
  135. Prefix: %{l_prefix}
  136. BuildRoot: %{l_buildroot}
  137. BuildPreReq: OpenPKG, openpkg >= 20020206, gzip, patch
  138. PreReq: OpenPKG, openpkg >= 20020206
  139. %if "%{with_x11}" == "yes"
  140. BuildPreReq: X11, gtk
  141. PreReq: X11, gtk
  142. %endif
  143. AutoReq: no
  144. AutoReqProv: no
  145. %description
  146. Vim (Vi Improved) is a text editor that is upwards compatible to the
  147. classical Unix Vi. It can be used to edit any ASCII text. It is especially
  148. useful for editing programs. There are a lot of enhancements above Vi:
  149. multi level undo, multi windows and buffers, syntax highlighting, com-
  150. mand line editing, filename completion, on-line help, visual selection,
  151. etc.
  152. %prep
  153. %setup0 -q -c
  154. %setup1 -q -T -D -a 1
  155. %setup2 -q -T -D -a 2
  156. %setup3 -q -T -D -a 3
  157. i=1
  158. while [ $i -le %{V_pl} ]; do
  159. cat $RPM_SOURCE_DIR/%{V_vl}.`echo $i | awk '{ printf("%03d", $0); }'` |\
  160. %{l_prefix}/bin/patch -p0 -E -t -s >/dev/null 2>&1 || true
  161. i=`expr $i + 1`
  162. done
  163. %build
  164. ( cd vim%{V_vs}/src
  165. CC="%{l_cc}" \
  166. CFLAGS="%{l_cflags -O}" \
  167. ./configure \
  168. --prefix=%{l_prefix} \
  169. --enable-max-features \
  170. --with-tlib=termcap \
  171. %if "%{with_x11}" == "yes"
  172. --with-x \
  173. --x-includes=`%{l_prefix}/etc/rc --query x11_incdir` \
  174. --x-libraries=`%{l_prefix}/etc/rc --query x11_libdir` \
  175. --enable-gui=gtk \
  176. --with-gtk-prefix=%{l_prefix} \
  177. --disable-gtktest \
  178. --without-gnome
  179. %else
  180. --without-x \
  181. --disable-gui
  182. %endif
  183. %{l_make} %{l_mflags -O}
  184. )
  185. %install
  186. ( cd vim%{V_vs}/src
  187. rm -rf $RPM_BUILD_ROOT
  188. %{l_make} %{l_mflags} install \
  189. prefix=$RPM_BUILD_ROOT%{l_prefix}
  190. )
  191. strip $RPM_BUILD_ROOT%{l_prefix}/bin/vim
  192. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/xxd
  193. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/xxd.1
  194. for link in vi ex rview rvim view; do
  195. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/$link
  196. ln $RPM_BUILD_ROOT%{l_prefix}/bin/vim \
  197. $RPM_BUILD_ROOT%{l_prefix}/bin/$link
  198. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/$link.1
  199. ln $RPM_BUILD_ROOT%{l_prefix}/man/man1/vim.1 \
  200. $RPM_BUILD_ROOT%{l_prefix}/man/man1/$link.1
  201. done
  202. %{l_shtool} mkdir -f -p -m 755 \
  203. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  204. %{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \
  205. %{SOURCE rc.vim} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  206. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  207. %files -f files
  208. %clean
  209. rm -rf $RPM_BUILD_ROOT