vim.spec 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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. %define V_vl 6.1
  26. %define V_vs 61
  27. %define V_pl 32
  28. # package information
  29. Name: vim
  30. Summary: The Vi (Improved) Text Editor
  31. URL: http://www.vim.org/
  32. Vendor: Bram Moolenaar et al.
  33. Packager: The OpenPKG Project
  34. Distribution: OpenPKG [REL]
  35. Group: Editor
  36. License: Charityware
  37. Version: %{V_vl}.%{V_pl}
  38. Release: 20020425
  39. # list of sources
  40. Source0: ftp://ftp.vim.org/pub/vim/unix/vim-%{V_vl}-src1.tar.gz
  41. Source1: ftp://ftp.vim.org/pub/vim/unix/vim-%{V_vl}-src2.tar.gz
  42. Source2: ftp://ftp.vim.org/pub/vim/unix/vim-%{V_vl}-rt1.tar.gz
  43. Source3: ftp://ftp.vim.org/pub/vim/unix/vim-%{V_vl}-rt2.tar.gz
  44. Source6: rc.vim
  45. Patch1: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.001
  46. Patch2: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.002
  47. Patch3: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.003
  48. Patch4: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.004
  49. Patch5: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.005
  50. Patch6: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.006
  51. Patch7: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.007
  52. Patch8: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.008
  53. Patch9: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.009
  54. Patch10: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.010
  55. Patch11: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.011
  56. Patch12: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.012
  57. Patch13: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.013
  58. Patch14: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.014
  59. Patch15: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.015
  60. Patch16: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.016
  61. Patch17: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.017
  62. Patch18: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.018
  63. Patch19: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.019
  64. Patch20: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.020
  65. Patch21: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.021
  66. Patch22: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.022
  67. Patch23: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.023
  68. Patch24: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.024
  69. Patch25: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.025
  70. Patch26: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.026
  71. Patch27: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.027
  72. Patch28: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.028
  73. Patch29: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.029
  74. Patch30: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.030
  75. Patch31: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.031
  76. Patch32: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.032
  77. # build information
  78. Prefix: %{l_prefix}
  79. BuildRoot: %{l_buildroot}
  80. BuildPreReq: OpenPKG, openpkg >= 20020206, gzip, patch
  81. PreReq: OpenPKG, openpkg >= 20020206
  82. AutoReq: no
  83. AutoReqProv: no
  84. %description
  85. Vim (Vi Improved) is a text editor that is upwards compatible to the
  86. classical Unix Vi. It can be used to edit any ASCII text. It is especially
  87. useful for editing programs. There are a lot of enhancements above Vi:
  88. multi level undo, multi windows and buffers, syntax highlighting, com-
  89. mand line editing, filename completion, on-line help, visual selection,
  90. etc.
  91. %prep
  92. %setup0 -q -c
  93. %setup1 -q -T -D -a 1
  94. %setup2 -q -T -D -a 2
  95. %setup3 -q -T -D -a 3
  96. i=0
  97. while [ $i -le %{V_pl} ]; do
  98. cat $RPM_SOURCE_DIR/%{V_vl}.`echo $i | awk '{ printf("%03d", $0); }'` |\
  99. %{l_prefix}/bin/patch -p0 -E -t -s >/dev/null 2>&1 || true
  100. i=`expr $i + 1`
  101. done
  102. %build
  103. ( cd vim%{V_vs}/src
  104. CC="%{l_cc}" \
  105. CFLAGS="%{l_cflags -O}" \
  106. ./configure \
  107. --prefix=%{l_prefix} \
  108. --enable-max-features \
  109. --without-x \
  110. --with-tlib=termcap \
  111. --disable-gui
  112. %{l_make} %{l_mflags -O}
  113. )
  114. %install
  115. ( cd vim%{V_vs}/src
  116. rm -rf $RPM_BUILD_ROOT
  117. %{l_make} %{l_mflags} install \
  118. prefix=$RPM_BUILD_ROOT%{l_prefix}
  119. )
  120. strip $RPM_BUILD_ROOT%{l_prefix}/bin/vim
  121. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/xxd
  122. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/xxd.1
  123. for link in vi ex rview rvim view; do
  124. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/$link
  125. ln $RPM_BUILD_ROOT%{l_prefix}/bin/vim \
  126. $RPM_BUILD_ROOT%{l_prefix}/bin/$link
  127. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/$link.1
  128. ln $RPM_BUILD_ROOT%{l_prefix}/man/man1/vim.1 \
  129. $RPM_BUILD_ROOT%{l_prefix}/man/man1/$link.1
  130. done
  131. %{l_shtool} mkdir -f -p -m 755 \
  132. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  133. %{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \
  134. %{SOURCE rc.vim} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  135. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  136. %files -f files
  137. %clean
  138. rm -rf $RPM_BUILD_ROOT