Firefox-9.0.1

Introduction to Firefox

Firefox is a stand-alone browser based on the Mozilla codebase.

This package is known to build and work properly using an LFS-7.0 platform.

Package Information

Additional Downloads

Firefox Dependencies

Required

ALSA Library-1.0.24.1, gtk+-2.24.8, Zip-3.0 and UnZip-6.0.

Note: libjpeg and libpng (patched for apng support) should have been installed before gdk-pixbuf and should exist on your system. If for some strange reason you haven't installed them, you should remove the --with-system-jpeg and --with-system-png options from the mozconfig file created below.

Recommended

Optional

D-Bus GLib Bindings-0.98, startup-notification-0.9, SQLite-3.7.8, Hunspell, Libevent, Doxygen-1.7.5, GNOME Virtual File System-2.24.4 and libgnomeui-2.24.3 (for gnome integration), libnotify-0.4.5, NSPR-4.8.9, NSS-3.13.1, Xulrunner-9.0.1 (linking against an installed xulrunner makes Firefox about 32 MB smaller, which is trivial compared to the size of xulrunner), Wireless Tools-28, Valgrind (only for testing the jemalloc code) and Wget-1.13.4

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/firefox

Installation of Firefox

The configuration of Firefox is accomplished by creating a mozconfig file containing the desired configuration options. A default mozconfig is created below. To see the entire list of available configuration options (and an abbreviated description of each one), issue ./configure --help. You may also wish to review the entire file and uncomment any other desired options. Create the file by issuing the following command:

patch -p1 < ../firefox-9.0.1-libpng-1.5-1.patch &&
cat > mozconfig << "EOF"
# If you have a multicore machine you can speed up the build by running
# several jobs at once, but if you have a single core, delete this line:
mk_add_options MOZ_MAKE_FLAGS="-j4"

# If you have installed Yasm delete this option:
ac_add_options --disable-webm

# If you have installed DBus-Glib delete this option:
ac_add_options --disable-dbus

# If you have installed wireless-tools delete this option:
ac_add_options --disable-necko-wifi

# If you have installed libnotify delete this option:
ac_add_options --disable-libnotify

# If you have installed xulrunner uncomment these two lines:
# ac_add_options --with-system-libxul
# ac_add_options --with-libxul-sdk=/usr/lib/xulrunner-devel-9.0.1

# Uncomment these if you have installed them:
# ac_add_options --with-system-nspr
# ac_add_options --with-system-nss
# ac_add_options --enable-system-sqlite
# ac_add_options --with-system-libvpx
# ac_add_options --enable-startup-notification
# ac_add_options --enable-system-hunspell
# ac_add_options --with-system-libevent

mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/firefox-build-dir
ac_add_options --enable-official-branding
ac_add_options --prefix=/usr

# The rest of these options have no effect if you're
# building against an already installed xulrunner:
ac_add_options --with-pthreads
ac_add_options --enable-system-ffi
ac_add_options --with-system-jpeg
ac_add_options --with-system-png
ac_add_options --enable-system-cairo
ac_add_options --with-system-zlib
ac_add_options --enable-shared
ac_add_options --disable-static
ac_add_options --disable-debug
ac_add_options --disable-crashreporter
ac_add_options --disable-installer
ac_add_options --disable-updater
ac_add_options --disable-tests
EOF

Compile Firefox by issuing the following commands:

sed -i 's# ""##' browser/base/Makefile.in &&
make -f client.mk

If you have not linked Firefox against an installed Xulrunner:

make -C firefox-build-dir/browser/installer

This package does not come with a test suite.

Now, if you have not linked Firefox against an installed Xulrunner, as the root user, install the package:

mkdir /usr/lib/firefox-9.0.1 &&
tar -xvf firefox-build-dir/dist/firefox-*.tar.bz2 -C /usr/lib/firefox-9.0.1 --strip-components=1 &&
ln -sfv ../lib/firefox-9.0.1/firefox /usr/bin/firefox &&
mkdir -p /usr/lib/mozilla/plugins &&
ln -sv ../mozilla/plugins /usr/lib/firefox-9.0.1 &&
chown -R -v root:root /usr/lib/firefox-9.0.1

If you have linked against an already installed Xulrunner, as the root user:

make -C firefox-build-dir install &&
rm /usr/bin/firefox &&
cat > /usr/bin/firefox << "EOF" &&
#!/bin/bash
/usr/lib/xulrunner-9.0.1/xulrunner /usr/lib/firefox-9.0.1/application.ini "${@}"
EOF
chmod 755 /usr/bin/firefox &&
mkdir -p /usr/lib/mozilla/plugins &&
ln -sv ../mozilla/plugins /usr/lib/firefox-9.0.1 &&
chown -R -v root:root /usr/lib/firefox-9.0.1

Command Explanations

sed -i 's# ""##' browser/base/Makefile.in: This removes an unprintable control character from the title bar.

make -f client.mk ...: Mozilla products are packaged to allow the use of a configuration file which can be used to pass the configuration settings to the configure command. make uses the client.mk file to get initial configuration and setup parameters.

make -C firefox-build-dir/browser/installer: this creates a Firefox tarball.

tar -xfv firefox-build-dir/dist ...: This untars Firefox in /usr/lib. The --strip-components=1 option removes the leading 'firefox' directory from the filenames, allowing us to untar it into a versioned directory. Untaring it (instead of running make install) prevents it installing /usr/lib/firefox-devel-9.0.1 which contains about 430 MB of files. If you need any of those files, they're in Xulrunner-9.0.1

make -C firefox-build-dir install: This runs make install in firefox-build-dir.

ln -sfv ... /usr/bin/firefox: this puts a symbolic link to the firefox executable in your ${PATH}.

mkdir -p /usr/lib/mozilla/plugins: this checks that /usr/lib/mozilla/plugins exists (if you installed librsvg-2.26.3, it was probably already there).

ln -sv ... /usr/lib/firefox-9.0.1: this makes a symbolic link to /usr/lib/mozilla/plugins.

Configuring Firefox

If you deleted the --disable-webm option from your mozconfig, your Firefox can play most YouTube videos without the need for the flash plugin. To enable this, go to http://www.youtube.com/html5 and click on 'Join the HTML5 Trial' (needs cookies enabled).

Contents

Installed Programs: firefox
Installed Libraries: Numerous libraries, browser components, plugins, extensions, and helper modules installed in /usr/lib/firefox-9.0.1.
Installed Directories: /usr/lib/firefox-9.0.1

Short Descriptions

firefox

is a gtk2 internet browser that uses the gecko rendering engine.

Last updated on 2012-01-16 14:56:53 +0000