]> git.pld-linux.org Git - packages/vim.git/blob - vim.spec
perl -pi -e "s/pld-list\@pld.org.pl/feedback\@pld.org.pl/"
[packages/vim.git] / vim.spec
1 #
2 # Conditional build:
3 # _without_static       - without static version
4 # _without_athena       - without Athena Widgets-based gvim. DOESN'T WORK.
5 # _without_motif        - without Motif-based gvim
6 # _without_gtk          - without gtk+-based gvim support
7 # _without_gnome        - without gnome-based gvim support
8 # _with_ispell          - with spell checking (non-standard feature; disables RIGHTLEFT and FKMAP)
9 #
10 Summary:        Vi IMproved - a Vi clone
11 Summary(de):    VIsual editor iMproved
12 Summary(fr):    editeur VIM : VIsual editor iMproved
13 Summary(pl):    Vi IMproved - klon edytora Vi
14 Summary(tr):    Geliþmiþ bir vi sürümü
15 Name:           vim
16 Version:        6.0
17 Release:        2
18 Epoch:          4
19 License:        Charityware
20 Group:          Applications/Editors/Vim
21 Group(de):      Applikationen/Editors/Vim
22 Group(pl):      Aplikacje/Edytory/Vim
23 Source0:        ftp://ftp.vim.org/pub/editors/vim/unix/%{name}-%{version}.tar.bz2
24 Source1:        ftp://ftp.vim.org/pub/editors/vim/extra/%{name}-%{version}-lang.tar.gz
25 #Source2:       ftp://ftp.vim.org/pub/editors/vim/extra/%{name}-%{version}-extra.tar.gz
26 Source3:        g%{name}-athena.desktop
27 Source4:        g%{name}-motif.desktop
28 Source5:        g%{name}-gtk.desktop
29 Source6:        g%{name}-gnome.desktop
30 #packed from    ftp://ftp.vim.org/pub/editors/vim/patches/6.0.*
31 Source7:        %{name}-patches-6.0.101.tar.bz2
32 Patch0:         %{name}-sysconfdir.patch
33 Patch1:         %{name}-visual.patch
34 Patch2:         %{name}-phphighlight.patch
35 Patch3:         %{name}-paths.patch
36 Patch4:         %{name}-ispell.patch
37 URL:            http://www.vim.org/
38 BuildRequires:  autoconf
39 BuildRequires:  gettext-devel
40 BuildRequires:  gpm-devel
41 BuildRequires:  ncurses-devel
42 %{!?_without_athena:BuildRequires:      Xaw3d-devel}
43 %{!?_without_gnome:BuildRequires:       esound-devel}
44 %{!?_without_gnome:BuildRequires:       gnome-libs-devel}
45 %{!?_without_gtk:BuildRequires: gtk+-devel}
46 %{!?_without_motif:BuildRequires:       motif-devel}
47 %{!?_without_static:BuildRequires:      glibc-static}
48 %{!?_without_static:BuildRequires:      ncurses-static}
49 Requires:       %{name}-rt = %{version}
50 %{?_without_static:Requires:    %{name}-static = %{version}}
51 Obsoletes:      vim-enhanced
52 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53
54 %description
55 Text editor similar to Vi. Important improvements: multiple windows,
56 multi-level undo, block highliting, and many other.
57
58 %description -l de
59 Der Visual-Editor iMproved ist ein aktualisierter und erweiterter Klon
60 des vi-Editors, der mit praktisch allen UN*X-Systemen ausgeliefert
61 wird. Er bringt mehrere Fenster, mehrstufige Widerrufen-Funktion,
62 Block-Markierung und viele weitere Zusatzfunktionen im Vergleich zum
63 Standard-vi-Programm.
64
65 %description -l fr
66 L'éditeur VIsuel aMélioré est un clone mis à jour et doté de
67 caractéristiques supplémentaires de l'éditeur « vi » fourni avec
68 pratiquement tous les systèmes UN*X. Il ajoute les fenêtres
69 mutltiples, l'annulation a plusieurs niveaux, la mise en évidence des
70 blocs et autres caractéristiques au vi de base.
71
72 %description -l pl
73 Edytor tekstu podobny do Vi. Wa¿ne ulepszenia: mo¿liwo¶æ pracy w wielu
74 oknach, wielopoziomowa opcja 'cofnij', bloki, pod¶wietlanie sk³adni
75 i wiele innych.
76
77 %description -l tr
78 Standart vi metin düzenleyicisinin geliþmiþ hali; daha fazla komut,
79 birden fazla pencere desteði ve blok iþaretleme yetenekleri içerir.
80
81 %package -n xxd
82 Summary:        Utility to convert files to hexdump or do the reverse
83 Summary(pl):    Narzêdzie do zamiany plików na postaæ szesnastkow± i odwrotnie
84 Group:          Applications/Editors/Vim
85 Group(de):      Applikationen/Editors/Vim
86 Group(pl):      Aplikacje/Edytory/Vim
87
88 %description -n xxd
89 xxd creates a hex dump of a given file or standard input. It can also
90 convert a hex dump back to its original binary form. Like uuencode and
91 uudecode it allows the transmission of binary data in a `mail-safe'
92 ASCII representation, but has the advantage of decoding to standard
93 output. Moreover, it can be used to perform binary file patching.
94
95 %description -n xxd -l pl
96 xxd tworzy szesnastkowy zapis pliku podanego na standardowe wej¶cie.
97 Mo¿e tak¿e przekonwertowaæ taki zapis na oryginaln±, binarn± postaæ.
98 Podobnie jak uuencode i uudecode pozwala na przesy³anie danych
99 binarnych w postaci ASCII, ale ma mo¿liwo¶æ dekodowania na standardowe
100 wyj¶cie. Co wiêcej, mo¿e byæ u¿yty do modyfikowania plików binarnych.
101
102 %package static
103 Summary:        Staticly linked Vim
104 Summary(pl):    Statycznie zlinkowany Vim
105 Group:          Applications/Editors/Vim
106 Group(de):      Applikationen/Editors/Vim
107 Group(pl):      Aplikacje/Edytory/Vim
108 Provides:       vi
109 Obsoletes:      vi
110 Obsoletes:      vim-minimal
111
112 %description static
113 Text editor similar to Vi. This version is build with minimal feature
114 and is installed in /bin as a rescue tool. The installation of this
115 package is STRONGLY recommended.
116
117 %description static -l pl
118 Edytor tekstu podobny do Vi. Ta wersja zosta³a zlinkowana statycznie
119 i posiada minimaln± ilo¶æ dodatków. Jest instalowana w /bin jako
120 narzêdzie dla administratora. Instalacja tego pakietu jest MOCNO
121 zalecana, mo¿e on pomóc Ci uratowaæ system w czasie awarii.
122
123 %package rt
124 Summary:        Vim runtime files
125 Summary(pl):    Pliki przydatne edytorowi Vim
126 Group:          Applications/Editors/Vim
127 Group(de):      Applikationen/Editors/Vim
128 Group(pl):      Aplikacje/Edytory/Vim
129 Requires:       mktemp
130 Requires:       which
131 Obsoletes:      vim-common
132
133 %description rt
134 This package contains macros, documentation, syntax configuration and
135 manual pages for Vim. If you want to take advantage of Vim more
136 powerful features, you should install this package.
137
138 %description rt -l pl
139 W tym pakiecie znajdziesz dokumentacjê, makra, pliki konfiguracyjne i
140 strony podrêcznika dla edytora Vim. Je¿eli chcesz korzystaæ z
141 zaawansowanych mo¿liwo¶ci Vima, powiniene¶ zainstalowaæ ten pakiet.
142
143 %package -n gvim-athena
144 Summary:        Vim for X Window built with Athena
145 Summary(pl):    Vim dla X Window korzystaj±cy z biblioteki Athena
146 Group:          Applications/Editors/Vim
147 Group(de):      Applikationen/Editors/Vim
148 Group(pl):      Aplikacje/Edytory/Vim
149 Requires:       %{name}-rt = %{version}
150 Requires:       iconv
151 Obsoletes:      vim-X11
152
153 %description -n gvim-athena
154 The classic Unix text editor now also under X Window System! This
155 version is build with Athena Widget Set.
156
157 %description -n gvim-athena -l pl
158 Wersja edytora Vim pracuj±ca w ¶rodowisku X Window z wykorzystaniem
159 biblioteki Athena Widget Set.
160
161 %package -n gvim-motif
162 Summary:        Vim for X Window built with Motif
163 Summary(pl):    Vim dla X Window korzystaj±cy z biblioteki Motif
164 Group:          Applications/Editors/Vim
165 Group(de):      Applikationen/Editors/Vim
166 Group(pl):      Aplikacje/Edytory/Vim
167 Requires:       %{name}-rt = %{version}
168 Requires:       iconv
169 Obsoletes:      vim-X11
170
171 %description -n gvim-motif
172 The classic Unix text editor now also under X Window System! This
173 version is build with Motif.
174
175 %description -n gvim-motif -l pl
176 Wersja edytora Vim pracuj±ca w ¶rodowisku X Window z wykorzystaniem
177 biblioteki Motif.
178
179 %package -n gvim-gtk
180 Summary:        Vim for X Window built with gtk
181 Summary(pl):    Vim dla X Window korzystaj±cy z biblioteki GTK
182 Group:          Applications/Editors/Vim
183 Group(de):      Applikationen/Editors/Vim
184 Group(pl):      Aplikacje/Edytory/Vim
185 Requires:       %{name}-rt = %{version}
186 Requires:       iconv
187 Obsoletes:      vim-X11
188
189 %description -n gvim-gtk
190 The classic Unix text editor now also under X Window System! This
191 version is build with GTK.
192
193 %description -n gvim-gtk -l pl
194 Wersja edytora Vim pracuj±ca w ¶rodowisku X Window z wykorzystaniem
195 biblioteki GTK.
196
197 %package -n gvim-gnome
198 Summary:        Vim for X Window built with gnome
199 Summary(pl):    Vim dla X Window korzystaj±cy z biblioteki GNOME
200 Group:          Applications/Editors/Vim
201 Group(de):      Applikationen/Editors/Vim
202 Group(pl):      Aplikacje/Edytory/Vim
203 Requires:       %{name}-rt = %{version}
204 Requires:       iconv
205 Obsoletes:      vim-X11
206
207 %description -n gvim-gnome
208 The classic Unix text editor now also under X Window System! This
209 version is build with GNOME.
210
211 %description -n gvim-gnome -l pl
212 Wersja edytora Vim pracuj±ca w ¶rodowisku X Window z wykorzystaniem
213 bibliotek GNOME.
214
215 %prep
216 %setup -q -b1 -a7 -n %{name}%(echo %{version} | sed -e "s#\.##g")
217 %patch0 -p1
218 %patch1 -p1
219 %patch2 -p1
220 %patch3 -p1
221 %{?_with_ispell:%patch4 -p1}
222
223 # these patches are to "extra" package which we don't need (nor use)
224 rm -f patches/6.0.{027,048,053,064,070,073,093}
225 # apply the rest of officual patches
226 for f in patches/6.0.* ; do
227         echo "Applying official patch `basename $f` ..."
228         patch -s -p0 < $f
229 done
230
231 %build
232 cd src
233 autoconf
234 %configure \
235         --disable-gui \
236         --without-x \
237         --disable-perlinterp \
238         --disable-pythoninterp \
239         --disable-tclinterp \
240         --disable-rubyinterp \
241         --enable-cscope \
242         --enable-gpm \
243         --with-features=huge \
244         --enable-multibyte \
245         --with-tlib=ncurses \
246         --enable-nls
247
248 %{__make} vim
249 mv -f vim vim.ncurses
250
251 %{__make} xxd/xxd
252
253 %if %{!?_without_static:1}%{?_without_static:0}
254 %{__make} distclean
255 LDFLAGS="%{rpmldflags} -static"
256 %configure \
257         --disable-gui \
258         --without-x \
259         --disable-perlinterp \
260         --disable-pythoninterp \
261         --disable-tclinterp \
262         --disable-cscope \
263         --disable-gpm \
264         --disable-multibyte \
265         --with-features=small \
266         --with-tlib=tinfo \
267         --disable-nls
268
269 %{__make} vim
270 mv -f vim vim.static
271 %endif
272
273 %if %{!?_without_athena:1}%{?_without_athena:0}
274 %{__make} distclean
275 LDFLAGS="%{rpmldflags}"
276 %configure \
277         --with-features=huge \
278         --enable-gui=athena \
279         --with-x \
280         --disable-perlinterp \
281         --disable-pythoninterp \
282         --disable-tclinterp \
283         --disable-rubyinterp \
284         --enable-cscope \
285         --enable-fontset \
286         --disable-gpm \
287         --without-gnome \
288         --enable-nls
289 %{__make} vim
290 mv -f vim gvim.athena
291 %endif
292
293 %if %{!?_without_motif:1}%{?_without_motif:0}
294 %{__make} distclean
295 %configure \
296         --with-features=huge \
297         --enable-gui=motif \
298         --with-x \
299         --disable-perlinterp \
300         --disable-pythoninterp \
301         --disable-tclinterp \
302         --disable-rubyinterp \
303         --enable-multibyte \
304         --enable-cscope \
305         --enable-fontset \
306         --disable-gpm \
307         --without-gnome \
308         --enable-nls
309 %{__make} vim
310 mv -f vim gvim.motif
311 %endif
312
313 %if %{!?_without_gtk:1}%{?_without_gtk:0}
314 %{__make} distclean
315 %configure \
316         --with-features=huge \
317         --enable-gui=gtk \
318         --with-x \
319         --disable-perlinterp \
320         --disable-pythoninterp \
321         --disable-tclinterp \
322         --disable-rubyinterp \
323         --disable-gpm \
324         --enable-cscope \
325         --enable-fontset \
326         --enable-nls
327 %{__make} vim
328 mv -f vim gvim.gtk
329 %endif
330
331 %if %{!?_without_gnome:1}%{?_without_gnome:0}
332 %{__make} distclean
333 %configure \
334         --with-features=huge \
335         --enable-gui=gnome \
336         --with-x \
337         --disable-perlinterp \
338         --disable-pythoninterp \
339         --disable-tclinterp \
340         --disable-rubyinterp \
341         --disable-gpm \
342         --enable-cscope \
343         --enable-fontset \
344         --enable-nls
345 %{__make} vim
346 mv -f vim gvim.gnome
347 %endif
348
349 %install
350 rm -rf $RPM_BUILD_ROOT
351 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/vim,%{_bindir}} \
352         $RPM_BUILD_ROOT{/bin,%{_mandir}/man1,%{_datadir}/vim} \
353         $RPM_BUILD_ROOT{%{_prefix}/X11R6/bin,%{_applnkdir}/Development/Editors}
354
355 %{__make} install DESTDIR=$RPM_BUILD_ROOT
356 rm $RPM_BUILD_ROOT%{_bindir}/*
357
358 %{!?_without_static:install src/vim.ncurses     $RPM_BUILD_ROOT%{_bindir}/vim}
359 %{?_without_static:install src/vim.ncurses      $RPM_BUILD_ROOT/bin/vi}
360 %{!?_without_static:install src/vim.static      $RPM_BUILD_ROOT/bin/vi}
361 %{?_without_static:ln -sf /bin/vi               $RPM_BUILD_ROOT%{_bindir}/vim}
362 install src/xxd/xxd                             $RPM_BUILD_ROOT%{_bindir}/xxd
363 install src/vimtutor                            $RPM_BUILD_ROOT%{_bindir}/vimtutor
364
365 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/*.1
366
367 install runtime/doc/vim.1 $RPM_BUILD_ROOT%{_mandir}/man1
368 install runtime/doc/xxd.1 $RPM_BUILD_ROOT%{_mandir}/man1
369
370 install runtime/doc/vimtutor.1 $RPM_BUILD_ROOT%{_mandir}/man1
371
372 echo ".so vim.1" > $RPM_BUILD_ROOT%{_mandir}/man1/ex.1
373 echo ".so vim.1" > $RPM_BUILD_ROOT%{_mandir}/man1/rview.1
374 echo ".so vim.1" > $RPM_BUILD_ROOT%{_mandir}/man1/rvim.1
375 echo ".so vim.1" > $RPM_BUILD_ROOT%{_mandir}/man1/vi.1
376 echo ".so vim.1" > $RPM_BUILD_ROOT%{_mandir}/man1/view.1
377
378 mv -f $RPM_BUILD_ROOT%{_datadir}/vim/v*/vimrc_example.vim $RPM_BUILD_ROOT%{_sysconfdir}/vim/vimrc
379 mv -f $RPM_BUILD_ROOT%{_datadir}/vim/v*/gvimrc_example.vim $RPM_BUILD_ROOT%{_sysconfdir}/vim/gvimrc
380
381 ln -sf vim $RPM_BUILD_ROOT%{_bindir}/rvim
382 ln -sf vi  $RPM_BUILD_ROOT/bin/ex
383 ln -sf vi  $RPM_BUILD_ROOT/bin/view
384 ln -sf vi  $RPM_BUILD_ROOT/bin/rview
385
386 %{!?_without_athena:install src/gvim.athena     $RPM_BUILD_ROOT%{_prefix}/X11R6/bin/gvim.athena}
387 %{!?_without_motif: install src/gvim.motif      $RPM_BUILD_ROOT%{_prefix}/X11R6/bin/gvim.motif}
388 %{!?_without_gtk:   install src/gvim.gtk        $RPM_BUILD_ROOT%{_prefix}/X11R6/bin/gvim.gtk}
389 %{!?_without_gnome: install src/gvim.gnome      $RPM_BUILD_ROOT%{_prefix}/X11R6/bin/gvim.gnome}
390
391 %{!?_without_gtk:ln -sf gvim.gtk                $RPM_BUILD_ROOT%{_prefix}/X11R6/bin/gvim}
392 %{!?_without_gtk:ln -sf gvim                    $RPM_BUILD_ROOT%{_prefix}/X11R6/bin/rgvim}
393 %{!?_without_gtk:ln -sf gvim                    $RPM_BUILD_ROOT%{_prefix}/X11R6/bin/gview}
394 %{!?_without_gtk:ln -sf gvim                    $RPM_BUILD_ROOT%{_prefix}/X11R6/bin/rgview}
395
396 %{!?_without_athena:install %{SOURCE3}          $RPM_BUILD_ROOT%{_applnkdir}/Development/Editors}
397 %{!?_without_motif: install %{SOURCE4}          $RPM_BUILD_ROOT%{_applnkdir}/Development/Editors}
398 %{!?_without_gtk:   install %{SOURCE5}          $RPM_BUILD_ROOT%{_applnkdir}/Development/Editors}
399 %{!?_without_gnome: install %{SOURCE6}          $RPM_BUILD_ROOT%{_applnkdir}/Development/Editors}
400
401 %clean
402 rm -rf $RPM_BUILD_ROOT
403
404 %files
405 %defattr(644,root,root,755)
406 %attr(755,root,root) %{_bindir}/vim
407 %attr(755,root,root) %{_bindir}/rvim
408
409 %files -n xxd
410 %defattr(644,root,root,755)
411 %attr(755,root,root) %{_bindir}/xxd
412 %{_mandir}/man1/xxd.1*
413
414 %files static
415 %defattr(644,root,root,755)
416 %attr(755,root,root) /bin/*
417
418 %{_mandir}/man1/vi.1*
419 %{_mandir}/man1/ex.1*
420 %{_mandir}/man1/view.1*
421 %{_mandir}/man1/rview.1*
422
423 %files rt
424 %defattr(644,root,root,755)
425 %attr(755,root,root) %{_bindir}/vimtutor
426 %dir %{_sysconfdir}/vim
427 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/vim/vimrc
428 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/vim/gvimrc
429
430 %dir %{_datadir}/vim
431 %dir %{_datadir}/vim/v*
432 %{_datadir}/vim/v*/doc
433 %{_datadir}/vim/v*/ftplugin
434 %{_datadir}/vim/v*/indent
435 %{_datadir}/vim/v*/keymap
436 %dir %{_datadir}/vim/v*/lang
437 %{_datadir}/vim/v*/lang/README*
438
439 %lang(af) %{_datadir}/vim/v*/lang/af
440 %lang(de) %{_datadir}/vim/v*/lang/de
441 %lang(es) %{_datadir}/vim/v*/lang/es
442 %lang(fr) %{_datadir}/vim/v*/lang/fr
443 %lang(it) %{_datadir}/vim/v*/lang/it
444 %lang(ja) %{_datadir}/vim/v*/lang/ja*
445 %lang(ko) %{_datadir}/vim/v*/lang/ko
446 %lang(pl) %{_datadir}/vim/v*/lang/pl
447 %lang(sk) %{_datadir}/vim/v*/lang/sk
448 #%lang(tr) %{_datadir}/vim/v*/lang/tr
449 %lang(uk) %{_datadir}/vim/v*/lang/uk
450 %lang(zh_CN) %{_datadir}/vim/v*/lang/zh_CN*
451 %lang(zh_TW) %{_datadir}/vim/v*/lang/zh_TW
452
453 %lang(af) %{_datadir}/vim/v*/lang/menu_af_af*
454 %lang(cs) %{_datadir}/vim/v*/lang/menu_cs_cz*
455 %lang(de) %{_datadir}/vim/v*/lang/menu_de_de*
456 %lang(es) %{_datadir}/vim/v*/lang/menu_es_es*
457 %lang(fr) %{_datadir}/vim/v*/lang/menu_fr_fr*
458 %lang(hu) %{_datadir}/vim/v*/lang/menu_hu_hu*
459 %lang(it) %{_datadir}/vim/v*/lang/menu_it_it*
460 %lang(jp) %{_datadir}/vim/v*/lang/menu_ja_jp*
461 %lang(ko) %{_datadir}/vim/v*/lang/menu_ko_kr*
462 %lang(nl) %{_datadir}/vim/v*/lang/menu_nl_nl*
463 %lang(pl) %{_datadir}/vim/v*/lang/menu_pl_pl*
464 %lang(sk) %{_datadir}/vim/v*/lang/menu_sk_sk*
465 %lang(zh_CN) %{_datadir}/vim/v*/lang/menu_zh_cn*
466 %lang(zh_TW) %{_datadir}/vim/v*/lang/menu_zh_tw*
467
468 %{_datadir}/vim/v*/macros
469 %{_datadir}/vim/v*/plugin
470 %{_datadir}/vim/v*/syntax
471 %{_datadir}/vim/v*/tutor
472 %{_datadir}/vim/v*/colors
473 %{_datadir}/vim/v*/compiler
474 %{_datadir}/vim/v*/*.vim
475 %{_datadir}/vim/v*/*.ps
476
477 %{_mandir}/man1/vim*
478 %{_mandir}/man1/rvim.*
479
480 %if %{!?_without_athena:1}%{?_without_athena:0}
481 %files -n gvim-athena
482 %defattr(644,root,root,755)
483 %attr(755,root,root) %{_prefix}/X11R6/bin/gvim.athena
484 %{_applnkdir}/Development/Editors/gvim-athena.desktop
485 %endif
486
487 %if %{!?_without_motif:1}%{?_without_motif:0}
488 %files -n gvim-motif
489 %defattr(644,root,root,755)
490 %attr(755,root,root) %{_prefix}/X11R6/bin/gvim.motif
491 %{_applnkdir}/Development/Editors/gvim-motif.desktop
492 %endif
493
494 %if %{!?_without_gtk:1}%{?_without_gtk:0}
495 %files -n gvim-gtk
496 %defattr(644,root,root,755)
497 %attr(755,root,root) %{_prefix}/X11R6/bin/gvim.gtk
498 %attr(755,root,root) %{_prefix}/X11R6/bin/rgvim
499 %attr(755,root,root) %{_prefix}/X11R6/bin/rgview
500 %attr(755,root,root) %verify(not link) %{_prefix}/X11R6/bin/gvim
501 %{_applnkdir}/Development/Editors/gvim-gtk.desktop
502 %endif
503
504 %if %{!?_without_gnome:1}%{?_without_gnome:0}
505 %files -n gvim-gnome
506 %defattr(644,root,root,755)
507 %attr(755,root,root) %{_prefix}/X11R6/bin/gvim.gnome
508 %{_applnkdir}/Development/Editors/gvim-gnome.desktop
509 %endif
This page took 0.082937 seconds and 3 git commands to generate.