Before you start, read Mozilla Linux Build Prerequisites
One useful trick on Debian and Debian based distributions like Ubuntu is to use apt-get build-dep firefox. This installs everything required to build Debian's Firefox package. Since Flock is built on Firefox, this satisfies almost all of the build requirements.
If you have the wrong default shell (for example, Ubuntu uses /bin/dash), you will get the following error:
fbuild-initialsetup.sh: 201: Syntax error: "(" unexpected
The default shell can be verified by checking what file /bin/sh is symlinked to:
$ ls -l /bin/sh
lrwxrwxrwx 1 root root 4 Nov 16 04:55 /bin/sh -> bash
To fix it: sudo dpkg-reconfigure dash
Which is equivalent to:
$ rm /bin/sh
$ ln -s /bin/bash /bin/sh
You are probably wondering why Ubuntu does not use bash: https://wiki.ubuntu.com/DashAsBinSh
apt-get install subversion
ac_add_options --enable-system-cairo
ccache is recommended.
g++ is in a separate package from gcc in some distributions.
GTK+-devel and libxt-dev libraries are needed at least on Ubuntu Hoary.
fbuild has been used on: