Contents

How to Build F-Spot from GIT

This page has evolved from my own personal notes, so please feel free to update it to be more consistent and accurate. Hopefully it will help people who do not have to much experience with GIT and compiling from GIT to participate a bit more.

WARNING

Please ensure you have a good set of backup of your F-Spot database (~/.gnome2/f-spot/photos.db) as well as your actual photos (~/Photos). When you are using Master/Head from GIT it is not as thorougly tested as the stable version. We do our best to ensure no critical errors will slip through, but sometimes it might happen. Also, Master/Head version might have changed the F-Spot database structure a bit, which means that your stable version of F-Spot will not be able to use it anymore.

So to be safe, we strongly recommend you to run on test data. That is use the --basedir and --photodir options. In this example I put both under /tmp, but you can specify whatever

Backup photos.db

cp ~/.gnome2/f-spot/photos.db ~/.gnome2/f-spot/photos.db.Stable

Install the pre-requisite packages

You need GIT client as well as the usual build tools before proceeding.

On Ubuntu, you need to run the following before doing any building:

sudo apt-get install automake1.9 libtool git-core
sudo apt-get build-dep f-spot

Create directories

mkdir -p ~/development/
mkdir -p ~/unstable/f-spot

Go to development main directory

cd ~/development/

Download the latest sources from GIT

Fetch the latest unstable version from GNOME GIT repository with the following command.

git clone git://git.gnome.org/f-spot

Additional current dependencies

Important: Currently, f-spot from GIT requires mono 2.2.

Firstly, ensure that you have at least mono 2.2 in your distribution. Ubuntu Jaunty users may get mono 2.4 from PPA.

Build

Go to trunk directory

cd f-spot

Configure and autogen

./autogen.sh --prefix=$HOME/unstable/f-spot --disable-scrollkeeper

At this point, it is likely that the configure script will notify you of further dependencies. Install the missing software, and repeat the autogen command until it is successful.

Compile

make all

Install

If you are in the src directory, please go to the main f-spot directory (cd ..)

make install

(You can alternatively combine the Compile and Install into one command)

make all install

If the make install fails with a reference to

make[1]: Entering directory `.../f-spot/po'
make[1]: install_sh@: Command not found
make[1]: *** [install-data-yes] Error 127

Please check bug 351522 for a workaround/solution.


Run

Run GIT Install

cd ${HOME}/unstable/f-spot/bin
./f-spot --basedir /tmp  --photodir /tmp

Update from GIT

As changes are made to f-spot, you can now get the latest version by running the following:

cd ~/development/f-spot
git pull

Compile and test run the new version

make all
make install
cd ~/unstable/f-spot/bin
./f-spot --basedir /tmp  --photodir /tmp

A quick way of running

If only the f-spot core src files have been modified, there is no need to do a proper 'make install'. Instead you can run it directly from the src directory.

cd src
./f-spot --uninstalled --basedir /tmp  --photodir /tmp

Developing

A bit later you might want to start participate by testing patches or actually submit patches as well. Instructions for how to generate a patch diff file, as well as how to install a patch comes next

Generate a patch

TODO: This should be updated for GIT, in line with the GNOME GIT documents [1]

Just remember to ensure you have done a svm update first, before you do a svn diff.

svn diff > MyF-Spot.diff

If you have added a new source file, the following command will add this file to your patch.

diff -u -p /dev/null <NEW FILE> >> MyF-Spot.diff

You must also update the Makefile.am (which is used to create the other makefiles. Do not forget to update the Changelog either.

To install a patch

Ensure you are located in the same directory as the diff file specifies and then run:

patch -p0 < YourF-Spot.diff

How NOT to build from HEAD

If you're running Debian unstable and you're interested in running the latest (current, unreleased) code but not in building it yourself, you may also use the unofficial packages available at Lolando's repository. They track HEAD, and they're usually updated a couple of times a week. The disclaimer still applies: this is provided as a way to test current code, and no guarantees are made.

This page was last modified on 30 May 2009, at 15:52. This page has been accessed 29,141 times.


Powered by MediaWiki
Copyright © 2005. Powered by MediaWiki. Valid XHTML & CSS