vim.spec 7.5 KB

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