Friday, August 1, 2008

Installing the latest gVim and Vim in Ubuntu Hardy Heron

I recently got a new computer and reinstalled Ubuntu and found out that my old post on how to install the latest gVim in Hardy Heron didn't work anymore. This is what I did to install the latest one. Thanks godlygeek!


sudo apt-get build-dep vim
sudo apt-get install build-essential devscripts fakeroot dpkg-dev
apt-get source vim
cd vim-7.1
(cd upstream/patches; python get_patches.py)
dch -v 1:7.1-138+1ubuntu4~$(whoami)1 "Updated with patches through $(ls upstream/patches | grep -v '\.py$' | tail -n 1)"
sed -i -e '/gvimtutor/d' -e "1idebian/tmp/usr/bin/gvimtutor\t\t\t\tusr/bin/" debian/vim-runtime.install.in
dpkg-buildpackage -rfakeroot -uc -b
Having trouble viewing that? See the pastie.

Now, you're supposed to have .deb files in the parent directory. I ran into a problem though in the last line. Here are the last few lines of output after running dpkg-buildpackage -rfakeroot -uc -b: http://pastie.org/246789

To fix this, godlygeek asked me to edit vim-7.1/debian/vim-runtime.install.in and remove the line with gvimtutor in it. See my vim-runtime.install.in file.

So I edited it (gedit
vim-7.1/debian/vim-runtime.install.in), then ran the last line (
dpkg-buildpackage -rfakeroot -uc -b
in vim-7.1 directory again.

I got the compiled *.deb files in the parent directory!

To install them (note that your files will look different):

sudo dpkg -i vim-full_7.1-138+1ubuntu4~ramon1_all.deb
sudo dpkg -i vim-gui-common_7.1-138+1ubuntu4~ramon1_all.deb
sudo dpkg -i vim-runtime_7.1-138+1ubuntu4~ramon1_all.deb
sudo dpkg -i vim-gnome_7.1-138+1ubuntu4~ramon1_i386.deb

1 comment:

Ramon said...

godlygeek saw the post and made these comments (for your reference):
godlygeek: well, strictly speaking...
godlygeek: the debian/vim-runtime.install.in line was unnecessary, and broke things.
godlygeek: that's adding the line that you needed to delete in order to make vim build. so, apparently, for some patch numbers that line was needed... and now it isn't anymore.. i guess.