mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-01-27 09:42:12 +08:00
5be3a74ca0
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@13627 af4574ff-66df-0310-9fd7-8a98e5e911e0
453 lines
16 KiB
XML
453 lines
16 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-http
|
|
"http://ftp.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 "499b70a9f08a2291d528e87eaf8804a3">
|
|
<!ENTITY firefox-size "141 MB">
|
|
<!-- measured on LFS-7.5, x86_64 -->
|
|
<!ENTITY firefox-buildsize "5.0 GB (62 MB installed) (or 963 MB and 7.0 MB if using Xulrunner)">
|
|
<!ENTITY firefox-time "48 SBU (0.3 SBU if using 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>
|
|
|
|
&lfs75_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>
|
|
|
|
<bridgehead renderas="sect4">Recommended</bridgehead>
|
|
<para role="recommended">
|
|
<xref linkend="icu"/>,
|
|
<xref linkend="libevent"/>,
|
|
<xref linkend="libvpx"/>,
|
|
<xref linkend="nspr"/>,
|
|
<xref linkend="nss"/>,
|
|
<xref linkend="sqlite"/> and
|
|
<xref linkend="yasm"/>
|
|
</para>
|
|
|
|
<note>
|
|
<para>
|
|
If you don't install recommended dependencies,
|
|
then internal copies of those packages will
|
|
be used. They might be tested to work, but
|
|
they can be out of date or contain security
|
|
holes.
|
|
</para>
|
|
</note>
|
|
|
|
<note>
|
|
<para>
|
|
With <application>firefox-31.0</application> and later versions, you
|
|
must have installed <application>openssl</application> before
|
|
<application>Python 2</application>, or the build system will quickly
|
|
fail with output including "ImportError: cannot import name
|
|
HTTPSHandler". If you are in any doubt about this (e.g. upgrading
|
|
from an older version of firefox), check if
|
|
<filename>/usr/lib/python2.7/lib-dynload/_ssl.so</filename> exists.
|
|
If it does not, reinstall <xref linkend="python2"/> (after
|
|
installing <xref linkend="openssl"/> - the latest version of any
|
|
<emphasis>currently maintained</emphasis> version of openssl should
|
|
be satisfactory if already installed - if that package has not already
|
|
been installed).
|
|
</para>
|
|
</note>
|
|
|
|
<bridgehead renderas="sect4">Optional</bridgehead>
|
|
<para role="optional">
|
|
<xref linkend="curl"/>,
|
|
<xref linkend="dbus-glib"/>,
|
|
<xref linkend="doxygen"/>,
|
|
<xref linkend="gst-plugins-base"/> (with
|
|
<xref linkend="gst-plugins-good"/> and
|
|
<xref linkend="gst-ffmpeg"/> at runtime), or
|
|
<xref linkend="gst10-plugins-base"/> (with
|
|
<xref linkend="gst10-plugins-good"/> and
|
|
<xref linkend="gst10-libav"/> at runtime),
|
|
<ulink url="http://hunspell.sourceforge.net/">Hunspell</ulink>,
|
|
<xref linkend="libnotify"/>,
|
|
<xref linkend="openjdk"/>,
|
|
<xref linkend="pulseaudio"/>,
|
|
<xref linkend="startup-notification"/>,
|
|
<xref linkend="wget"/>,
|
|
<xref linkend="wireless_tools"/> and
|
|
<xref linkend="xulrunner"/>
|
|
</para>
|
|
|
|
<para condition="html" role="usernotes">
|
|
User Notes: <ulink url="&blfs-wiki;/firefox"/>
|
|
</para>
|
|
</sect2>
|
|
|
|
<sect2 role="installation">
|
|
<title>Installation of Firefox</title>
|
|
|
|
<para>
|
|
There are two major methods for building
|
|
<application>Firefox</application>. In the standard case, the entire suite
|
|
of libraries is built and installed. In the other, most of the system is
|
|
built using the procedures found in <xref linkend="xulrunner"/>. This is
|
|
advantageous if you are planning to build other related packages such as
|
|
<xref linkend="icedtea-web"/>. With either build method, you need to run
|
|
the main build procedure below with the appropriate options in the
|
|
<filename>mozconfig</filename> file. Then use the appropriate install
|
|
instructions depending on the chosen build method.
|
|
</para>
|
|
|
|
<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 > mozconfig << "EOF"
|
|
# If you have a multicore machine, firefox will now use all the cores by
|
|
# default. Exceptionally, you can reduce the number of cores, e.g. to 1,
|
|
# by uncommenting the next line and setting a valid number of CPU cores.
|
|
#mk_add_options MOZ_MAKE_FLAGS="-j1"
|
|
|
|
# If you have installed DBus-Glib comment out this line:
|
|
ac_add_options --disable-dbus
|
|
|
|
# If you have installed dbus-glib, and you have installed (or will install)
|
|
# wireless-tools, and you wish to use geolocation web services, comment out
|
|
# this line
|
|
ac_add_options --disable-necko-wifi
|
|
|
|
# If you have installed libnotify comment out this line:
|
|
ac_add_options --disable-libnotify
|
|
|
|
# GStreamer is necessary for H.264 video playback in HTML5 Video Player;
|
|
# to be enabled, also remember to set "media.gstreamer.enabled" to "true"
|
|
# in about:config. If you have GStreamer 0.x.y, uncomment this line:
|
|
#ac_add_options --enable-gstreamer
|
|
# or uncomment this line, if you have GStreamer 1.x.y
|
|
#ac_add_options --enable-gstreamer=1.0
|
|
|
|
# Uncomment these lines if you have installed optional dependencies:
|
|
#ac_add_options --enable-system-hunspell
|
|
#ac_add_options --enable-startup-notification
|
|
|
|
# Comment out following option if you have PulseAudio installed
|
|
ac_add_options --disable-pulseaudio
|
|
|
|
# If you have not installed Yasm then uncomment this line:
|
|
#ac_add_options --disable-webm
|
|
|
|
# If you have installed xulrunner uncomment the next two ac_add_options lines
|
|
# and check that the sdk will be set by running pkg-config in a subshell
|
|
# and has not become hardcoded or empty when you created this file
|
|
#ac_add_options --with-system-libxul
|
|
#ac_add_options --with-libxul-sdk=$(pkg-config --variable=sdkdir libxul)
|
|
|
|
# Comment out following options if you have not installed
|
|
# recommended dependencies:
|
|
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
|
|
ac_add_options --with-system-icu
|
|
|
|
# The BLFS editors recommend not changing anything below this line:
|
|
ac_add_options --prefix=/usr
|
|
ac_add_options --enable-application=browser
|
|
|
|
ac_add_options --disable-crashreporter
|
|
ac_add_options --disable-updater
|
|
ac_add_options --disable-tests
|
|
|
|
ac_add_options --enable-optimize
|
|
ac_add_options --enable-strip
|
|
ac_add_options --enable-install-strip
|
|
|
|
ac_add_options --enable-gio
|
|
ac_add_options --enable-official-branding
|
|
ac_add_options --enable-safe-browsing
|
|
ac_add_options --enable-url-classifier
|
|
|
|
ac_add_options --enable-system-cairo
|
|
ac_add_options --enable-system-ffi
|
|
ac_add_options --enable-system-pixman
|
|
|
|
ac_add_options --with-pthreads
|
|
|
|
ac_add_options --with-system-bz2
|
|
ac_add_options --with-system-jpeg
|
|
ac_add_options --with-system-png
|
|
ac_add_options --with-system-zlib
|
|
|
|
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/firefox-build-dir
|
|
EOF</userinput></screen>
|
|
|
|
<para>
|
|
Compile <application>Firefox</application> by issuing the following
|
|
commands:
|
|
</para>
|
|
|
|
<note><para>
|
|
If you are compiling <application>Firefox</application> in chroot, prepend
|
|
<envar>SHELL=/bin/bash</envar> to the first make command below.
|
|
</para></note>
|
|
|
|
<screen><userinput>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>rm -rf /usr/lib/firefox-&firefox-version; &&
|
|
mkdir /usr/lib/firefox-&firefox-version; &&
|
|
|
|
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 &&
|
|
chown -R -v root:root /usr/lib/firefox-&firefox-version; &&
|
|
|
|
ln -sfv ../lib/firefox-&firefox-version;/firefox /usr/bin &&-->
|
|
<screen role="root"><userinput>make -f client.mk install INSTALL_SDK= &&
|
|
|
|
mkdir -pv /usr/lib/mozilla/plugins &&
|
|
ln -sfv ../mozilla/plugins /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 &&
|
|
ln -sfv ../lib/firefox-&firefox-version;/firefox /usr/bin &&
|
|
ln -sfv ../xulrunner-&firefox-version; /usr/lib/firefox-&firefox-version;/xulrunner &&
|
|
|
|
mkdir -pv /usr/lib/mozilla/plugins &&
|
|
ln -sfv ../mozilla/plugins /usr/lib/firefox-&firefox-version;</userinput></screen>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="commands">
|
|
<title>Command Explanations</title>
|
|
|
|
<para>
|
|
<command>ac_add_options --disable-necko-wifi</command>: If you remove
|
|
this command, you will enable opt-in support for geolocation web services
|
|
when you are using a wifi connection.
|
|
</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 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 <envar>PATH</envar>
|
|
variable.
|
|
</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
|
|
command creates a symbolic link to
|
|
<filename class="directory">/usr/lib/mozilla/plugins</filename>. It's not
|
|
really needed, as <application>Firefox</application> checks
|
|
<filename class="directory">/usr/lib/mozilla/plugins</filename> by
|
|
default, but the symbolic link is made 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>mkdir -pv /usr/share/applications &&
|
|
mkdir -pv /usr/share/pixmaps &&
|
|
|
|
cat > /usr/share/applications/firefox.desktop << "EOF" &&
|
|
<literal>[Desktop Entry]
|
|
Encoding=UTF-8
|
|
Name=Firefox Web Browser
|
|
Comment=Browse the World Wide Web
|
|
GenericName=Web Browser
|
|
Exec=firefox %u
|
|
Terminal=false
|
|
Type=Application
|
|
Icon=firefox
|
|
Categories=GNOME;GTK;Network;WebBrowser;
|
|
MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
|
|
StartupNotify=true</literal>
|
|
EOF
|
|
|
|
ln -sfv /usr/lib/firefox-&firefox-version;/browser/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 Directory</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 <application>GTK+ 2</application> internet browser that uses the
|
|
Mozilla Gecko rendering engine.
|
|
</para>
|
|
<indexterm zone="firefox firefox-prog">
|
|
<primary sortas="b-firefox">firefox</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</sect2>
|
|
|
|
</sect1>
|