vim.spec 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  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 213
  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: 20021009
  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. Patch2: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.101-200.gz
  52. Patch201: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.201
  53. Patch202: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.202
  54. Patch203: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.203
  55. Patch204: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.204
  56. Patch205: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.205
  57. Patch206: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.206
  58. Patch209: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.209
  59. Patch212: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.212
  60. Patch213: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.213
  61. # build information
  62. Prefix: %{l_prefix}
  63. BuildRoot: %{l_buildroot}
  64. BuildPreReq: OpenPKG, openpkg >= 20020714
  65. PreReq: OpenPKG, openpkg >= 20020714
  66. %if "%{with_x11}" == "yes"
  67. BuildPreReq: X11, gtk
  68. PreReq: X11, gtk
  69. %endif
  70. AutoReq: no
  71. AutoReqProv: no
  72. %description
  73. Vim (Vi Improved) is a text editor that is upwards compatible with the
  74. classical Unix Vi. It can be used to edit any ASCII text. It is especially
  75. useful for editing programs. Vim offers a lot of enhancements not
  76. available in the traditional Vi. For example, Vim has multi level undo,
  77. multi windows and buffers, syntax highlighting, com- mand line editing,
  78. filename completion, on-line help, and visual selection.
  79. Options:
  80. --define 'with_x11 %{with_x11}'
  81. %prep
  82. %setup0 -q -c
  83. %setup1 -q -T -D -a 1
  84. %setup2 -q -T -D -a 2
  85. %setup3 -q -T -D -a 3
  86. %{l_gzip} -d -c $RPM_SOURCE_DIR/%{V_vl}.1-100.gz |\
  87. %{l_patch} -p0 -E -t -s >/dev/null 2>&1 || true
  88. %{l_gzip} -d -c $RPM_SOURCE_DIR/%{V_vl}.101-200.gz |\
  89. %{l_patch} -p0 -E -t -s >/dev/null 2>&1 || true
  90. i=201
  91. while [ $i -le %{V_pl} ]; do
  92. cat $RPM_SOURCE_DIR/%{V_vl}.`echo $i | awk '{ printf("%03d", $0); }'` |\
  93. %{l_patch} -p0 -E -t -s >/dev/null 2>&1 || true
  94. i=`expr $i + 1`
  95. done
  96. %build
  97. ( cd vim%{V_vs}/src
  98. CC="%{l_cc}" \
  99. CFLAGS="%{l_cflags -O}" \
  100. ./configure \
  101. --prefix=%{l_prefix} \
  102. --enable-max-features \
  103. --with-tlib=termcap \
  104. %if "%{with_x11}" == "yes"
  105. --with-x \
  106. --x-includes=`%{l_prefix}/etc/rc --query x11_incdir` \
  107. --x-libraries=`%{l_prefix}/etc/rc --query x11_libdir` \
  108. --enable-gui=gtk \
  109. --with-gtk-prefix=%{l_prefix} \
  110. --disable-gtktest \
  111. --without-gnome
  112. %else
  113. --without-x \
  114. --disable-gui
  115. %endif
  116. %{l_make} %{l_mflags -O}
  117. )
  118. %install
  119. ( cd vim%{V_vs}/src
  120. rm -rf $RPM_BUILD_ROOT
  121. %{l_make} %{l_mflags} install \
  122. prefix=$RPM_BUILD_ROOT%{l_prefix}
  123. )
  124. strip $RPM_BUILD_ROOT%{l_prefix}/bin/vim
  125. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/xxd
  126. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/xxd.1
  127. for link in vi ex rview rvim view; do
  128. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/$link
  129. ln $RPM_BUILD_ROOT%{l_prefix}/bin/vim \
  130. $RPM_BUILD_ROOT%{l_prefix}/bin/$link
  131. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/$link.1
  132. ln $RPM_BUILD_ROOT%{l_prefix}/man/man1/vim.1 \
  133. $RPM_BUILD_ROOT%{l_prefix}/man/man1/$link.1
  134. done
  135. %{l_shtool} mkdir -f -p -m 755 \
  136. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  137. %{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \
  138. %{SOURCE rc.vim} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  139. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  140. %files -f files
  141. %clean
  142. rm -rf $RPM_BUILD_ROOT