vim.spec 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  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 186
  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: 20020918
  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. Patch101: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.101
  52. Patch102: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.102
  53. Patch103: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.103
  54. Patch104: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.104
  55. Patch105: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.105
  56. Patch106: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.106
  57. Patch107: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.107
  58. Patch108: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.108
  59. Patch109: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.109
  60. Patch110: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.110
  61. Patch111: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.111
  62. Patch112: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.112
  63. Patch113: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.113
  64. Patch114: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.114
  65. Patch115: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.115
  66. Patch116: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.116
  67. Patch117: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.117
  68. Patch118: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.118
  69. Patch119: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.119
  70. Patch120: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.120
  71. Patch121: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.121
  72. Patch122: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.122
  73. Patch123: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.123
  74. Patch124: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.124
  75. Patch125: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.125
  76. Patch126: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.126
  77. Patch127: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.127
  78. Patch128: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.128
  79. Patch129: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.129
  80. Patch130: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.130
  81. Patch131: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.131
  82. Patch132: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.132
  83. Patch133: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.133
  84. Patch134: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.134
  85. Patch135: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.135
  86. Patch136: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.136
  87. Patch137: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.137
  88. Patch138: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.138
  89. Patch139: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.139
  90. Patch140: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.140
  91. Patch141: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.141
  92. Patch142: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.142
  93. Patch143: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.143
  94. Patch144: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.144
  95. Patch145: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.145
  96. Patch146: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.146
  97. Patch147: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.147
  98. Patch148: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.148
  99. Patch149: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.149
  100. Patch150: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.150
  101. Patch151: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.151
  102. Patch152: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.152
  103. Patch153: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.153
  104. Patch154: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.154
  105. Patch155: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.155
  106. Patch156: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.156
  107. Patch157: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.157
  108. Patch158: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.158
  109. Patch159: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.159
  110. Patch160: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.160
  111. Patch161: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.161
  112. Patch162: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.162
  113. Patch163: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.163
  114. Patch164: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.164
  115. Patch165: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.165
  116. Patch166: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.166
  117. Patch167: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.167
  118. Patch168: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.168
  119. Patch169: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.169
  120. Patch170: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.170
  121. Patch171: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.171
  122. Patch172: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.172
  123. Patch173: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.173
  124. Patch174: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.174
  125. Patch175: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.175
  126. Patch176: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.176
  127. Patch177: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.177
  128. Patch178: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.178
  129. Patch179: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.179
  130. Patch180: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.180
  131. Patch181: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.181
  132. Patch182: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.182
  133. Patch183: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.183
  134. Patch184: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.184
  135. Patch185: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.185
  136. Patch186: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.186
  137. # build information
  138. Prefix: %{l_prefix}
  139. BuildRoot: %{l_buildroot}
  140. BuildPreReq: OpenPKG, openpkg >= 20020714
  141. PreReq: OpenPKG, openpkg >= 20020714
  142. %if "%{with_x11}" == "yes"
  143. BuildPreReq: X11, gtk
  144. PreReq: X11, gtk
  145. %endif
  146. AutoReq: no
  147. AutoReqProv: no
  148. %description
  149. Vim (Vi Improved) is a text editor that is upwards compatible with the
  150. classical Unix Vi. It can be used to edit any ASCII text. It is especially
  151. useful for editing programs. Vim offers a lot of enhancements not
  152. available in the traditional Vi. For example, Vim has multi level undo,
  153. multi windows and buffers, syntax highlighting, com- mand line editing,
  154. filename completion, on-line help, and visual selection.
  155. Options:
  156. --define 'with_x11 %{with_x11}'
  157. %prep
  158. %setup0 -q -c
  159. %setup1 -q -T -D -a 1
  160. %setup2 -q -T -D -a 2
  161. %setup3 -q -T -D -a 3
  162. %{l_gzip} -d -c $RPM_SOURCE_DIR/%{V_vl}.1-100.gz |\
  163. %{l_patch} -p0 -E -t -s >/dev/null 2>&1 || true
  164. i=101
  165. while [ $i -le %{V_pl} ]; do
  166. cat $RPM_SOURCE_DIR/%{V_vl}.`echo $i | awk '{ printf("%03d", $0); }'` |\
  167. %{l_patch} -p0 -E -t -s >/dev/null 2>&1 || true
  168. i=`expr $i + 1`
  169. done
  170. %build
  171. ( cd vim%{V_vs}/src
  172. CC="%{l_cc}" \
  173. CFLAGS="%{l_cflags -O}" \
  174. ./configure \
  175. --prefix=%{l_prefix} \
  176. --enable-max-features \
  177. --with-tlib=termcap \
  178. %if "%{with_x11}" == "yes"
  179. --with-x \
  180. --x-includes=`%{l_prefix}/etc/rc --query x11_incdir` \
  181. --x-libraries=`%{l_prefix}/etc/rc --query x11_libdir` \
  182. --enable-gui=gtk \
  183. --with-gtk-prefix=%{l_prefix} \
  184. --disable-gtktest \
  185. --without-gnome
  186. %else
  187. --without-x \
  188. --disable-gui
  189. %endif
  190. %{l_make} %{l_mflags -O}
  191. )
  192. %install
  193. ( cd vim%{V_vs}/src
  194. rm -rf $RPM_BUILD_ROOT
  195. %{l_make} %{l_mflags} install \
  196. prefix=$RPM_BUILD_ROOT%{l_prefix}
  197. )
  198. strip $RPM_BUILD_ROOT%{l_prefix}/bin/vim
  199. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/xxd
  200. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/xxd.1
  201. for link in vi ex rview rvim view; do
  202. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/$link
  203. ln $RPM_BUILD_ROOT%{l_prefix}/bin/vim \
  204. $RPM_BUILD_ROOT%{l_prefix}/bin/$link
  205. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/$link.1
  206. ln $RPM_BUILD_ROOT%{l_prefix}/man/man1/vim.1 \
  207. $RPM_BUILD_ROOT%{l_prefix}/man/man1/$link.1
  208. done
  209. %{l_shtool} mkdir -f -p -m 755 \
  210. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  211. %{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \
  212. %{SOURCE rc.vim} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  213. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  214. %files -f files
  215. %clean
  216. rm -rf $RPM_BUILD_ROOT