glfs/xsoft/graphweb/firefox.xml
Andrew Benton 51ff157982 Firefox http link works now
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@9990 af4574ff-66df-0310-9fd7-8a98e5e911e0
2012-04-24 17:00:11 +00:00

394 lines
14 KiB
XML

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../../general.ent">
%general-entities;
<!ENTITY firefox-download-http
"http://releases.mozilla.org/pub/mozilla.org/firefox/releases/&firefox-version;/source/firefox-&firefox-version;.source.tar.bz2">
<!ENTITY firefox-download-ftp
"ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/&firefox-version;/source/firefox-&firefox-version;.source.tar.bz2">
<!ENTITY firefox-md5sum "80c3e5927274de7f181fb5f931ac5fd4">
<!ENTITY firefox-size "75 MB">
<!ENTITY firefox-buildsize "2.8 GB (31 MB installed)">
<!ENTITY firefox-time "24 SBU (or 0.3 SBU if you're building against
an installed Xulrunner)">
]>
<sect1 id="firefox" xreflabel="Firefox-&firefox-version;">
<?dbhtml filename="firefox.html" ?>
<sect1info>
<othername>$LastChangedBy$</othername>
<date>$Date$</date>
</sect1info>
<title>Firefox-&firefox-version;</title>
<indexterm zone="firefox">
<primary sortas="a-Firefox">Firefox</primary>
</indexterm>
<sect2 role="package">
<title>Introduction to Firefox</title>
<para>
<application>Firefox</application> is a stand-alone browser based on the
<application>Mozilla</application> codebase.
</para>
&lfs71_checked;
<bridgehead renderas="sect3">Package Information</bridgehead>
<itemizedlist spacing="compact">
<listitem>
<para>
Download (HTTP): <ulink url="&firefox-download-http;"/>
</para>
</listitem>
<listitem>
<para>
Download (FTP): <ulink url="&firefox-download-ftp;"/>
</para>
</listitem>
<listitem>
<para>
Download MD5 sum: &firefox-md5sum;
</para>
</listitem>
<listitem>
<para>
Download size: &firefox-size;
</para>
</listitem>
<listitem>
<para>
Estimated disk space required: &firefox-buildsize;
</para>
</listitem>
<listitem>
<para>
Estimated build time: &firefox-time;
</para>
</listitem>
</itemizedlist>
<bridgehead renderas="sect3">Firefox Dependencies</bridgehead>
<bridgehead renderas="sect4">Required</bridgehead>
<para role="required">
<xref linkend="alsa-lib"/>,
<xref linkend="gtk2"/>,
<xref linkend="zip"/> and
<xref linkend="unzip"/>.
</para>
<para>
Note: <application>libjpeg</application> and
<application>libpng</application> (patched for apng support) should have
been installed before <application>gdk-pixbuf</application> and should
exist on your system. If for some strange reason you haven't installed
them, you should remove the <option>--with-system-jpeg</option> and
<option>--with-system-png</option> options from the
<filename>mozconfig</filename> file created below.
</para>
<bridgehead renderas="sect4">Recommended</bridgehead>
<para role="recommended">
<xref linkend="yasm"/> or <xref linkend="libvpx"/>
(to allow <application>Firefox</application> to play webm videos).
</para>
<bridgehead renderas="sect4">Optional</bridgehead>
<para role="optional">
<xref linkend="dbus-glib"/>,
<xref linkend="startup-notification"/>,
<xref linkend="sqlite"/>,
<ulink url="http://hunspell.sourceforge.net/">Hunspell</ulink>,
<ulink url="http://libevent.org/">Libevent</ulink>,
<xref linkend="doxygen"/>,
<xref linkend="gnome-vfs"/> and
<xref linkend="libgnomeui"/> (for integration with the old version of
<application>Gnome</application>),
<xref linkend="libnotify"/>,
<xref linkend="nspr"/>, <xref linkend="nss"/>,
<xref linkend="xulrunner"/> (linking against an installed xulrunner makes
Firefox about 32 MB smaller, which is trivial compared to the size of
xulrunner),
<xref linkend="wireless_tools"/>,
<ulink url="http://www.valgrind.org/">Valgrind</ulink> (only for testing
the jemalloc code) and
<xref linkend="wget"/>
</para>
<para condition="html" role="usernotes">
User Notes: <ulink url="&blfs-wiki;/firefox"/>
</para>
</sect2>
<sect2 role="installation">
<title>Installation of Firefox</title>
<para>
The configuration of <application>Firefox</application> is accomplished by
creating a <filename>mozconfig</filename> file containing the desired
configuration options. A default <filename>mozconfig</filename> is created
below. To see the entire list of available configuration options (and an
abbreviated description of each one), issue <command>./configure
--help</command>. You may also wish to review the entire file and
uncomment any other desired options. Create the file by issuing the
following command:
</para>
<screen><userinput>cat &gt; mozconfig &lt;&lt; "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-&xulrunner-version;
# Uncomment these if you have installed them:
# ac_add_options --enable-startup-notification
# ac_add_options --enable-system-hunspell
# ac_add_options --enable-system-sqlite
# ac_add_options --with-system-libevent
# ac_add_options --with-system-libvpx
# ac_add_options --with-system-nspr
# ac_add_options --with-system-nss
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 --disable-crashreporter
ac_add_options --disable-debug
ac_add_options --disable-installer
ac_add_options --disable-static
ac_add_options --disable-tests
ac_add_options --disable-updater
ac_add_options --enable-shared
ac_add_options --enable-system-cairo
ac_add_options --enable-system-ffi
ac_add_options --with-pthreads
ac_add_options --with-system-jpeg
ac_add_options --with-system-png
ac_add_options --with-system-zlib
EOF</userinput></screen>
<para>
Compile <application>Firefox</application> by issuing the following
commands:
</para>
<screen><userinput>sed -i '/fcntl.h/a#include &lt;unistd.h&gt;' \
ipc/chromium/src/base/{file_util_linux,message_pump_libevent}.cc &amp;&amp;
sed -i '/sys\/time\.h/a#include &lt;unistd.h&gt;' ipc/chromium/src/base/time_posix.cc &amp;&amp;
sed -i 's# ""##' browser/base/Makefile.in &amp;&amp;
make -f client.mk</userinput></screen>
<para>
This package does not come with a test suite.
</para>
<para>
If you have <emphasis>not</emphasis> linked
<application>Firefox</application> against an installed
<application>Xulrunner</application>:
</para>
<screen><userinput>make -C firefox-build-dir/browser/installer</userinput></screen>
<para>
Now, as the <systemitem class="username">root</systemitem> user, if you
have <emphasis>not</emphasis> linked <application>Firefox</application>
against an installed <application>Xulrunner</application>, install the
package:
</para>
<screen role="root"><userinput>mkdir /usr/lib/firefox-&firefox-version; &amp;&amp;
tar -xvf firefox-build-dir/dist/firefox-&firefox-version;.en-US.linux-$(uname -m).tar.bz2 \
-C /usr/lib/firefox-&firefox-version; --strip-components=1 &amp;&amp;
ln -sfv ../lib/firefox-&firefox-version;/firefox /usr/bin &amp;&amp;
mkdir -p /usr/lib/mozilla/plugins &amp;&amp;
ln -sv ../mozilla/plugins /usr/lib/firefox-&firefox-version; &amp;&amp;
chown -R -v root:root /usr/lib/firefox-&firefox-version;</userinput></screen>
<para>
If you <emphasis>have</emphasis> linked against an already installed
<application>Xulrunner</application>, as the
<systemitem class="username">root</systemitem> user:
</para>
<screen role="root"><userinput>make -C firefox-build-dir install &amp;&amp;
rm /usr/bin/firefox &amp;&amp;
cat &gt; /usr/bin/firefox &lt;&lt; "EOF" &amp;&amp;
#!/bin/bash
/usr/lib/xulrunner-&xulrunner-version;/xulrunner /usr/lib/firefox-&firefox-version;/application.ini "${@}"
EOF
chmod 755 /usr/bin/firefox &amp;&amp;
mkdir -p /usr/lib/mozilla/plugins &amp;&amp;
ln -sv ../mozilla/plugins /usr/lib/firefox-&firefox-version; &amp;&amp;
chown -R -v root:root /usr/lib/firefox-&firefox-version;</userinput></screen>
</sect2>
<sect2 role="commands">
<title>Command Explanations</title>
<para>
<command>sed -i '/fcntl.h/a#include &lt;unistd.h&gt;'
ipc/chromium/src/base/{file_util_linux,message_pump_libevent}.cc
&amp;&amp; sed -i '/sys\/time\.h/a#include &lt;unistd.h&gt;'
ipc/chromium/src/base/time_posix.cc</command>: These seds fix bugs that
would otherwise break the build if you're using
<application>GCC 4.7</application>.
</para>
<para>
<command>sed -i 's# ""##' browser/base/Makefile.in</command>: This sed
removes an unprintable control character from the title bar.
</para>
<para>
<command>make -f client.mk ...</command>: Mozilla products are packaged to
allow the use of a configuration file which can be used to pass the
configuration settings to the <command>configure</command> command.
<command>make</command> uses the <filename>client.mk</filename> file to
get initial configuration and setup parameters.
</para>
<para>
<command>make -C firefox-build-dir/browser/installer</command>: this
creates a <application>Firefox</application> tarball similar to the ones
you can download from Mozilla.
</para>
<para>
<command>tar -xfv firefox-build-dir/dist ...</command>: This untars
<application>Firefox</application> in /usr/lib. The
<option>--strip-components=1</option> 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
<filename class="directory">/usr/lib/firefox-devel-&firefox-version;</filename>
which contains about 430 MB of files. If you need any of those files,
they're in <xref linkend="xulrunner"/>
</para>
<para>
<command>make -C firefox-build-dir install</command>: This runs
<command>make install</command> in firefox-build-dir.
</para>
<para>
<command>ln -sfv ... /usr/bin/firefox</command>: this puts a symbolic link
to the <command>firefox</command> executable in your ${PATH}.
</para>
<para>
<command>mkdir -p /usr/lib/mozilla/plugins</command>: this checks
that <filename class="directory">/usr/lib/mozilla/plugins</filename>
exists.
</para>
<para>
<command>ln -sv ... /usr/lib/firefox-&firefox-version;</command>: this
makes a symbolic link to
<filename class="directory">/usr/lib/mozilla/plugins</filename>. It's not
really needed, <application>Firefox</application> checks
<filename class="directory">/usr/lib/mozilla/plugins</filename> by
default, we make the symbolic link to keep all the plugins installed in
one folder.
</para>
</sect2>
<sect2 role="configuration">
<title>Configuring Firefox</title>
<para>
If you deleted the <option>--disable-webm</option> option from your
<filename>mozconfig</filename>, your <application>Firefox</application>
can play most YouTube videos without the need for the flash plugin. To
enable this, go to <ulink url="http://www.youtube.com/html5"/> and click
on 'Join the HTML5 Trial' (needs cookies enabled).
</para>
<para>
If you use a desktop environment like <application>Gnome</application> or
<application>KDE</application> you may like to create a
<filename>firefox.desktop</filename> file so that
<application>Firefox</application> appears in the panel's menus. If you
didn't enable startup-notification in your mozconfig change the
StartupNotify line to false. As the
<systemitem class="username">root</systemitem> user:
</para>
<screen role="root"><userinput>cat &gt; /usr/share/applications/firefox.desktop &lt;&lt; "EOF"
[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=Firefox
Comment=Browse The Web
Icon=firefox
Exec=firefox
Categories=Network;GTK;Application;Browser;WebBrowser;
StartupNotify=true
Terminal=false
EOF
ln -sv -f /usr/lib/firefox-&firefox-version;/icons/mozicon128.png /usr/share/pixmaps/firefox.png</userinput></screen>
</sect2>
<sect2 role="content">
<title>Contents</title>
<segmentedlist>
<segtitle>Installed Programs</segtitle>
<segtitle>Installed Libraries</segtitle>
<segtitle>Installed Directories</segtitle>
<seglistitem>
<seg>firefox</seg>
<seg>
Numerous libraries, browser components, plugins, extensions, and
helper modules installed in
<filename class="directory">/usr/lib/firefox-&firefox-version;</filename>.
</seg>
<seg>/usr/lib/firefox-&firefox-version;</seg>
</seglistitem>
</segmentedlist>
<variablelist>
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
<?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
<varlistentry id="firefox-prog">
<term><command>firefox</command></term>
<listitem>
<para>
is a gtk2 internet browser that uses the Gecko rendering engine.
</para>
<indexterm zone="firefox firefox-prog">
<primary sortas="b-firefox">firefox</primary>
</indexterm>
</listitem>
</varlistentry>
</variablelist>
</sect2>
</sect1>