Install and test upstream yelp stuff on Ubuntu. WWW.Smythies.com

Introduction: Sometimes when working on the Ubuntu Official Documentation issue resolution requires fixes to the tools as opposed to, or in addition to, fixes to the documentation source files or make files. This can result in a need try (test) the latest development yelp stuff (yelp-tools, yelp-xsl, yelp).
These notes are a mini how to, mainly as a memory aid for myself.

Procedure:

Checkinstall is required. If not already installed, then install it:

sudo apt-get install checkinstall

I use the git method, and have not written up the get the tarball method:

sudo apt-get install git

Create some working directory and set up a git clone. For yelp-tools (the process is the same for yelp-xsl, just change "tools" to "xsl" as required):

mkdir temp-yelp-tools
cd temp-yelp-tools
git clone git://git.gnome.org/yelp-tools
cd yelp-tools

Now build the debian package. We need to override the default location. We also do not want to actually install the package yet, as we want to check contents and file locations first.

./configure --prefix=/usr
make
sudo checkinstall --install=no -D make install

Now, checkinstall will ask some questions:

This package will be built according to these values:

0 -  Maintainer: [ root@doug-desktop ]
1 -  Summary: [ ]
2 -  Name:    [ yelp ]
3 -  Version: [ tools ]
4 -  Release: [ 1 ]
5 -  License: [ GPL ]
6 -  Group:   [ checkinstall ]
7 -  Architecture: [ amd64 ]
8 -  Source location: [ yelp-tools ]
9 -  Alternate source location: [  ]
10 - Requires: [  ]
11 - Provides: [ yelp ]
12 - Conflicts: [  ]
13 - Replaces: [  ]

Enter a number to change any of them or press ENTER to continue:

An example set of values (the version must start with a number and the name should be yelp-tools):

This package will be built according to these values:

0 -  Maintainer: [ root@doug-desktop ]
1 -  Summary: [ Doug local yelp-tools ]
2 -  Name:    [ yelp-tools ]
3 -  Version: [ 3.11.doug06 ]
4 -  Release: [ 1 ]
5 -  License: [ GPL ]
6 -  Group:   [ checkinstall ]
7 -  Architecture: [ amd64 ]
8 -  Source location: [ yelp-tools ]
9 -  Alternate source location: [  ]
10 - Requires: [  ]
11 - Provides: [ yelp ]
12 - Conflicts: [  ]
13 - Replaces: [  ]

Enter a number to change any of them or press ENTER to continue:

Note that the version number of 3.11.bla was on purpose to be greater than the current Ubuntu version of 3.10.bla.
If the compile goes O.K. you will end up with the package yelp-tools_3.11.doug06-1_amd64.deb (or similar, based on your architecture). Check the contents, and perhaps compare to the Ubuntu package file contents, pay particular attention to file locations. Don't worry that the Ubuntu version might not have as many doc files, we don't care:

dpkg --contents yelp-tools_3.11.doug06-1_amd64.deb
Once confident that the package has what we want and that the files will be installed in the right place, install it:

sudo dpkg -i yelp-tools_3.11.doug06-1_amd64.deb

Note: If you don't get the names right (i.e. if you forget to change the default name), some screwing around might be required here. Example:

doug@s15:~/temp-yelp-git/yelp-tools$ sudo dpkg -i yelp_3.11.1.doug77-1_amd64.deb
Selecting previously unselected package yelp.
(Reading database ... 216082 files and directories currently installed.)
Preparing to unpack yelp_3.11.1.doug77-1_amd64.deb ...
Unpacking yelp (3.11.1.doug77-1) ...
dpkg: error processing archive yelp_3.11.1.doug77-1_amd64.deb (--install):
 trying to overwrite '/usr/bin/yelp-check', which is also in package yelp-tools 3.10.0-1
Errors were encountered while processing:
 yelp_3.11.1.doug77-1_amd64.deb
doug@s15:~/temp-yelp-git/yelp-tools$ sudo dpkg -r yelp-tools 3.10.0-1
(Reading database ... 216081 files and directories currently installed.)
Removing yelp-tools (3.10.0-1) ...
dpkg: warning: ignoring request to remove 3.10.0-1 which isn't installed
doug@s15:~/temp-yelp-git/yelp-tools$ sudo dpkg -i yelp_3.11.1.doug77-1_amd64.deb
(Reading database ... 216062 files and directories currently installed.)
Preparing to unpack yelp_3.11.1.doug77-1_amd64.deb ...
Unpacking yelp (3.11.1.doug77-1) ...
Setting up yelp (3.11.1.doug77-1) ...
doug@s15:~/temp-yelp-git/yelp-tools$

Proceed with the testing.
Afterwards, and if you want to go back to the defailt Ubuntu package:

sudo dpkg -r yelp-tools
sudo apt-get install yelp-tools
Install and test upstream yelp stuff on Ubuntu. WWW.Smythies.com emaildoesnotwork@smythies.com 2014.02.05 Updated 2014.08.02