vim.spec 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. ##
  2. ## vim.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2003 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 316
  29. # package information
  30. Name: vim
  31. Summary: The Vi (Improved) Text Editor
  32. URL: http://www.vim.org/
  33. Vendor: Bram Moolenaar et al.
  34. Packager: The OpenPKG Project
  35. Distribution: OpenPKG [CORE]
  36. Group: Editor
  37. License: Charityware
  38. Version: %{V_vl}.%{V_pl}
  39. Release: 20030202
  40. # package options
  41. %option with_x11 no
  42. # list of sources
  43. Source0: ftp://ftp.vim.org/pub/vim/unix/vim-%{V_vl}-src1.tar.gz
  44. Source1: ftp://ftp.vim.org/pub/vim/unix/vim-%{V_vl}-src2.tar.gz
  45. Source2: ftp://ftp.vim.org/pub/vim/unix/vim-%{V_vl}-rt1.tar.gz
  46. Source3: ftp://ftp.vim.org/pub/vim/unix/vim-%{V_vl}-rt2.tar.gz
  47. Source4: rc.vim
  48. Patch1: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.1-100.gz
  49. Patch2: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.101-200.gz
  50. Patch3: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.201-300.gz
  51. Patch301: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.301
  52. Patch302: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.302
  53. Patch303: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.303
  54. Patch304: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.304
  55. Patch305: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.305
  56. Patch306: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.306
  57. Patch307: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.307
  58. Patch308: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.308
  59. Patch309: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.309
  60. Patch310: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.310
  61. Patch311: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.311
  62. Patch312: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.312
  63. Patch313: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.313
  64. Patch314: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.314
  65. Patch315: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.315
  66. Patch316: ftp://ftp.vim.org/pub/vim/patches/%{V_vl}.316
  67. # build information
  68. Prefix: %{l_prefix}
  69. BuildRoot: %{l_buildroot}
  70. BuildPreReq: OpenPKG, openpkg >= 20030103
  71. PreReq: OpenPKG, openpkg >= 20030103
  72. %if "%{with_x11}" == "yes"
  73. BuildPreReq: X11, gtk
  74. PreReq: X11, gtk
  75. %endif
  76. AutoReq: no
  77. AutoReqProv: no
  78. %description
  79. Vim (Vi Improved) is a text editor that is upwards compatible with the
  80. classical Unix Vi. It can be used to edit any ASCII text. It is especially
  81. useful for editing programs. Vim offers a lot of enhancements not
  82. available in the traditional Vi. For example, Vim has multi level undo,
  83. multi windows and buffers, syntax highlighting, com- mand line editing,
  84. filename completion, on-line help, and visual selection.
  85. %prep
  86. %setup0 -q -c
  87. %setup1 -q -T -D -a 1
  88. %setup2 -q -T -D -a 2
  89. %setup3 -q -T -D -a 3
  90. %{l_gzip} -d -c $RPM_SOURCE_DIR/%{V_vl}.1-100.gz |\
  91. %{l_patch} -p0 -E -t -s >/dev/null 2>&1 || true
  92. %{l_gzip} -d -c $RPM_SOURCE_DIR/%{V_vl}.101-200.gz |\
  93. %{l_patch} -p0 -E -t -s >/dev/null 2>&1 || true
  94. %{l_gzip} -d -c $RPM_SOURCE_DIR/%{V_vl}.201-300.gz |\
  95. %{l_patch} -p0 -E -t -s >/dev/null 2>&1 || true
  96. i=301
  97. while [ $i -le %{V_pl} ]; do
  98. cat $RPM_SOURCE_DIR/%{V_vl}.`echo $i | awk '{ printf("%03d", $0); }'` |\
  99. %{l_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. CPPFLAGS="%{l_cppflags}" \
  107. LDFLAGS="%{l_ldflags}" \
  108. ./configure \
  109. --prefix=%{l_prefix} \
  110. --enable-max-features \
  111. --with-tlib=termcap \
  112. %if "%{with_x11}" == "yes"
  113. --with-x \
  114. --x-includes=`%{l_prefix}/etc/rc --query x11_incdir` \
  115. --x-libraries=`%{l_prefix}/etc/rc --query x11_libdir` \
  116. --enable-gui=gtk \
  117. --with-gtk-prefix=%{l_prefix} \
  118. --disable-gtktest \
  119. --without-gnome \
  120. %else
  121. --without-x \
  122. --disable-gui \
  123. %endif
  124. --disable-nls
  125. %{l_make} %{l_mflags -O}
  126. )
  127. %install
  128. ( cd vim%{V_vs}/src
  129. rm -rf $RPM_BUILD_ROOT
  130. %{l_make} %{l_mflags} install \
  131. prefix=$RPM_BUILD_ROOT%{l_prefix}
  132. )
  133. strip $RPM_BUILD_ROOT%{l_prefix}/bin/vim
  134. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/xxd
  135. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/xxd.1
  136. for link in vi ex rview rvim view; do
  137. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/$link
  138. ln $RPM_BUILD_ROOT%{l_prefix}/bin/vim \
  139. $RPM_BUILD_ROOT%{l_prefix}/bin/$link
  140. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/$link.1
  141. ln $RPM_BUILD_ROOT%{l_prefix}/man/man1/vim.1 \
  142. $RPM_BUILD_ROOT%{l_prefix}/man/man1/$link.1
  143. done
  144. %{l_shtool} mkdir -f -p -m 755 \
  145. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  146. %{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \
  147. %{SOURCE rc.vim} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  148. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  149. %files -f files
  150. %clean
  151. rm -rf $RPM_BUILD_ROOT