vim.spec 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  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 158
  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: 20020819
  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. # build information
  110. Prefix: %{l_prefix}
  111. BuildRoot: %{l_buildroot}
  112. BuildPreReq: OpenPKG, openpkg >= 20020714
  113. PreReq: OpenPKG, openpkg >= 20020714
  114. %if "%{with_x11}" == "yes"
  115. BuildPreReq: X11, gtk
  116. PreReq: X11, gtk
  117. %endif
  118. AutoReq: no
  119. AutoReqProv: no
  120. %description
  121. Vim (Vi Improved) is a text editor that is upwards compatible with the
  122. classical Unix Vi. It can be used to edit any ASCII text. It is especially
  123. useful for editing programs. Vim offers a lot of enhancements not
  124. available in the traditional Vi. For example, Vim has multi level undo,
  125. multi windows and buffers, syntax highlighting, com- mand line editing,
  126. filename completion, on-line help, and visual selection.
  127. Options:
  128. --define 'with_x11 %{with_x11}'
  129. %prep
  130. %setup0 -q -c
  131. %setup1 -q -T -D -a 1
  132. %setup2 -q -T -D -a 2
  133. %setup3 -q -T -D -a 3
  134. %{l_gzip} -d -c $RPM_SOURCE_DIR/%{V_vl}.1-100.gz |\
  135. %{l_patch} -p0 -E -t -s >/dev/null 2>&1 || true
  136. i=101
  137. while [ $i -le %{V_pl} ]; do
  138. cat $RPM_SOURCE_DIR/%{V_vl}.`echo $i | awk '{ printf("%03d", $0); }'` |\
  139. %{l_patch} -p0 -E -t -s >/dev/null 2>&1 || true
  140. i=`expr $i + 1`
  141. done
  142. %build
  143. ( cd vim%{V_vs}/src
  144. CC="%{l_cc}" \
  145. CFLAGS="%{l_cflags -O}" \
  146. ./configure \
  147. --prefix=%{l_prefix} \
  148. --enable-max-features \
  149. --with-tlib=termcap \
  150. %if "%{with_x11}" == "yes"
  151. --with-x \
  152. --x-includes=`%{l_prefix}/etc/rc --query x11_incdir` \
  153. --x-libraries=`%{l_prefix}/etc/rc --query x11_libdir` \
  154. --enable-gui=gtk \
  155. --with-gtk-prefix=%{l_prefix} \
  156. --disable-gtktest \
  157. --without-gnome
  158. %else
  159. --without-x \
  160. --disable-gui
  161. %endif
  162. %{l_make} %{l_mflags -O}
  163. )
  164. %install
  165. ( cd vim%{V_vs}/src
  166. rm -rf $RPM_BUILD_ROOT
  167. %{l_make} %{l_mflags} install \
  168. prefix=$RPM_BUILD_ROOT%{l_prefix}
  169. )
  170. strip $RPM_BUILD_ROOT%{l_prefix}/bin/vim
  171. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/xxd
  172. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/xxd.1
  173. for link in vi ex rview rvim view; do
  174. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/$link
  175. ln $RPM_BUILD_ROOT%{l_prefix}/bin/vim \
  176. $RPM_BUILD_ROOT%{l_prefix}/bin/$link
  177. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/$link.1
  178. ln $RPM_BUILD_ROOT%{l_prefix}/man/man1/vim.1 \
  179. $RPM_BUILD_ROOT%{l_prefix}/man/man1/$link.1
  180. done
  181. %{l_shtool} mkdir -f -p -m 755 \
  182. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  183. %{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \
  184. %{SOURCE rc.vim} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  185. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  186. %files -f files
  187. %clean
  188. rm -rf $RPM_BUILD_ROOT