1 |
ahmad |
4276 |
# Notes / Warning : |
2 |
|
|
# - this package is not prefixable |
3 |
ahmad |
4405 |
# - to update official patches, aka SOURCE4, see README.mga in SOURCE4 |
4 |
ahmad |
4276 |
|
5 |
tv |
1139540 |
%define python3path %{_includedir}/%{python3} |
6 |
|
|
|
7 |
tv |
1231997 |
%define patchlevel 022 |
8 |
ahmad |
4276 |
|
9 |
|
|
%define python_version %(rpm -q --qf '%%{epoch}:%%{version}' python) |
10 |
|
|
%define ruby_version %(rpm -q --qf '%%{epoch}:%%{version}' ruby) |
11 |
|
|
|
12 |
|
|
# Should we build X11 gui |
13 |
|
|
%define buildgui 1 |
14 |
|
|
|
15 |
|
|
%{?_with_gui:%global buildgui 1} |
16 |
|
|
%{?_without_gui:%global buildgui 0} |
17 |
|
|
|
18 |
|
|
%define title VI editor |
19 |
|
|
%define longtitle All-purpose text editor |
20 |
|
|
|
21 |
tv |
1231491 |
%define baseversion 8.1 |
22 |
|
|
%define vimdir vim81 |
23 |
|
|
|
24 |
ahmad |
4276 |
Name: vim |
25 |
tv |
1063602 |
Version: %{baseversion}.%{patchlevel} |
26 |
tv |
1212677 |
Release: %mkrel 1 |
27 |
ahmad |
4276 |
Summary: VIsual editor iMproved |
28 |
|
|
Url: http://www.vim.org/ |
29 |
|
|
License: Charityware |
30 |
|
|
Group: Editors |
31 |
tv |
1063602 |
# Generated with SOURCES/vim-update.sh |
32 |
|
|
Source0: ftp://ftp.vim.org/pub/vim/unix/vim-%{baseversion}-%{patchlevel}.tar.bz2 |
33 |
ahmad |
4405 |
# read README.mga prior updating official patches: |
34 |
|
|
Source3: README.mga |
35 |
ahmad |
4276 |
# http://vim.sourceforge.net/scripts/script.php?script_id=98 |
36 |
tv |
1063595 |
Source56: http://trific.ath.cx/Ftp/vim/syntax/dhcpd.vim |
37 |
ahmad |
4276 |
# from apparmor-utils package |
38 |
tv |
1063595 |
Source57: apparmor.vim |
39 |
|
|
Source58: cfengine.vim |
40 |
|
|
Source59: nagios.vim |
41 |
dams |
311490 |
# icon rendering is ugly in GNOME3, so, adding a svg icon |
42 |
tv |
1063595 |
Source60: gvim.svg |
43 |
doktor5000 |
798913 |
# empty rpm spec template |
44 |
tv |
1063595 |
Source61: template.spec |
45 |
doktor5000 |
798913 |
|
46 |
tv |
1063602 |
# for updating Source0: |
47 |
|
|
Source100: vim-update.sh |
48 |
|
|
|
49 |
ahmad |
4276 |
# MDK patches |
50 |
|
|
Patch2: vim-5.6a-paths.patch |
51 |
tv |
1052471 |
Patch3: vim-8.0-rpm-spec-syntax.patch |
52 |
ahmad |
4276 |
Patch8: vim-6.0af-man-path.patch |
53 |
|
|
Patch10: xxd-locale.patch |
54 |
|
|
Patch20: vimrc_hebrew.patch |
55 |
doktor5000 |
798913 |
# autoload template when creating new rpm spec files |
56 |
tv |
1052471 |
Patch21: vim-8.0-mga-vimrc-spec-template-autoload.patch |
57 |
ahmad |
4276 |
Patch22: vim-6.1-fix-xterms-comments.patch |
58 |
tv |
1052471 |
Patch23: vim-8.0-remove-docs.patch |
59 |
tv |
1177291 |
Patch24: vim-8.0-outline-mode.patch |
60 |
tv |
472302 |
Patch26: vim-7.4-changelog-mode.patch |
61 |
tv |
1052471 |
Patch28: vim-8.0-po-mode.patch |
62 |
tv |
1125052 |
Patch30: vim-8.0-add-dhcpd-syntax.patch |
63 |
ahmad |
4276 |
Patch31: vim70-CVE-2007-2438.patch |
64 |
tv |
1052471 |
Patch32: vim-8.0-highligh-global.diff |
65 |
ahmad |
4276 |
|
66 |
|
|
# Fedora patches |
67 |
tv |
1052471 |
Patch100: vim-8.0-fortify_warnings-1.patch |
68 |
tv |
472302 |
Patch101: vim-7.4-fstabsyntax.patch |
69 |
tv |
1081193 |
Patch3016: vim-8.0-copy-paste.patch |
70 |
tv |
1229686 |
# migrate shebangs in script to /usr/bin/python3 and use python2 when necessary |
71 |
|
|
Patch3017: vim-python3-tests.patch |
72 |
ovitters |
1146883 |
BuildRequires: pkgconfig(python) |
73 |
tv |
1053019 |
BuildRequires: python3-devel |
74 |
tv |
1053018 |
BuildRequires: gpm-devel |
75 |
ovitters |
1146883 |
BuildRequires: pkgconfig(ruby) |
76 |
ahmad |
4276 |
BuildRequires: perl-devel |
77 |
colin |
493177 |
BuildRequires: pkgconfig(tinfo) |
78 |
ahmad |
4276 |
BuildRequires: acl-devel |
79 |
luigiwalser |
397203 |
%if %{buildgui} |
80 |
tv |
1052471 |
BuildRequires: gtk3-devel |
81 |
ovitters |
1146883 |
BuildRequires: pkgconfig(ncurses) |
82 |
|
|
BuildRequires: pkgconfig(xt) |
83 |
ahmad |
4276 |
BuildRequires: tcl |
84 |
ovitters |
1146883 |
BuildRequires: pkgconfig(tcl) |
85 |
ahmad |
4276 |
%endif |
86 |
ovitters |
1146883 |
BuildRequires: pkgconfig(lua) |
87 |
ahmad |
4276 |
|
88 |
tv |
1052487 |
%global __requires_exclude perl\\(getopts.pl\\) |
89 |
|
|
|
90 |
ahmad |
4276 |
%description |
91 |
tv |
1052498 |
VIM (VIsual editor iMproved) is an updated and improved version of the |
92 |
|
|
vi editor. Vi was the first real screen-based editor for UNIX, and is |
93 |
|
|
still very popular. VIM improves on vi by adding new features: |
94 |
|
|
multiple windows, multi-level undo, block highlighting and more. |
95 |
ahmad |
4276 |
|
96 |
|
|
%package common |
97 |
|
|
Summary: The common files needed by any version of the VIM editor |
98 |
|
|
Group: Editors |
99 |
|
|
Requires(pre): coreutils |
100 |
|
|
Requires(post): coreutils |
101 |
|
|
Requires(preun): coreutils |
102 |
|
|
Requires(postun): coreutils |
103 |
oden |
566574 |
# <oden> Installation failed: file /usr/share/vim/syntax/asciidoc.vim from install of vim-common-7.4.052-2.mga4.x86_64 conflicts with file from package asciidoc-8.6.8-2.mga3.noarch |
104 |
|
|
Conflicts: asciidoc < 8.6.8-4 |
105 |
ahmad |
4276 |
|
106 |
|
|
%description common |
107 |
tv |
1052499 |
VIM (VIsual editor iMproved) is an updated and improved version of the |
108 |
|
|
vi editor. Vi was the first real screen-based editor for UNIX, and is |
109 |
|
|
still very popular. VIM improves on vi by adding new features: |
110 |
|
|
multiple windows, multi-level undo, block highlighting and more. The |
111 |
|
|
vim-common package contains files which every VIM binary will need in |
112 |
|
|
order to run. |
113 |
ahmad |
4276 |
|
114 |
|
|
%package minimal |
115 |
|
|
Summary: A minimal version of the VIM editor |
116 |
|
|
Group: Editors |
117 |
|
|
Provides: vim |
118 |
|
|
Requires(post): update-alternatives |
119 |
|
|
Requires(postun): update-alternatives |
120 |
|
|
|
121 |
|
|
%description minimal |
122 |
tv |
1052499 |
VIM (VIsual editor iMproved) is an updated and improved version of the |
123 |
|
|
vi editor. Vi was the first real screen-based editor for UNIX, and is |
124 |
|
|
still very popular. VIM improves on vi by adding new features: |
125 |
|
|
multiple windows, multi-level undo, block highlighting and more. The |
126 |
|
|
vim-minimal package includes a minimal version of VIM, which is |
127 |
|
|
installed into /bin/vi for use when only the root partition is |
128 |
|
|
present. NOTE: The online help is only available when the vim-common |
129 |
|
|
package is installed. |
130 |
ahmad |
4276 |
|
131 |
|
|
%package enhanced |
132 |
|
|
Summary: A version of the VIM editor which includes recent enhancements |
133 |
|
|
Group: Editors |
134 |
luigiwalser |
397203 |
Requires: vim-common >= %{version}-%{release} |
135 |
ahmad |
4276 |
Obsoletes: vim-color |
136 |
|
|
Provides: vim |
137 |
|
|
Provides: vim-color |
138 |
|
|
Requires(post): update-alternatives |
139 |
|
|
Requires(postun): update-alternatives |
140 |
|
|
|
141 |
|
|
%description enhanced |
142 |
tv |
1052499 |
VIM (VIsual editor iMproved) is an updated and improved version of the |
143 |
|
|
vi editor. Vi was the first real screen-based editor for UNIX, and is |
144 |
|
|
still very popular. VIM improves on vi by adding new features: |
145 |
|
|
multiple windows, multi-level undo, block highlighting and more. The |
146 |
|
|
vim-enhanced package contains a version of VIM with extra, recently |
147 |
|
|
introduced features like Python and Perl interpreters. |
148 |
ahmad |
4276 |
|
149 |
tv |
1052499 |
Install the vim-enhanced package if you'd like to use a version of the |
150 |
|
|
VIM editor which includes recently added enhancements like |
151 |
|
|
interpreters for the Python and Perl scripting languages. You'll also |
152 |
|
|
need to install the vim-common package. |
153 |
ahmad |
4276 |
|
154 |
luigiwalser |
397203 |
%if %{buildgui} |
155 |
ahmad |
4276 |
%package X11 |
156 |
|
|
Summary: The VIM version of the vi editor for the X Window System |
157 |
|
|
Group: Editors |
158 |
|
|
Provides: vim |
159 |
luigiwalser |
397203 |
Requires: vim-common >= %{version}-%{release} |
160 |
ahmad |
4276 |
Requires(post): desktop-file-utils |
161 |
|
|
Requires(postun): desktop-file-utils |
162 |
|
|
|
163 |
|
|
%description X11 |
164 |
tv |
1052499 |
VIM (VIsual editor iMproved) is an updated and improved version of the |
165 |
|
|
vi editor. Vi was the first real screen-based editor for UNIX, and is |
166 |
|
|
still very popular. VIM improves on vi by adding new features: |
167 |
|
|
multiple windows, multi-level undo, block highlighting and |
168 |
|
|
more. VIM-X11 is a version of the VIM editor which will run within the |
169 |
|
|
X Window System. If you install this package, you can run VIM as an X |
170 |
tv |
1173948 |
application with a full GUI interface and mouse support by command gvim. |
171 |
ahmad |
4276 |
|
172 |
tv |
1052499 |
Install the vim-X11 package if you'd like to try out a version of vi |
173 |
|
|
with graphics and mouse capabilities. You'll also need to install the |
174 |
ahmad |
4276 |
vim-common package. |
175 |
|
|
%endif |
176 |
|
|
|
177 |
|
|
%define localedir %{buildroot}%{_datadir}/locale/ |
178 |
|
|
|
179 |
|
|
%prep |
180 |
tv |
1063602 |
%setup -q -n %{vimdir} |
181 |
ahmad |
4276 |
# spec plugin |
182 |
|
|
rm -f runtime/doc/pi_spec.txt |
183 |
|
|
rm -f runtime/ftpplugin/spec.vim |
184 |
tv |
1063595 |
cp -a %{SOURCE56} runtime/syntax/ |
185 |
|
|
cp -a %{SOURCE57} runtime/syntax/ |
186 |
|
|
cp -a %{SOURCE58} runtime/syntax/ |
187 |
|
|
cp -a %{SOURCE59} runtime/syntax/ |
188 |
ahmad |
4276 |
|
189 |
|
|
#mdk patches |
190 |
|
|
%patch2 -p1 |
191 |
|
|
%patch3 -p0 -b .spec |
192 |
|
|
%patch8 -p1 -b .manpath |
193 |
|
|
%patch10 -p1 -b .xxdloc |
194 |
|
|
%patch20 -p1 -b .warly |
195 |
doktor5000 |
798913 |
%patch21 -p1 -b .spec-template-autoload |
196 |
ahmad |
4276 |
%patch22 -p0 |
197 |
|
|
%patch23 -p0 -b .doc |
198 |
|
|
%patch24 -p0 |
199 |
|
|
%patch26 -p0 |
200 |
|
|
%patch28 -p1 |
201 |
|
|
%patch30 -p0 |
202 |
neoclust |
897157 |
%patch32 -p1 |
203 |
ahmad |
4276 |
# Fedora patches |
204 |
|
|
%patch100 -p1 |
205 |
|
|
%patch101 -p1 |
206 |
tv |
1081193 |
%patch3016 -p1 |
207 |
tv |
1229686 |
%patch3017 -p1 |
208 |
ahmad |
4276 |
|
209 |
|
|
perl -pi -e 's|SYS_VIMRC_FILE "\$VIM/vimrc"|SYS_VIMRC_FILE "%_sysconfdir/vim/vimrc"|' src/os_unix.h |
210 |
|
|
perl -pi -e 's|SYS_GVIMRC_FILE "\$VIM/gvimrc"|SYS_GVIMRC_FILE "%_sysconfdir/vim/gvimrc"|' src/os_unix.h |
211 |
|
|
# disable command echo |
212 |
tv |
1081193 |
for i in runtime/{gvimrc_example.vim,vimrc_example.vim,defaults.vim}; do |
213 |
ahmad |
4276 |
perl -pi -e 's!^set showcmd!set noshowcmd!' $i |
214 |
|
|
done |
215 |
|
|
perl -pi -e 's|\Qsvn-commit.*.tmp\E|svn-commit*.tmp|' ./runtime/filetype.vim |
216 |
|
|
|
217 |
|
|
%build |
218 |
|
|
# ensure xxd works with big files: |
219 |
tv |
1139540 |
export CFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -I%{python3path}" |
220 |
|
|
export CXXFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -I%{python3path}" |
221 |
ahmad |
4276 |
|
222 |
luigiwalser |
397203 |
%if %{buildgui} |
223 |
ahmad |
4276 |
# First build: gvim |
224 |
luigiwalser |
397203 |
LOCALEDIR=%{localedir} ./configure --prefix=%{_prefix} \ |
225 |
tv |
1053019 |
--enable-pythoninterp=dynamic \ |
226 |
|
|
--enable-python3interp=dynamic \ |
227 |
ahmad |
4276 |
--enable-perlinterp \ |
228 |
|
|
--enable-rubyinterp \ |
229 |
|
|
--enable-tclinterp \ |
230 |
|
|
--with-features=huge \ |
231 |
tv |
1052471 |
--enable-acl --with-x=yes --enable-gui=gtk3 --exec-prefix=%{_prefix}/X11R6 \ |
232 |
|
|
--enable-gtk3-check \ |
233 |
luigiwalser |
397203 |
--enable-multibyte --enable-xim --enable-fontset --mandir=%{_mandir} \ |
234 |
|
|
--libdir=%{_libdir} --with-compiledby="%packager" |
235 |
ahmad |
4276 |
|
236 |
|
|
echo "#define MAX_FEAT 1" >> src/config.h |
237 |
|
|
echo "#define FEAT_GUI" >> src/config.h |
238 |
|
|
# workaround buggy build system: |
239 |
|
|
perl -pi -e 's!/usr/include long!/usr/include !' src/auto/config.mk |
240 |
|
|
|
241 |
daviddavid |
1058317 |
%make_build |
242 |
ahmad |
4276 |
mv src/vim src/gvim |
243 |
|
|
make -C src clean |
244 |
|
|
%endif |
245 |
|
|
|
246 |
|
|
# Second build: vim-enhanced |
247 |
luigiwalser |
397203 |
./configure --prefix=%{_prefix} \ |
248 |
tv |
1053019 |
--enable-acl --enable-rubyinterp --enable-tclinterp --enable-pythoninterp=dynamic \ |
249 |
|
|
--enable-python3interp=dynamic \ |
250 |
|
|
--enable-perlinterp --with-features=huge \ |
251 |
luigiwalser |
397203 |
--libdir=%{_libdir} --with-compiledby="%packager" \ |
252 |
|
|
--with-x=no --enable-gui=no --exec-prefix=%{_prefix} |
253 |
ahmad |
4276 |
|
254 |
daviddavid |
1058317 |
%make_build |
255 |
ahmad |
4276 |
mv src/vim src/vim-enhanced |
256 |
|
|
make -C src/ clean |
257 |
|
|
|
258 |
|
|
# Third build: vim-minimal |
259 |
luigiwalser |
397203 |
./configure --prefix=%{_prefix} \ |
260 |
ahmad |
4276 |
--with-features=tiny --disable-tclinterp --disable-cscope --disable-multibyte \ |
261 |
|
|
--disable-hangulinput --disable-xim --disable-fontset --disable-gui \ |
262 |
|
|
--disable-acl --disable-pythoninterp --disable-perlinterp \ |
263 |
luigiwalser |
397203 |
--libdir=%{_libdir} --with-compiledby="%packager" \ |
264 |
tv |
1065827 |
--with-x=no --enable-gui=no --disable-gpm --exec-prefix=%{_prefix} --with-tlib=tinfo |
265 |
ahmad |
4276 |
|
266 |
daviddavid |
1058317 |
%make_build |
267 |
ahmad |
4276 |
cp src/vim src/vim-minimal |
268 |
daviddavid |
1058317 |
%make_build -C src |
269 |
ahmad |
4276 |
|
270 |
|
|
cp -al runtime/doc doc |
271 |
|
|
# apply os_doc.diff |
272 |
|
|
pushd doc |
273 |
|
|
rm -f *.1 |
274 |
|
|
rm -f os_{390,dos,msdos,risc,win32,amiga,mac,os2,beos,mint,qnx,vms}.txt |
275 |
|
|
rm -f gui_{w16,w32}.txt |
276 |
|
|
rm -f vim2html.pl Makefile *awk |
277 |
|
|
popd |
278 |
|
|
|
279 |
|
|
# britton support |
280 |
|
|
ln -s tutor.fr runtime/tutor/tutor.br |
281 |
|
|
ln -s menu_fr_fr.iso_8859-15.vim runtime/lang/menu_br |
282 |
|
|
|
283 |
|
|
%install |
284 |
|
|
perl -pi -e 's!LOCALEDIR=\$\(DEST_LANG\)!LOCALEDIR=\$(DESTDIR)\$\(prefix\)/share/locale!g' src/Makefile |
285 |
|
|
|
286 |
luigiwalser |
397203 |
mkdir -p %{buildroot}{/bin,%{_bindir},%{_datadir}/{vim,locale},%{_mandir}/man1,%{localedir}} |
287 |
daviddavid |
1058317 |
%make_install VIMRTDIR="" |
288 |
ahmad |
4276 |
|
289 |
|
|
|
290 |
luigiwalser |
397203 |
make -C src installmacros prefix=%{buildroot}%{_prefix} VIMRTDIR="" |
291 |
ahmad |
4276 |
|
292 |
|
|
# fix unreadable files: |
293 |
|
|
chmod a+r runtime/{autoload/{tar,netrw}.vim,doc/pi_{netrw,tar}.txt} |
294 |
|
|
|
295 |
luigiwalser |
397203 |
%if %{buildgui} |
296 |
|
|
mkdir -p %{buildroot}%{_bindir} |
297 |
tv |
881552 |
install -m 755 src/gvim %{buildroot}%{_bindir} |
298 |
ahmad |
4276 |
%endif |
299 |
|
|
|
300 |
tv |
881552 |
install -m 755 src/vim-enhanced %{buildroot}%{_bindir} |
301 |
|
|
install -m 755 src/vim-minimal %{buildroot}/bin/vim-minimal |
302 |
ahmad |
4276 |
|
303 |
|
|
cd %{buildroot} |
304 |
|
|
rm -f ./bin/rvim |
305 |
|
|
rm -f ./usr/bin/rview ./usr/bin/rvim ./usr/bin/view |
306 |
|
|
for i in ex vimdiff; do |
307 |
|
|
ln -sf vim-enhanced ./usr/bin/$i |
308 |
|
|
done |
309 |
|
|
rm -f ./usr/man/man1/rvim.* |
310 |
|
|
rm -f ./usr/share/man/man1/evim.* |
311 |
luigiwalser |
397203 |
%if %{buildgui} |
312 |
ahmad |
4276 |
ln -sf gvim ./usr/bin/gvimdiff |
313 |
|
|
ln -sf gvim ./usr/bin/vimx |
314 |
|
|
%endif |
315 |
|
|
rm -f ./usr/share/vim/*/cmake.vim |
316 |
|
|
cd - |
317 |
|
|
|
318 |
|
|
# installing man pages |
319 |
luigiwalser |
397203 |
for i in %{buildroot}%{_mandir}/man1/{vi,rvi}; do |
320 |
|
|
cp %{buildroot}%{_mandir}/man1/vim.1 $i.1 |
321 |
ahmad |
4276 |
done |
322 |
|
|
|
323 |
luigiwalser |
397203 |
%if %{buildgui} |
324 |
|
|
cp %{buildroot}%{_mandir}/man1/vim.1 %{buildroot}%{_mandir}/man1/gvim.1 |
325 |
ahmad |
4276 |
%endif |
326 |
|
|
|
327 |
tv |
1081193 |
ln -sf defaults.vim %{buildroot}/usr/share/vim/vimrc |
328 |
ahmad |
4276 |
|
329 |
luigiwalser |
397203 |
cd %{buildroot}/%{_prefix}/share/vim/tools |
330 |
ahmad |
4276 |
# i need to make a choice :(. |
331 |
|
|
rm -f vim132 |
332 |
|
|
perl -p -i -e 's|#!/usr/bin/nawk|#!/usr/bin/gawk|' mve.awk |
333 |
|
|
perl -p -i -e 's|#!/usr/local/bin/perl|#!/usr/bin/perl|' *.pl |
334 |
|
|
perl -p -i -e 's|#!/usr/gnu/bin/perl|#!/usr/bin/perl|' * |
335 |
|
|
cd - |
336 |
|
|
|
337 |
|
|
# Be short-circuit aware : |
338 |
|
|
ln -f runtime/macros/README.txt README_macros.txt |
339 |
|
|
ln -f runtime/tools/README.txt README_tools.txt |
340 |
|
|
perl -p -i -e "s|#!/usr/local/bin/perl|#!/usr/bin/perl|" runtime/doc/*.pl |
341 |
|
|
|
342 |
|
|
# installing the menu icons & entry |
343 |
luigiwalser |
397203 |
%if %{buildgui} |
344 |
tv |
1063595 |
install -D -p -m 0644 %{SOURCE60} %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/gvim.svg |
345 |
ahmad |
4276 |
|
346 |
|
|
# gvim and fontset (from Pablo) 2001/03/19 |
347 |
|
|
echo 'set guifontset=-*-fixed-medium-r-normal--14-*-*-*-c-*-*-*,-*-*-medium-r-normal--14-*-*-*-c-*-*-*,-*-*-medium-r-normal--14-*-*-*-m-*-*-*,*' > %{buildroot}%{_datadir}/vim/gvimrc |
348 |
|
|
%endif |
349 |
|
|
|
350 |
|
|
# fix the paths in the man pages |
351 |
|
|
for i in %{buildroot}/usr/share/man/man1/*.1; do |
352 |
|
|
perl -p -i -e "s|%{buildroot}||" $i |
353 |
|
|
done |
354 |
|
|
|
355 |
|
|
# prevent including twice the doc |
356 |
|
|
rm -fr %{buildroot}/usr/share/vim/doc |
357 |
luigiwalser |
397203 |
ln -sf ../../../%{_defaultdocdir}/%{name}-common/doc %{buildroot}/usr/share/vim/doc |
358 |
ahmad |
4276 |
|
359 |
tv |
881614 |
%{find_lang} %{name} --with-man --all-name |
360 |
ahmad |
4276 |
|
361 |
luigiwalser |
397203 |
find %{buildroot}%{_datadir}/vim/ -name "tutor.*" | egrep -v 'tutor(|\.vim)$' | |
362 |
tv |
881612 |
sed -e 's!^\(.*tutor.\)\(..\)!%lang(\2) \1\2!g' >> %{name}.lang |
363 |
ahmad |
4276 |
|
364 |
tv |
865213 |
find %{buildroot}%{_datadir}/vim/lang -name "menu*" | |
365 |
tv |
881612 |
sed -e 's!^\(.*menu_\)\(..\)\(_\)!%lang(\2) \1\2\3!g' \ |
366 |
ahmad |
4276 |
-e 's!^\(.*menu\)\(_chinese\)!%lang(zh) \1\2!g' \ |
367 |
|
|
-e 's!^\(.*menu\)\(_czech_\)!%lang(cs) \1\2!g' \ |
368 |
|
|
-e 's!^\(.*menu\)\(_french\)!%lang(fr) \1\2!g' \ |
369 |
|
|
-e 's!^\(.*menu\)\(_german\)!%lang(de) \1\2!g' \ |
370 |
|
|
-e 's!^\(.*menu\)\(_japanes\)!%lang(ja) \1\2!g' \ |
371 |
|
|
-e 's!^\(.*menu\)\(_polish\)!%lang(pl) \1\2!g' \ |
372 |
|
|
-e 's!^\(.*menu\)\(_slovak\)!%lang(sk) \1\2!g' \ |
373 |
|
|
-e 's!^\(.*menu\)\(_spanis\)!%lang(es) \1\2!g' \ |
374 |
luigiwalser |
397203 |
>> %{name}.lang |
375 |
tv |
881611 |
# add softlinks: |
376 |
|
|
find %{buildroot}%{_datadir}/vim/lang -type l >> %{name}.lang |
377 |
|
|
# clean file list: |
378 |
|
|
sed -i "s^%{buildroot}^^" %{name}.lang |
379 |
|
|
|
380 |
luigiwalser |
397203 |
rm -f %{buildroot}%{_bindir}/vim |
381 |
ahmad |
4276 |
|
382 |
luigiwalser |
397203 |
mkdir -p %{buildroot}%{_sysconfdir}/vim/ |
383 |
|
|
MESSAGE='"Place your systemwide modification here.\n"%{_datadir}/vim/ files will be overwritten on update\n' |
384 |
|
|
echo -e "$MESSAGE\nsource %_datadir/vim/vimrc" > %{buildroot}/%{_sysconfdir}/vim/vimrc |
385 |
|
|
%if %{buildgui} |
386 |
|
|
echo -e "$MESSAGE\nsource %_datadir/vim/gvimrc" > %{buildroot}/%{_sysconfdir}/vim/gvimrc |
387 |
ahmad |
4276 |
%endif |
388 |
|
|
|
389 |
doktor5000 |
798913 |
# create templates folder |
390 |
|
|
mkdir -p %{buildroot}/%{_datadir}/%{name}/vimfiles |
391 |
tv |
1063595 |
install -m 0644 %{SOURCE61} %{buildroot}/%{_datadir}/%{name}/vimfiles/ |
392 |
doktor5000 |
798913 |
|
393 |
ahmad |
4276 |
%post minimal |
394 |
|
|
update-alternatives --install /bin/vi vi /bin/vim-minimal 10 \ |
395 |
|
|
--slave /bin/view view /bin/vim-minimal \ |
396 |
|
|
--slave /bin/ex ex /bin/vim-minimal \ |
397 |
|
|
--slave /bin/rvi rvi /bin/vim-minimal \ |
398 |
|
|
--slave /bin/rview rview /bin/vim-minimal |
399 |
|
|
update-alternatives --install /bin/vim vim /bin/vim-minimal 10 \ |
400 |
|
|
--slave /bin/rvim rvim /bin/vim-minimal |
401 |
|
|
|
402 |
|
|
%postun minimal |
403 |
|
|
[ $1 = 0 ] || exit 0 |
404 |
|
|
update-alternatives --remove vi /bin/vim-minimal |
405 |
|
|
update-alternatives --remove vim /bin/vim-minimal |
406 |
|
|
|
407 |
|
|
%triggerpostun minimal -- vim-minimal < 7.3 |
408 |
|
|
update-alternatives --remove uvi /bin/vim-minimal |
409 |
|
|
for i in view ex rvi rview rvim; do |
410 |
|
|
update-alternatives --remove $i /bin/$i || : |
411 |
|
|
done |
412 |
|
|
|
413 |
|
|
%post enhanced |
414 |
|
|
update-alternatives --install /bin/vi vi /usr/bin/vim-enhanced 20 \ |
415 |
|
|
--slave /bin/view view /usr/bin/vim-enhanced \ |
416 |
|
|
--slave /bin/ex ex /usr/bin/vim-enhanced \ |
417 |
|
|
--slave /bin/rvi rvi /usr/bin/vim-enhanced \ |
418 |
|
|
--slave /bin/rview rview /usr/bin/vim-enhanced |
419 |
|
|
update-alternatives --install /bin/vim vim /usr/bin/vim-enhanced 20 \ |
420 |
|
|
--slave /bin/rvim rvim /usr/bin/vim-enhanced |
421 |
|
|
|
422 |
|
|
%postun enhanced |
423 |
|
|
[ $1 = 0 ] || exit 0 |
424 |
|
|
update-alternatives --remove vi /usr/bin/vim-enhanced |
425 |
|
|
update-alternatives --remove vim /usr/bin/vim-enhanced |
426 |
|
|
|
427 |
|
|
%triggerpostun enhanced -- vim-enhanced < 7.3 |
428 |
|
|
update-alternatives --remove uvi /usr/bin/vim-enhanced |
429 |
|
|
|
430 |
|
|
%files common -f vim.lang |
431 |
colin |
493177 |
%doc README*.txt |
432 |
ahmad |
4276 |
#%doc --parents mandriva/README* |
433 |
|
|
%doc doc |
434 |
luigiwalser |
397203 |
%{_datadir}/vim/doc |
435 |
|
|
%dir %{_datadir}/vim/ |
436 |
tv |
865213 |
%{_datadir}/vim/[^tlg]* |
437 |
luigiwalser |
397203 |
%{_datadir}/vim/gvimrc_example.vim |
438 |
tv |
881615 |
%{_datadir}/vim/lang/README.txt |
439 |
tv |
881599 |
%{_datadir}/vim/tools |
440 |
tv |
881606 |
%{_datadir}/vim/tutor/README.* |
441 |
|
|
%{_datadir}/vim/tutor/tutor |
442 |
|
|
%{_datadir}/vim/tutor/tutor.vim |
443 |
luigiwalser |
397203 |
%{_mandir}/man1/vim.1* |
444 |
|
|
%{_mandir}/man1/ex.1* |
445 |
|
|
%{_mandir}/man1/vi.1* |
446 |
|
|
%{_mandir}/man1/view.1* |
447 |
|
|
%{_mandir}/man1/rvi.1* |
448 |
|
|
%{_mandir}/man1/rview.1* |
449 |
|
|
%{_mandir}/man1/vimdiff.1* |
450 |
|
|
%{_mandir}/man1/vimtutor.1* |
451 |
|
|
%{_mandir}/man1/rvim.1* |
452 |
|
|
%{_bindir}/vimtutor |
453 |
|
|
%{_bindir}/xxd |
454 |
|
|
%{_mandir}/man1/xxd.1* |
455 |
tv |
865213 |
%dir %{_sysconfdir}/vim/ |
456 |
luigiwalser |
397203 |
%config(noreplace) %{_sysconfdir}/vim/* |
457 |
ahmad |
4276 |
|
458 |
|
|
%files minimal |
459 |
|
|
%doc README*.txt |
460 |
|
|
/bin/vim-minimal |
461 |
|
|
|
462 |
|
|
%files enhanced |
463 |
|
|
%doc README*.txt |
464 |
luigiwalser |
397203 |
%{_bindir}/ex |
465 |
|
|
%{_bindir}/vimdiff |
466 |
|
|
%{_bindir}/vim-enhanced |
467 |
ahmad |
4276 |
|
468 |
luigiwalser |
397203 |
%if %{buildgui} |
469 |
ahmad |
4276 |
%files X11 |
470 |
|
|
%doc README*.txt |
471 |
luigiwalser |
397203 |
%{_bindir}/gvim |
472 |
|
|
%{_bindir}/gvimdiff |
473 |
|
|
%{_bindir}/vimx |
474 |
|
|
%{_mandir}/man1/gvim.1* |
475 |
dams |
311490 |
%{_iconsdir}/hicolor/*/apps/gvim.* |
476 |
tv |
1052471 |
%{_iconsdir}/locolor/*/apps/* |
477 |
|
|
%{_datadir}/applications/*.desktop |
478 |
luigiwalser |
397203 |
%{_datadir}/vim/gvimrc |
479 |
ahmad |
4276 |
%endif |