Configuration
Ensure proper APT configuration /etc/apt/sources.list:
# here you find # + firefox, thunderbird, enigmail, locale packages in here, nspr, nss deb-src http://archive.ubuntu.com/ubuntu/ feisty main deb-src http://archive.ubuntu.com/ubuntu/ feisty-updates main # here you find everything else mozillateam maintained deb-src http://archive.ubuntu.com/ubuntu/ feisty universe deb-src http://archive.ubuntu.com/ubuntu/ feisty-updates universe
Get Package Source
Get and extract package sources:
user@nowhere$ apt-get source <packagename>
Examples:
user@nowhere$ apt-get source firefox user@nowhere$ apt-get source thunderbird
Build Dependencies
Install essential packages:
user@nowhere$ apt-get install build-essential fakeroot
Install all build dependencies:
user@nowhere$ apt-get build-dep <packagename>
Examples:
user@nowhere$ apt-get build-dep firefox user@nowhere$ apt-get build-dep thunderbird
Building Package
For a complete complete documentation see dpkg-buildpackage(1). Below common examples.
If you just want to produce your own .deb files, you probably want to run the first example. Note: all examples below will fail at the end with a gpg error. You can safely ignore this unless you want to distribute your packages. In case you want to sign anyway, you can overwrite the GPG key used by providing your own key-id to the as -k YOUR-KEY-ID.
Build all binaries:
user@nowhere$ cd firefox-2.0.0.0/ # Option A: don't sign user@nowhere$ dpkg-buildpackage -rfakeroot -b # Option B: sign with your own key user@nowhere$ dpkg-buildpackage -rfakeroot -b -kYOUR-KEY-ID
Build only architecture dependent binaries (e.g. build *_i386.deb but not *_all.deb):
user@nowhere$ cd firefox-2.0.0.0/ user@nowhere$ dpkg-buildpackage -rfakeroot -B
Build all binary packages + sources:
user@nowhere$ cd firefox-2.0.0.0/ user@nowhere$ dpkg-buildpackage -rfakeroot
Force inclusion of orig.tar.gz file in produced .changes:
user@nowhere$ cd firefox-2.0.0.0/ user@nowhere$ dpkg-buildpackage -rfakeroot -sa
Force exclusion of orig.tar.gz file in produced .changes:
user@nowhere$ cd firefox-2.0.0.0/ user@nowhere$ dpkg-buildpackage -rfakeroot -sa