vim.spec 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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 ax
  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: 4
  38. # list of sources
  39. Source0: ftp://ftp.vim.org/pub/vim/unreleased/unix/vim-%{V_vl}%{V_pl}-src1.tar.gz
  40. Source1: ftp://ftp.vim.org/pub/vim/unreleased/unix/vim-%{V_vl}%{V_pl}-src2.tar.gz
  41. Source2: ftp://ftp.vim.org/pub/vim/unreleased/unix/vim-%{V_vl}%{V_pl}-rt1.tar.gz
  42. Source3: ftp://ftp.vim.org/pub/vim/unreleased/unix/vim-%{V_vl}%{V_pl}-rt2.tar.gz
  43. Source4: rc.vim
  44. # build information
  45. Prefix: %{l_prefix}
  46. BuildRoot: %{l_buildroot}
  47. BuildPreReq: OpenPKG, openpkg >= 0.9-33
  48. PreReq: OpenPKG, openpkg >= 0.9-33
  49. AutoReq: no
  50. AutoReqProv: no
  51. %description
  52. Vim (Vi Improved) is a text editor that is upwards compatible to the
  53. classical Unix Vi. It can be used to edit any ASCII text. It is especially
  54. useful for editing programs. There are a lot of enhancements above Vi:
  55. multi level undo, multi windows and buffers, syntax highlighting, com-
  56. mand line editing, filename completion, on-line help, visual selection,
  57. etc.
  58. %prep
  59. %setup0 -q -c
  60. %setup1 -q -T -D -a 1
  61. %setup2 -q -T -D -a 2
  62. %setup3 -q -T -D -a 3
  63. %build
  64. ( cd vim%{V_vs}%{V_pl}/src
  65. CC="%{l_cc}" \
  66. CFLAGS="%{l_cflags -O}" \
  67. ./configure \
  68. --prefix=%{l_prefix} \
  69. --enable-max-features \
  70. --without-x \
  71. --with-tlib=termcap \
  72. --disable-gui
  73. %{l_make} %{l_mflags -O}
  74. )
  75. %install
  76. ( cd vim%{V_vs}%{V_pl}/src
  77. rm -rf $RPM_BUILD_ROOT
  78. %{l_make} %{l_mflags} install prefix=$RPM_BUILD_ROOT%{l_prefix}
  79. )
  80. strip $RPM_BUILD_ROOT%{l_prefix}/bin/vim
  81. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/xxd
  82. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/xxd.1
  83. for link in vi ex rview rvim view; do
  84. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/$link
  85. ln $RPM_BUILD_ROOT%{l_prefix}/bin/vim \
  86. $RPM_BUILD_ROOT%{l_prefix}/bin/$link
  87. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/$link.1
  88. ln $RPM_BUILD_ROOT%{l_prefix}/man/man1/vim.1 \
  89. $RPM_BUILD_ROOT%{l_prefix}/man/man1/$link.1
  90. done
  91. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  92. %{l_shtool} install -c -m 755 -e "s;@l_prefix@;%{l_prefix};g" \
  93. %{SOURCE rc.vim} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  94. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  95. %files -f files
  96. %clean
  97. rm -rf $RPM_BUILD_ROOT