#note this package is not prefixable %define prefix /usr %define name vim %define version 6.0 %define release 7mdk %define url ftp://ftp.vim.org/pub/vim/unix/ %define vimversion 6.0 %{expand:%%define perl_version %(rpm -q perl|sed 's/perl-\([0-9].*\)-.*$/\1/')} Summary: VIsual editor iMproved Name: %{name} Version: %{version} Release: %{release} Url: http://www.vim.org Source0: %{url}/%{name}-%{version}.tar.bz2 Source2: %{url}/%{name}-%{version}-lang.tar.bz2 Source3: gvim.menu.bz2 Patch1: vim-6.0-official-patch-001.bz2 Patch2: vim-6.0-official-patch-002.bz2 Patch3: vim-6.0-official-patch-003.bz2 Patch4: vim-6.0-official-patch-004.bz2 Patch5: vim-6.0-official-patch-005.bz2 Patch6: vim-6.0-official-patch-006.bz2 Patch7: vim-6.0-official-patch-007.bz2 Patch8: vim-6.0-official-patch-008.bz2 Patch9: vim-6.0-official-patch-009.bz2 Patch10: vim-6.0-official-patch-010.bz2 Patch11: vim-6.0-official-patch-011.bz2 Patch12: vim-6.0-official-patch-012.bz2 Patch13: vim-6.0-official-patch-013.bz2 Patch14: vim-6.0-official-patch-014.bz2 Patch15: vim-6.0-official-patch-015.bz2 Patch16: vim-6.0-official-patch-016.bz2 Patch17: vim-6.0-official-patch-017.bz2 Patch18: vim-6.0-official-patch-018.bz2 Patch19: vim-6.0-official-patch-019.bz2 Patch1002: vim-5.1-vimnotvi.patch.bz2 Patch1004: vimrc_hebrew.patch.bz2 Patch1008: vim-6.0af-man-path.patch.bz2 Patch1009: vim-6.0af-spec-mdk.patch.bz2 Patch1010: vim-6.0-disable-acl-option.patch.bz2 License: Charityware Group: Editors BuildRoot: %{_tmppath}/%{name}-%{version} BuildRequires: perl-devel libtermcap2-devel libgtk+1.2-devel %description VIM (VIsual editor iMproved) is an updated and improved version of the vi editor. Vi was the first real screen-based editor for UNIX, and is still very popular. VIM improves on vi by adding new features: multiple windows, multi-level undo, block highlighting and more. The vim-common package contains files which every VIM binary will need in order to run. %package common Summary: The common files needed by any version of the VIM editor. Group: Editors %description common VIM (VIsual editor iMproved) is an updated and improved version of the vi editor. Vi was the first real screen-based editor for UNIX, and is still very popular. VIM improves on vi by adding new features: multiple windows, multi-level undo, block highlighting and more. The vim-common package contains files which every VIM binary will need in order to run. %package minimal Summary: A minimal version of the VIM editor. Group: Editors Provides: vim PreReq: /usr/sbin/update-alternatives %description minimal VIM (VIsual editor iMproved) is an updated and improved version of the vi editor. Vi was the first real screen-based editor for UNIX, and is still very popular. VIM improves on vi by adding new features: multiple windows, multi-level undo, block highlighting and more. The vim-minimal package includes a minimal version of VIM, which is installed into /bin/vi for use when only the root partition is present. %package enhanced Summary: A version of the VIM editor which includes recent enhancements. Group: Editors Requires: vim-common, perl-base = %{perl_version} Obsoletes: vim-color Provides: vim vim-color PreReq: /usr/sbin/update-alternatives %description enhanced VIM (VIsual editor iMproved) is an updated and improved version of the vi editor. Vi was the first real screen-based editor for UNIX, and is still very popular. VIM improves on vi by adding new features: multiple windows, multi-level undo, block highlighting and more. The vim-enhanced package contains a version of VIM with extra, recently introduced features like Python and Perl interpreters. Install the vim-enhanced package if you'd like to use a version of the VIM editor which includes recently added enhancements like interpreters for the Python and Perl scripting languages. You'll also need to install the vim-common package. %package X11 Summary: The VIM version of the vi editor for the X Window System. Group: Editors Provides: vim Requires: vim-common, gtk+ >= 1.2.3, perl-base = %{perl_version} %description X11 VIM (VIsual editor iMproved) is an updated and improved version of the vi editor. Vi was the first real screen-based editor for UNIX, and is still very popular. VIM improves on vi by adding new features: multiple windows, multi-level undo, block highlighting and more. VIM-X11 is a version of the VIM editor which will run within the X Window System. If you install this package, you can run VIM as an X application with a full GUI interface and mouse support. Install the vim-X11 package if you'd like to try out a version of vi with graphics and mouse capabilities. You'll also need to install the vim-common package. %prep %setup -q -b 2 -n vim60 #official patches %patch1 -p0 %patch2 -p0 %patch3 -p0 %patch4 -p0 %patch5 -p0 %patch6 -p0 %patch7 -p0 %patch8 -p0 %patch9 -p0 %patch10 -p0 %patch11 -p0 %patch12 -p0 %patch13 -p0 %patch14 -p0 %patch15 -p0 %patch16 -p0 %patch17 -p0 %patch18 -p0 %patch19 -p0 #mdk patches %patch1002 -p1 -b .vimnotvi %patch1004 -p1 %patch1008 -p1 -b .manpath %patch1009 -p1 -b .spec %patch1010 -p1 -b .warly %build # First build: gvim CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} \ --enable-pythoninterp --enable-perlinterp --with-features=huge \ --disable-acl --with-x=yes --enable-gui=gtk --exec-prefix=%{prefix}/X11R6 \ --enable-multibyte --enable-xim --enable-fontset --mandir=%{_mandir} echo "#define MAX_FEAT 1" >> src/config.h make ( cd src mv vim gvim make clean ) # Second build: vim-enhanced CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} \ --disable-acl --enable-pythoninterp --enable-perlinterp --with-features=huge \ --with-x=no --enable-gui=no --exec-prefix=%{prefix} make ( cd src mv vim vim-enhanced make clean ) # Third build: vim-minimal CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} \ --with-features=tiny --disable-tclinterp --disable-cscope --disable-multubyte \ --disable-hangulinput --disable-xim --disable-fontset --disable-gui \ --disable-acl --disable-pythoninterp --disable-perlinterp \ --with-x=no --enable-gui=no --exec-prefix=%{prefix} --with-tlib=termcap --disable-gpm --exec-prefix=/ make ( cd src make ) %install mkdir -p $RPM_BUILD_ROOT/bin mkdir -p $RPM_BUILD_ROOT%{_prefix}/{bin,share/vim,X11R6/bin} mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 cd src make prefix=$RPM_BUILD_ROOT%{_prefix} exec_prefix=$RPM_BUILD_ROOT LANGSUBLOC=$RPM_BUILD_ROOT%{_datadir}/locale/ install VIMRTDIR="" mv $RPM_BUILD_ROOT/bin/xxd $RPM_BUILD_ROOT%{_bindir} make installmacros prefix=$RPM_BUILD_ROOT%{_prefix} VIMRTDIR="" install -s -m755 gvim $RPM_BUILD_ROOT%{_prefix}/X11R6/bin install -s -m755 vim-enhanced $RPM_BUILD_ROOT%{_bindir} install -s -m755 vim $RPM_BUILD_ROOT/bin/vim-minimal ( cd $RPM_BUILD_ROOT rm -f ./bin/rvim ln -sf vi ./bin/view ln -sf vi ./bin/ex ln -sf vi ./bin/rvi ln -sf vi ./bin/rview ln -sf vim-enhanced ./usr/bin/ex ln -sf vim-enhanced ./usr/bin/vimdiff rm -f ./usr/man/man1/rvim.1.bz2 ln -sf gvim ./usr/X11R6/bin/vimx ) # installing man pages ( cd $RPM_BUILD_ROOT%{_mandir}/man1 for i in vi rvi gvim; do cp vim.1 $i.1 done ) # rm -rf $RPM_BUILD_ROOT/%{_datadir}/vim/doc/ # ln -sf ../doc/vim-common-%{vimversion}/doc $RPM_BUILD_ROOT%{_datadir}/vim/ ( cd $RPM_BUILD_ROOT/usr/share/vim ln -sf vimrc_example.vim vimrc ) ( cd $RPM_BUILD_ROOT/%{prefix}/share/vim/tools # i need to make a choice :(. rm -f vim132 perl -p -i -e 's|#!/usr/bin/nawk|#!/usr/bin/gawk|' mve.awk perl -p -i -e 's|#!/usr/local/bin/perl|#!/usr/bin/perl|' *.pl perl -p -i -e 's|#!/usr/gnu/bin/perl|#!/usr/bin/perl|' * ) cd .. mv runtime/macros/README.txt README_macros.txt mv runtime/tools/README.txt README_tools.txt mv runtime/doc . perl -p -i -e "s|#!/usr/local/bin/perl|#!/usr/bin/perl|" doc/*.pl # installing the three icons mkdir -p $RPM_BUILD_ROOT%{_miconsdir} mkdir -p $RPM_BUILD_ROOT%{_liconsdir} cp runtime/vim16x16.xpm $RPM_BUILD_ROOT%{_miconsdir}/gvim.xpm cp runtime/vim32x32.xpm $RPM_BUILD_ROOT%{_iconsdir}/gvim.xpm cp runtime/vim48x48.xpm $RPM_BUILD_ROOT%{_liconsdir}/gvim.xpm mkdir -p $RPM_BUILD_ROOT%{_menudir} bzcat %{SOURCE3} > $RPM_BUILD_ROOT%{_menudir}/vim-X11 # gvim and fontset (from Pablo) 2001/03/19 echo 'set guifontset=-*-fixed-medium-r-normal--14-*-*-*-c-*-*-*,-*-*-medium-r-normal--14-*-*-*-c-*-*-*,-*-*-medium-r-normal--14-*-*-*-m-*-*-*,*' > $RPM_BUILD_ROOT%{_datadir}/vim/gvimrc # fix the paths in the man pages ( cd $RPM_BUILD_ROOT/usr/share/man/man1 for i in $RPM_BUILD_ROOT/usr/share/man/man1/*.1 do perl -p -i -e "s|$RPM_BUILD_ROOT||" $i done ) %{find_lang} vim %post minimal update-alternatives --install /bin/vi vi /bin/vim-minimal 10 update-alternatives --install /bin/vim vim /bin/vim-minimal 10 %postun minimal [ $1 = 0 ] || exit 0 update-alternatives --remove vi /bin/vim-minimal update-alternatives --remove vim /bin/vim-minimal %post enhanced update-alternatives --install /bin/vi vi /usr/bin/vim-enhanced 20 update-alternatives --install /bin/vim vim /usr/bin/vim-enhanced 20 %postun enhanced [ $1 = 0 ] || exit 0 update-alternatives --remove vi /usr/bin/vim-enhanced update-alternatives --remove vim /usr/bin/vim-enhanced # menu stuff %post X11 %{update_menus} %postun X11 %{clean_menus} %clean rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_DIR/$RPM_PACKAGE_NAME %files common -f vim.lang %defattr(-,root,root) %doc README*.txt runtime/gvimrc_example.vim runtime/bugreport.vim %doc runtime/menu.vim runtime/mswin.vim doc %doc runtime/termcap runtime/tutor runtime/vimrc_example.vim vimrc_hebrew %{_datadir}/vim %{_mandir}/man1/vim.1* %{_mandir}/man1/ex.1* %{_mandir}/man1/vi.1* %{_mandir}/man1/view.1* %{_mandir}/man1/rvi.1* %{_mandir}/man1/rview.1* %{_mandir}/man1/vimdiff.1* %{_bindir}/xxd %{_mandir}/man1/xxd.1* %files minimal %defattr(-,root,root) %doc README*.txt /bin/ex /bin/vim-minimal /bin/view /bin/rvi /bin/rview %files enhanced %defattr(-,root,root) %doc README*.txt %{_bindir}/vim-enhanced %{_bindir}/ex %{_bindir}/vimdiff %files X11 %defattr(-,root,root) %doc README*.txt %{_prefix}/X11R6/bin/gvim %{_prefix}/X11R6/bin/vimx %{_mandir}/man1/gvim.1* %{_iconsdir}/gvim.xpm %{_miconsdir}/gvim.xpm %{_liconsdir}/gvim.xpm %{_menudir}/vim-X11 %{_datadir}/vim/gvimrc %changelog * Mon Mar 4 2002 Warly <warly@mandrakesoft.com> 6.0-7mdk - remove local path in man pages * Mon Dec 10 2001 Warly <warly@mandrakesoft.com> 6.0-6mdk - remove libacl dependencies * Thu Nov 22 2001 Warly <warly@mandrakesoft.com> 6.0-5mdk - rpmlint fixes * Mon Oct 22 2001 DindinX <odin@mandrakesoft.com> 6.0-4mdk - include the official patches up to 019 * Tue Oct 16 2001 DindinX <odin@mandrakesoft.com> 6.0-3mdk - include the offical patches 001-011 * Tue Oct 09 2001 DindinX <odin@mandrakesoft.com> 6.0-2mdk - make rpmlint a little happier * Wed Sep 27 2001 DindinX <odin@mandrakesoft.com> 6.0-1mdk - 6.0 final! - include vimdiff symlink * Mon Sep 10 2001 DindinX <odin@mandrakesoft.com> 6.0-0.40mdk - 6.0av * Mon Sep 3 2001 DindinX <odin@mandrakesoft.com> 6.0-0.39mdk - 6.0au * Tue Aug 28 2001 DindinX <odin@mandrakesoft.com> 6.0-0.38mdk - 6.0at - removed patch #10 (merged upstream) * Wed Aug 22 2001 DindinX <odin@mandrakesoft.com> 6.0-0.37mdk - fix the perl filetype plugin (thanks to chmouel) * Mon Aug 20 2001 DindinX <odin@mandrakesoft.com> 6.0-0.36mdk - 6.0as * Fri Aug 17 2001 DindinX <odin@mandrakesoft.com> 6.0-0.35mdk - added libgtk+1.2-devel to buildrequires, so gvim is correctly built (reported by Michael Jarvis <michael@jarvis.com>) * Mon Aug 13 2001 DindinX <odin@mandrakesoft.com> 6.0-0.34mdk - 6.0ar * Sat Aug 4 2001 Pixel <pixel@mandrakesoft.com> 6.0-0.33mdk - add require the perl-base used for building (the libperl.so auto-require is not enough) * Mon Jul 16 2001 DindinX <odin@mandrakesoft.com> 6.0-0.32mdk - fixed the paths in the man page. * Fri Jul 13 2001 DindinX <odin@mandrakesoft.com> 6.0-0.31mdk - 6.0an * Mon Jul 2 2001 DindinX <odin@mandrakesoft.com> 6.0-0.30mdk - 6.0am * Mon Jun 25 2001 DindinX <odin@mandrakesoft.com> 6.0-0.29mdk - 6.0al * Mon Jun 18 2001 DindinX <odin@mandrakesoft.com> 6.0-0.28mdk - 6.0ak * Mon Jun 11 2001 DindinX <odin@mandrakesoft.com> 6.0-0.27mdk - 6.0aj * Tue Jun 5 2001 DindinX <odin@mandrakesoft.com> 6.0-0.26mdk - 6.0ai * Mon May 28 2001 DindinX <odin@mandrakesoft.com> 6.0-0.25mdk - 6.0ah * Mon May 21 2001 DindinX <odin@mandrakesoft.com> 6.0-0.24mdk - 6.0ag * Mon May 14 2001 DindinX <odin@mandrakesoft.com> 6.0-0.23mdk - 6.0af - regenerate man-path (#8) spec.vim (#9) patches * Thu May 10 2001 DindinX <odin@mandrakesoft.com> 6.0-0.22mdk - updated vim-5.7.man.patch.bz2 to vim-6.0.man.patch.bz2 and added libtermcap2-devel to BuildRequires (reported by Wayne Davison <wayne@blorf.net>) * Wed May 9 2001 DindinX <odin@mandrakesoft.com> 6.0-0.21mdk - 6.0ae * Wed May 2 2001 DindinX <odin@mandrakesoft.com> 6.0-0.20mdk - 60ad * Wed Apr 25 2001 Pixel <pixel@mandrakesoft.com> 6.0-0.19mdk - rebuild with new perl * Tue Apr 24 2001 Pixel <pixel@mandrakesoft.com> 6.0-0.18mdk - rebuild with new perl * Mon Apr 23 2001 DindinX <odin@mandrakesoft.com> 6.0-0.17mdk - 6.0ac * Mon Mar 26 2001 DindinX <odin@mandrakesoft.com> 6.0-0.16mdk - 6.0z * Thu Mar 22 2001 DindinX <odin@mandrakesoft.com> 6.0-0.15mdk - added BuildRequires: perl-devel (thanks to Jeff Garzik) * Mon Mar 19 2001 DindinX <odin@mandrakesoft.com> 6.0-0.14mdk - Added support for fontset in gvim (from Pablo) - 6.0y * Tue Feb 27 2001 DindinX <odin@mandrakesoft.com> 6.0-0.13mdk - 6.0w * Mon Feb 5 2001 DindinX <odin@mandrakesoft.com> 6.0-0.12mdk - 6.0u - fix the vim-common description (vim-minimal does not requires, nor suggest vim-common) * Tue Jan 30 2001 DindinX <odin@mandrakesoft.com> 6.0-0.11mdk - fix the vim-minimal package (the vi executable was missing!) - better use of alternatives (/bin/vi and /bin/vim are now links) * Tue Jan 23 2001 DindinX <odin@mandrakesoft.com> 6.0-0.10mdk - resurect patch #9 - use alternatives * Tue Jan 23 2001 DindinX <odin@mandrakesoft.com> 6.0-0.09mdk - 6.0t - temporary removed the patch #9 (mandrakesoft-specific spec.vim syntax file) * Tue Jan 2 2001 DindinX <odin@mandrakesoft.com> 6.0-0.08mdk - 6.0r * Wed Dec 13 2000 DindinX <odin@mandrakesoft.com> 6.0-0.07mdk - 6.0p * Tue Dec 5 2000 DindinX <odin@mandrakesoft.com> 6.0-0.06mdk - 6.0o * Mon Nov 27 2000 DindinX <odin@mandrakesoft.com> 6.0-0.05mdk - really set CFLAGS to RPM_OPT_FLAGS (should make Dadou happier) (thanks to Guillaume) * Mon Nov 27 2000 DindinX <odin@mandrakesoft.com> 6.0-0.04mdk - fix ./configure call (--enable-max-feature is now --with-features=huge) - include some fix in spec.vim from Geoffrey Lee * Sat Nov 25 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 6.0-0.03mdk - 6.0n. * Wed Nov 08 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 6.0-0.02mdk - Upgrade spec.vim and mandrakizifications. * Tue Nov 7 2000 DindinX <odin@mandrakesoft.com> 6.0-0.01mdk - 6.0 - remove ctags from this package * Tue Sep 19 2000 DindinX <odin@mandrakesoft.com> 5.7-7mdk - Added a patch to fix the paths in the man pages (Thx to Jerome Dumonteil for reporting this) * Thu Aug 31 2000 DindinX <odin@mandrakesoft.com> 5.7-6mdk - Rebuild on ke - Macrozifications - BM * Tue Jun 27 2000 DindinX <odin@mandrakesoft.com> 5.7-5mdk - really fix the help files - now vi is very spartiate (VI-like) and vim has syntax highlighting * Mon Jun 26 2000 DindinX <odin@mandrakesoft.com> 5.7-4mdk - make vim-minimal very, very minimal * Mon Jun 26 2000 DindinX <odin@mandrakesoft.com> 5.7-3mdk - fix a typo which prevent the help files to be found - remove syntax highlighting by default - remove all trace of indenting * Mon Jun 26 2000 DindinX <odin@mandrakesoft.com> 5.7-2mdk - Corrected the ctags version: 3.5.1 * Mon Jun 26 2000 DindinX <odin@mandrakesoft.com> 5.7-1mdk - 5.7 - use a more standard vimrc file * Thu May 25 2000 DindinX <odin@mandrakesoft.com> 5.6-19mdk - Upgrade to 5.6.072 - remove autoindentation :( * Tue May 2 2000 DindinX <odin@mandrakesoft.com> 5.6-18mdk - wrap option now defaults to FALSE * Fri Apr 28 2000 DindinX <odin@mandrakesoft.com> 5.6-17mdk - remove menu icon path * Tue Apr 18 2000 Pixel <pixel@mandrakesoft.com> 5.6-16mdk - fix for perl 5.6 - fix for ctags (i modified patch vim-typo) - rebuild on true compile box (*with* spec-helper) - remove abusive provides ctags (not needed) * Tue Apr 18 2000 DindinX <odin@mandrakesoft.com> 5.6-15mdk - Fix the online documentation * Tue Apr 18 2000 DindinX <odin@mandrakesoft.com> 5.6-14mdk - Make a separate rpm for ctags * Mon Apr 17 2000 DindinX <odin@mandrakesoft.com> 5.6-13mdk - fix the name of the menu entry - remove etags - move ctags from /bin to /usr/bin - Added the ctags man page * Tue Mar 28 2000 DindinX <odin@mandrakesoft.com> 5.6-12mdk - Do the Right Thing for the menus with the help of Guillaume Cottenceau * Tue Mar 28 2000 DindinX <odin@mandrakesoft.com> 5.6-11mdk - Fix the menu group once again (sic) Thanks to Guillaume Cottenceau * Mon Mar 27 2000 DindinX <odin@mandrakesoft.com> 5.6-10mdk - Added icons * Mon Mar 27 2000 DindinX <odin@mandrakesoft.com> 5.6-9mdk - fix menu * Fri Mar 24 2000 DindinX <odin@mandrakesoft.com> 5.6-8mdk - remove the RPM_ROOT_BUILD references in %post (thanks to Thierry Vignaud for pointing this) - some changes to the default vimrc * Wed Mar 22 2000 Pixel <pixel@mandrakesoft.com> 5.6-7mdk - add provides vim for X11 enhanced and minimal - changed license from freeware to OpenSource * Mon Mar 20 2000 DindinX <odin@mandrakesoft.com> 5.6-6mdk - Specs fixes - removed absolute links - Added menu entry - Remove the hlsearch by default (cause it might be puzzling) * Thu Feb 10 2000 DindinX <odin@mandrakesoft.com> 5.6-5mdk - Finally include ctags in vim-common :-/ * Thu Feb 10 2000 DindinX <odin@mandrakesoft.com> 5.6-4mdk - fix a typo in the call to the ./configure script so more features are now enabled. * Sun Feb 6 2000 DindinX <odin@mandrakesoft.com> 5.6-3mdk - Added support for Chinese/Japanese/Corean support for gvim (Thanks to Pablo) - added a link for the default vimrc. * Mon Jan 31 2000 DindinX <odin@mandrakesoft.com> 5.6-2mdk - Added the doc/ subdirectory in /usr/doc/vim-common-5.6/doc - Correctly install vimrc_hebrew * Sun Jan 16 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 5.6-1mdk - 5.6. - Enable right to left mode. - Add vimrc_hebrew from Tzafrir Cohen <tzafrir@technion.ac.il> * Tue Oct 26 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com> - Build release. * Tue Sep 21 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com> - 5.5. * Mon Aug 2 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com> - Reinserting old patch. * Thu Jul 29 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com> - First spec file for Mandrake distribution. # end of file