(Note that the link to Ubuntu's instructions for building Chromium appears to be heavily outdated.)
Disclaimer: I'm the maintainer of the Chromium Beta and Dev PPAs.
If you run
apt-get source chromium-browser, you'll get the source code for the current stable version of Chromium that's in the repos along with the patches that Ubuntu applies on top of Chromium (which are in the
debian/patches folder). You can add additional patches to be applied to Chromium here, but note that some of the patches you add may conflict or be the same as the patches Ubuntu uses. Also, update the
series file, which describes what patches to apply and in what order.
The build script is at
debian/rules. It's quite long, but the most important variable you'll probably be interested in is
GYP_DEFINES, which is where you would specify the build flags to build Chromium with. For example, if you wanted to build Chromium with
enable_google_now=0, then add a line saying
GYP_DEFINES += enable_google_now=0 (you can add it around the other lines starting with
GYP_DEFINES). Note that some build flags on that page conflict with the build flags Ubuntu uses (I know
enable_webrtc is set to 1 in
As for building it, the simplest way would probably be to run
dpkg-buildpackage -b from the
chromium-browser-* directory. This will apply the patches, run through the
debian/rules file, and then make several deb files. If there are build dependencies missing, it should notify you of those and stop the build. You can then install those deb files.
Note that building Chromium takes about 4-5 hours on a 4-core machine and takes about 15 GB of space (with debugging symbols included). Without debugging symbols (if you comment out the line that adds the
-g flag), I'd estimate that it would take about 7-8 GB of space.