vim.spec 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. ##
  2. ## vim.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2001 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2001 Ralf S. Engelschall <rse@engelschall.com>
  5. ##
  6. ## Permission to use, copy, modify, and distribute this software for
  7. ## any purpose with or without fee is hereby granted, provided that
  8. ## the above copyright notice and this permission notice appear in all
  9. ## copies.
  10. ##
  11. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  12. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  13. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  14. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  15. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  16. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  17. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  18. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  19. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  20. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  21. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  22. ## SUCH DAMAGE.
  23. ##
  24. %define V_vl 6.0
  25. %define V_vs 60
  26. %define V_pl 3
  27. # package information
  28. Name: vim
  29. Summary: The Vi (Improved) Text Editor
  30. URL: http://www.vim.org/
  31. Vendor: Bram Moolenaar et al.
  32. Packager: The OpenPKG Project
  33. Distribution: OpenPKG [EXP]
  34. Group: Editor
  35. License: Charityware
  36. Version: %{V_vl}.%{V_pl}
  37. Release: 0
  38. # list of sources
  39. Source0: ftp://ftp.vim.org/pub/vim/unix/vim-%{V_vl}-src1.tar.gz
  40. Source1: ftp://ftp.vim.org/pub/vim/unix/vim-%{V_vl}-src2.tar.gz
  41. Source2: ftp://ftp.vim.org/pub/vim/unix/vim-%{V_vl}-rt1.tar.gz
  42. Source3: ftp://ftp.vim.org/pub/vim/unix/vim-%{V_vl}-rt2.tar.gz
  43. Source4: rc.vim
  44. Patch0: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.001
  45. Patch1: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.002
  46. Patch2: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.003
  47. # build information
  48. Prefix: %{l_prefix}
  49. BuildRoot: %{l_buildroot}
  50. BuildPreReq: OpenPKG, openpkg >= 0.9-33
  51. PreReq: OpenPKG, openpkg >= 0.9-33
  52. AutoReq: no
  53. AutoReqProv: no
  54. %description
  55. Vim (Vi Improved) is a text editor that is upwards compatible to the
  56. classical Unix Vi. It can be used to edit any ASCII text. It is especially
  57. useful for editing programs. There are a lot of enhancements above Vi:
  58. multi level undo, multi windows and buffers, syntax highlighting, com-
  59. mand line editing, filename completion, on-line help, visual selection,
  60. etc.
  61. %prep
  62. %setup0 -q -c
  63. %setup1 -q -T -D -a 1
  64. %setup2 -q -T -D -a 2
  65. %setup3 -q -T -D -a 3
  66. cd vim%{V_vs}
  67. %patch0 -p0
  68. %patch1 -p0
  69. %patch2 -p0
  70. %build
  71. ( cd vim%{V_vs}/src
  72. CC="%{l_cc}" \
  73. CFLAGS="%{l_cflags -O}" \
  74. ./configure \
  75. --prefix=%{l_prefix} \
  76. --enable-max-features \
  77. --without-x \
  78. --with-tlib=termcap \
  79. --disable-gui
  80. %{l_make} %{l_mflags -O}
  81. )
  82. %install
  83. ( cd vim%{V_vs}/src
  84. rm -rf $RPM_BUILD_ROOT
  85. %{l_make} %{l_mflags} install prefix=$RPM_BUILD_ROOT%{l_prefix}
  86. )
  87. strip $RPM_BUILD_ROOT%{l_prefix}/bin/vim
  88. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/xxd
  89. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/xxd.1
  90. for link in vi ex rview rvim view; do
  91. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/$link
  92. ln $RPM_BUILD_ROOT%{l_prefix}/bin/vim \
  93. $RPM_BUILD_ROOT%{l_prefix}/bin/$link
  94. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/$link.1
  95. ln $RPM_BUILD_ROOT%{l_prefix}/man/man1/vim.1 \
  96. $RPM_BUILD_ROOT%{l_prefix}/man/man1/$link.1
  97. done
  98. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  99. %{l_shtool} install -c -m 755 -e "s;@l_prefix@;%{l_prefix};g" \
  100. %{SOURCE rc.vim} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  101. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  102. %files -f files
  103. %clean
  104. rm -rf $RPM_BUILD_ROOT