]> git.pld-linux.org Git - packages/vim.git/blob - vim.spec
2f76f12ab34379c4753447cf007e435450806c56
[packages/vim.git] / vim.spec
1 #
2 # Conditional build:
3 # _without_static       - without static version
4 # _without_athena       - without Athena Widgets-based gvim
5 # _without_motif        - without Motif-based gvim
6 # _without_gtk          - without gtk+-based gvim support
7 # _without_gnome        - without gnome-based gvim support
8 #
9 Summary:        Vi IMproved - a Vi clone
10 Summary(de):    VIsual editor iMproved
11 Summary(fr):    editeur VIM : VIsual editor iMproved
12 Summary(pl):    Vi IMproved - klon edytora Vi
13 Summary(tr):    Geliþmiþ bir vi sürümü
14 Name:           vim
15 Version:        6.0ah
16 Release:        1
17 Epoch:          2
18 License:        Charityware
19 Group:          Applications/Editors/Vim
20 Group(de):      Applikationen/Editors/Vim
21 Group(pl):      Aplikacje/Edytory/Vim
22 Source0:        ftp://ftp.vim.org/pub/editors/vim/unreleased/unix/%{name}-%{version}-src.tar.gz
23 Source1:        ftp://ftp.vim.org/pub/editors/vim/unreleased/unix/%{name}-%{version}-rt.tar.gz
24 Source2:        ftp://ftp.vim.org/pub/editors/vim/unreleased/extra/%{name}-%{version}-extra.tar.gz
25 Source3:        ftp://ftp.vim.org/pub/editors/vim/unreleased/extra/%{name}-%{version}-lang.tar.gz
26 Source4:        g%{name}-athena.desktop
27 Source5:        g%{name}-motif.desktop
28 Source6:        g%{name}-gtk.desktop
29 Source7:        g%{name}-gnome.desktop
30 Patch0:         %{name}-sysconfdir.patch
31 Patch1:         %{name}-visual.patch
32 Patch2:         %{name}-lilo.patch
33 Patch3:         %{name}-phphighlight.patch
34 Patch4:         %{name}-paths.patch
35 #Patch5:                %{name}-speed_t.patch
36 URL:            http://www.vim.org/
37 BuildRequires:  ncurses-devel
38 %{!?_without_static:BuildRequires:      ncurses-static}
39 %{!?_without_static:BuildRequires:      glibc-static}
40 BuildRequires:  gpm-devel
41 %{!?_without_athena:BuildRequires:      Xaw3d-devel}
42 %{!?_without_motif:BuildRequires:       motif-devel}
43 %{!?_without_gtk:BuildRequires: gtk+-devel}
44 %{!?_without_gnome:BuildRequires:       gnome-libs-devel}
45 %{!?_without_gnome:BuildRequires:       esound-devel}
46 Requires:       %{name}-rt = %{version}
47 %{?_without_static:Requires:    %{name}-static = %{version}}
48 Obsoletes:      vim-enhanced
49 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
51 %description
52 Text editor similar to Vi. Important improvements: multiple windows,
53 multi-level undo, block highliting, and many other.
54
55 %description -l de
56 Der Visual-Editor iMproved ist ein aktualisierter und erweiterter Klon
57 des vi-Editors, der mit praktisch allen UN*X-Systemen ausgeliefert
58 wird. Er bringt mehrere Fenster, mehrstufige Widerrufen-Funktion,
59 Block-Markierung und viele weitere Zusatzfunktionen im Vergleich zum
60 Standard-vi-Programm.
61
62 %description -l fr
63 L'éditeur VIsuel aMélioré est un clone mis à jour et doté de
64 caractéristiques supplémentaires de l'éditeur « vi » fourni avec
65 pratiquement tous les systèmes UN*X. Il ajoute les fenêtres
66 mutltiples, l'annulation a plusieurs niveaux, la mise en évidence des
67 blocs et autres caractéristiques au vi de base.
68
69 %description -l pl
70 Edytor tekstu podobny do Vi. Wa¿ne ulepszenia: mo¿liwo¶æ pracy w wielu
71 oknach, wielopoziomowa opcja 'cofnij', bloki, pod¶wietlanie sk³adni
72 i wiele innych.
73
74 %description -l tr
75 Standart vi metin düzenleyicisinin geliþmiþ hali; daha fazla komut,
76 birden fazla pencere desteði ve blok iþaretleme yetenekleri içerir.
77
78 %package static
79 Summary:        Staticly linked Vim
80 Summary(pl):    Statycznie zlinkowany Vim
81 Group:          Applications/Editors/Vim
82 Group(de):      Applikationen/Editors/Vim
83 Group(pl):      Aplikacje/Edytory/Vim
84 Provides:       vi
85 Obsoletes:      vi
86 Obsoletes:      vim-minimal
87  
88 %description static
89 Text editor similar to Vi. This version is build with minimal feature
90 and is installed in /bin as a rescue tool. The installation of this
91 package is STRONGLY recommended.
92
93 %description static -l pl
94 Edytor tekstu podobny do Vi. Ta wersja zosta³a skompilowana statycznie
95 i posiada minimaln± ilo¶æ dodatków. Jest instalowana w /bin jako
96 narzêdzie dla administratora. Instalacja tego pakietu jest MOCNO
97 zalecana, mo¿e on pomóc Ci uratowaæ system w czasie awarii.
98
99 %package rt 
100 Summary:        Vim runtime files
101 Summary(pl):    Pliki przydatne edytorowi Vim 
102 Group:          Applications/Editors/Vim
103 Group(de):      Applikationen/Editors/Vim
104 Group(pl):      Aplikacje/Edytory/Vim
105 Requires:       mktemp
106 Obsoletes:      vim-common
107
108 %description rt
109 This package contains macros, documentation, syntax configuration and
110 manual pages for vim. If you want to take advantage of vim more
111 powerful features, you should install this package.
112
113 %description rt -l pl
114 W tym pakiecie znajdziesz dokumentacjê, makra, pliki konfiguracyjne i
115 strony podrêcznika dla edytora vim. Je¿eli chcesz korzystaæ z
116 zaawansowanych mo¿liwo¶ci vim-a, powiniene¶ zainstalowaæ ten pakiet.
117
118 %package -n gvim-athena
119 Summary:        Vim for X Window built with Athena
120 Summary(pl):    Vim dla X Window korzystaj±cy z biblioteki Athena
121 Group:          Applications/Editors/Vim
122 Group(de):      Applikationen/Editors/Vim
123 Group(pl):      Aplikacje/Edytory/Vim
124 Requires:       %{name}-rt = %{version}
125 Requires:       iconv
126 Obsoletes:      vim-X11
127
128 %description -n gvim-athena
129 The classic Unix text editor now also under X Window System! This
130 version is build with Athena Widget Set.
131
132 %description -n gvim-athena -l pl
133 Wersja edytora Vim pracuj±ca w ¶rodowisku X Window z wykorzystaniem
134 biblioteki Athena Widget Set.
135
136 %package -n gvim-motif
137 Summary:        Vim for X Window built with Motif
138 Summary(pl):    Vim dla X Window korzystaj±cy z biblioteki Motif
139 Group:          Applications/Editors/Vim
140 Group(de):      Applikationen/Editors/Vim
141 Group(pl):      Aplikacje/Edytory/Vim
142 Requires:       %{name}-rt = %{version}
143 Requires:       iconv
144 Obsoletes:      vim-X11
145
146 %description -n gvim-motif
147 The classic Unix text editor now also under X Window System! This
148 version is build with Motif.
149
150 %description -n gvim-motif -l pl
151 Wersja edytora Vim pracuj±ca w ¶rodowisku X Window z wykorzystaniem
152 biblioteki Motif.
153
154 %package -n gvim-gtk
155 Summary:        Vim for X Window built with gtk
156 Summary(pl):    Vim dla X Window korzystaj±cy z biblioteki GTK
157 Group:          Applications/Editors/Vim
158 Group(de):      Applikationen/Editors/Vim
159 Group(pl):      Aplikacje/Edytory/Vim
160 Requires:       %{name}-rt = %{version}
161 Requires:       iconv
162 Obsoletes:      vim-X11
163
164 %description -n gvim-gtk
165 The classic Unix text editor now also under X Window System! This
166 version is build with GTK and GNOME.
167
168 %description -n gvim-gtk -l pl
169 Wersja edytora vim pracuj±ca w ¶rodowisku X Window z wykorzystaniem
170 biblioteki GTK oraz GNOME.
171
172 %package -n gvim-gnome
173 Summary:        Vim for X Window built with gnome
174 Summary(pl):    Vim dla X Window korzystaj±cy z biblioteki GNOME
175 Group:          Applications/Editors/Vim
176 Group(de):      Applikationen/Editors/Vim
177 Group(pl):      Aplikacje/Edytory/Vim
178 Requires:       %{name}-rt = %{version}
179 Requires:       iconv
180 Obsoletes:      vim-X11
181
182 %description -n gvim-gnome
183 The classic Unix text editor now also under X Window System! This
184 version is build with GNOME.
185
186 %description -n gvim-gnome -l pl
187 Wersja edytora vim pracuj±ca w ¶rodowisku X Window z wykorzystaniem
188 biblioteki GNOME.
189
190 %prep
191 %setup -q -b 1 -b 2 -b 3 -n %{name}%(echo %{version} | sed -e "s#\.##g")
192 %patch0 -p1
193 %patch1 -p1
194 %patch2 -p1
195 %patch3 -p1
196 %patch4 -p1
197 #%patch5 -p1
198
199 %build
200 cd src
201 %configure \
202         --disable-gui \
203         --without-x \
204         --disable-perlinterp \
205         --disable-pythoninterp \
206         --disable-tclinterp \
207         --disable-rubyinterp \
208         --enable-cscope \
209         --enable-gmp \
210         --enable-max-features \
211         --enable-multibyte \
212         --with-tlib=ncurses \
213         --enable-nls
214
215 %{__make} vim
216 mv -f vim vim.ncurses
217
218 %if %{!?_without_static:1}%{?_without_static:0}
219 %{__make} distclean
220 %configure \
221         --disable-gui \
222         --without-x \
223         --disable-perlinterp \
224         --disable-pythoninterp \
225         --disable-tclinterp \
226         --disable-cscope \
227         --disable-gpm \
228         --disable-multibyte \
229         --enable-min-features \
230         --with-tlib=tinfo \
231         --disable-nls
232
233 %{__make} vim
234 mv -f vim vim.static
235 %endif
236
237 %{__make} xxd/xxd
238 mv -f xxd/xxd xxd.static
239
240 %if %{!?_without_athena:1}%{?_without_athena:0}
241 %{__make} distclean
242 %configure \
243         --enable-max-features \
244         --enable-gui=athena \
245         --with-x \
246         --disable-perlinterp \
247         --disable-pythoninterp \
248         --disable-tclinterp \
249         --disable-rubyinterp \
250         --enable-cscope \
251         --enable-fontset \
252         --disable-gpm \
253         --without-gnome \
254         --enable-nls
255 %{__make} vim
256 mv -f vim gvim.athena
257 %endif
258
259 %if %{!?_without_motif:1}%{?_without_motif:0}
260 %{__make} distclean
261 %configure \
262         --enable-max-features \
263         --enable-gui=motif \
264         --with-x \
265         --disable-perlinterp \
266         --disable-pythoninterp \
267         --disable-tclinterp \
268         --disable-rubyinterp \
269         --enable-multibyte \
270         --enable-cscope \
271         --enable-fontset \
272         --disable-gpm \
273         --without-gnome \
274         --enable-nls
275 %{__make} vim
276 mv -f vim gvim.motif
277 %endif
278
279 %if %{!?_without_gtk:1}%{?_without_gtk:0}
280 %{__make} distclean
281 %configure \
282         --enable-max-features \
283         --enable-gui=gtk \
284         --with-x \
285         --disable-perlinterp \
286         --disable-pythoninterp \
287         --disable-tclinterp \
288         --disable-rubyinterp \
289         --disable-gpm \
290         --enable-cscope \
291         --enable-fontset \
292         --enable-nls
293 %{__make} vim
294 mv -f vim gvim.gtk
295 %endif
296
297 %if %{!?_without_gnome:1}%{?_without_gnome:0}
298 %{__make} distclean
299 %configure \
300         --enable-max-features \
301         --enable-gui=gnome \
302         --with-x \
303         --disable-perlinterp \
304         --disable-pythoninterp \
305         --disable-tclinterp \
306         --disable-rubyinterp \
307         --disable-gpm \
308         --enable-cscope \
309         --enable-fontset \
310         --enable-nls
311 %{__make} vim
312 mv -f vim gvim.gnome
313 %endif
314
315 %install
316 rm -rf $RPM_BUILD_ROOT
317 install -d $RPM_BUILD_ROOT{%{_var}/lib/vim,%{_sysconfdir}/vim,%{_bindir}} \
318         $RPM_BUILD_ROOT{/bin,%{_mandir}/man1,%{_datadir}/vim} \
319         $RPM_BUILD_ROOT{%{_prefix}/X11R6/bin,%{_applnkdir}/Development/Editors}
320
321 %{__make} install DESTDIR=$RPM_BUILD_ROOT
322 rm $RPM_BUILD_ROOT%{_bindir}/*
323
324 %{!?_without_static:install src/vim.ncurses     $RPM_BUILD_ROOT%{_bindir}/vim}
325 %{?_without_static:install src/vim.ncurses      $RPM_BUILD_ROOT/bin/vi}
326 %{!?_without_static:install src/vim.static      $RPM_BUILD_ROOT/bin/vi}
327 %{?_without_static:ln -sf /bin/vi               $RPM_BUILD_ROOT%{_bindir}/vim}
328 install src/xxd.static                          $RPM_BUILD_ROOT/bin/xxd
329 install src/vimtutor                            $RPM_BUILD_ROOT%{_bindir}/vimtutor
330
331 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/*.1
332
333 install runtime/doc/vim.1 $RPM_BUILD_ROOT%{_mandir}/man1
334 install runtime/doc/xxd.1 $RPM_BUILD_ROOT%{_mandir}/man1
335
336 install runtime/doc/vimtutor.1 $RPM_BUILD_ROOT%{_mandir}/man1
337
338 echo ".so vim.1" > $RPM_BUILD_ROOT%{_mandir}/man1/ex.1
339 echo ".so vim.1" > $RPM_BUILD_ROOT%{_mandir}/man1/rview.1
340 echo ".so vim.1" > $RPM_BUILD_ROOT%{_mandir}/man1/rvim.1
341 echo ".so vim.1" > $RPM_BUILD_ROOT%{_mandir}/man1/vi.1
342 echo ".so vim.1" > $RPM_BUILD_ROOT%{_mandir}/man1/view.1
343
344 mv -f $RPM_BUILD_ROOT%{_datadir}/vim/v*/vimrc_example.vim $RPM_BUILD_ROOT%{_sysconfdir}/vim/vimrc
345 mv -f $RPM_BUILD_ROOT%{_datadir}/vim/v*/gvimrc_example.vim $RPM_BUILD_ROOT%{_sysconfdir}/vim/gvimrc
346
347 ln -sf vim $RPM_BUILD_ROOT%{_bindir}/rvim
348 ln -sf vi  $RPM_BUILD_ROOT/bin/ex
349 ln -sf vi  $RPM_BUILD_ROOT/bin/view
350 ln -sf vi  $RPM_BUILD_ROOT/bin/rview
351
352 %{!?_without_athena:install src/gvim.athena     $RPM_BUILD_ROOT%{_prefix}/X11R6/bin/gvim.athena}
353 %{!?_without_motif: install src/gvim.motif      $RPM_BUILD_ROOT%{_prefix}/X11R6/bin/gvim.motif}
354 %{!?_without_gtk:   install src/gvim.gtk        $RPM_BUILD_ROOT%{_prefix}/X11R6/bin/gvim.gtk}
355 %{!?_without_gnome: install src/gvim.gnome      $RPM_BUILD_ROOT%{_prefix}/X11R6/bin/gvim.gnome}
356
357 %{!?_without_gtk:ln -sf gvim.gtk                $RPM_BUILD_ROOT%{_prefix}/X11R6/bin/gvim}
358 %{!?_without_gtk:ln -sf gvim                    $RPM_BUILD_ROOT%{_prefix}/X11R6/bin/rgvim}
359 %{!?_without_gtk:ln -sf gvim                    $RPM_BUILD_ROOT%{_prefix}/X11R6/bin/gview}
360 %{!?_without_gtk:ln -sf gvim                    $RPM_BUILD_ROOT%{_prefix}/X11R6/bin/rgview}
361
362 %{!?_without_athena:install %{SOURCE4}          $RPM_BUILD_ROOT%{_applnkdir}/Development/Editors}
363 %{!?_without_motif: install %{SOURCE5}          $RPM_BUILD_ROOT%{_applnkdir}/Development/Editors}
364 %{!?_without_gtk:   install %{SOURCE6}  $RPM_BUILD_ROOT%{_applnkdir}/Development/Editors}
365 %{!?_without_gnome: install %{SOURCE7}          $RPM_BUILD_ROOT%{_applnkdir}/Development/Editors}
366
367 %clean
368 rm -rf $RPM_BUILD_ROOT
369
370 %files
371 %defattr(644,root,root,755)
372 %attr(755,root,root) %{_bindir}/vim
373 %attr(755,root,root) %{_bindir}/rvim
374
375 %files static
376 %defattr(644,root,root,755)
377 %attr(755,root,root) /bin/*
378
379 %{_mandir}/man1/vi.1*
380 %{_mandir}/man1/ex.1*
381 %{_mandir}/man1/xxd.1*
382 %{_mandir}/man1/view.1*
383 %{_mandir}/man1/rview.1*
384
385 %files rt
386 %defattr(644,root,root,755)
387 %attr(755,root,root) %{_bindir}/vimtutor
388 %dir %{_sysconfdir}/vim
389 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/vim/vimrc
390 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/vim/gvimrc
391
392 %dir %{_var}/lib/vim
393
394 %dir %{_datadir}/vim
395 %dir %{_datadir}/vim/v*
396 %{_datadir}/vim/v*/doc
397 %{_datadir}/vim/v*/ftplugin
398 %{_datadir}/vim/v*/indent
399 %{_datadir}/vim/v*/keymap
400 %dir %{_datadir}/vim/v*/lang
401 %{_datadir}/vim/v*/lang/README*
402 %lang(af) %{_datadir}/vim/v*/lang/*af*
403 %lang(cs) %{_datadir}/vim/v*/lang/*cs*
404 %lang(de) %{_datadir}/vim/v*/lang/*de*
405 %lang(es) %{_datadir}/vim/v*/lang/es
406 %lang(es) %{_datadir}/vim/v*/lang/*es_es*
407 %lang(es) %{_datadir}/vim/v*/lang/*spanish*
408 %lang(fr) %{_datadir}/vim/v*/lang/*fr*
409 %lang(hu) %{_datadir}/vim/v*/lang/*hu*
410 %lang(nl) %{_datadir}/vim/v*/lang/*nl*
411 %lang(it) %{_datadir}/vim/v*/lang/*it*
412 %lang(ja) %{_datadir}/vim/v*/lang/*ja*
413 %lang(ko) %{_datadir}/vim/v*/lang/*ko*
414 #%lang(pl) %{_datadir}/vim/v*/lang/*pl*
415 %lang(zh_TW) %{_datadir}/vim/v*/lang/*zh*
416 %{_datadir}/vim/v*/macros
417 %{_datadir}/vim/v*/plugin
418 %{_datadir}/vim/v*/syntax
419 %{_datadir}/vim/v*/tutor
420 %{_datadir}/vim/v*/*.vim
421
422 %{_mandir}/man1/vim.*
423 %{_mandir}/man1/rvim.*
424
425 %{!?_without_athena:%files -n gvim-athena}
426 %{!?_without_athena:%defattr(644,root,root,755)}
427 %{!?_without_athena:%attr(755,root,root) %{_prefix}/X11R6/bin/gvim.athena}
428 %{!?_without_athena:%{_applnkdir}/Development/Editors/gvim-athena.desktop}
429
430 %{!?_without_motif:%files -n gvim-motif}
431 %{!?_without_motif:%defattr(644,root,root,755)}
432 %{!?_without_motif:%attr(755,root,root) %{_prefix}/X11R6/bin/gvim.motif}
433 %{!?_without_motif:%{_applnkdir}/Development/Editors/gvim-motif.desktop}
434
435 %{!?_without_gtk:%files -n gvim-gtk}
436 %{!?_without_gtk:%defattr(644,root,root,755)}
437 %{!?_without_gtk:%attr(755,root,root) %{_prefix}/X11R6/bin/gvim.gtk}
438 %{!?_without_gtk:%attr(755,root,root) %{_prefix}/X11R6/bin/rgvim}
439 %{!?_without_gtk:%attr(755,root,root) %{_prefix}/X11R6/bin/rgview}
440 %{!?_without_gtk:%attr(755,root,root) %verify(not link) %{_prefix}/X11R6/bin/gvim}
441 %{!?_without_gtk:%{_applnkdir}/Development/Editors/gvim-gtk.desktop}
442
443 %{!?_without_gnome:%files -n gvim-gnome}
444 %{!?_without_gnome:%defattr(644,root,root,755)}
445 %{!?_without_gnome:%attr(755,root,root) %{_prefix}/X11R6/bin/gvim.gnome}
446 %{!?_without_gnome:%{_applnkdir}/Development/Editors/gvim-gnome.desktop}
This page took 0.841864 seconds and 2 git commands to generate.