Firefox sorgenti
Inviato: gio 28 ago 2008, 10:55
Salve a tutti.
Oggi ho deciso di compilare firefox da sorgenti giusto per adattarlo alla mia architettura perciò mi informo e metto a punto questo slackbuild:
Utilizzando come mozconfig
Però il risultato è un file di circa 100MB invece di 9MB. Qualcuno può darmi una mano?
Oggi ho deciso di compilare firefox da sorgenti giusto per adattarlo alla mia architettura perciò mi informo e metto a punto questo slackbuild:
Codice: Seleziona tutto
#!/bin/sh
# Root
(( $UID != 0 )) && echo "You must be root." && exit 1;
# Variabili della directory temporanea
CWD=`pwd`
if ["$TMP" = ""]; then
TMP=/tmp/tgz
fi
NAME=mozilla-firefox-it
VERSION=3.0.1
ARCH=x86
BUILD=1
PKG=$TMP/package-$NAME
# Sorgenti
SOURCE=ftp://ftp.mozilla.org/pub/firefox/releases/$VERSION/source/firefox-$VERSION-source.tar.bz2
if [ ! -e firefox-$VERSION-source.tar.bz2 ]; then
wget -c $SOURCE
fi
# Controllo directory temporanee
if [ ! -d $TMP ]; then
mkdir -p $TMP
fi
if [ ! -d $PKG ]; then
mkdir -p $PKG
fi
# Estrarre sorgenti
cd $TMP
tar xjvf $CWD/firefox-$VERSION-source.tar.bz2
cd mozilla
# Permessi
chown -R root:root
find . -perm 664 -exec chmod 644 {} \;
find . -perm 775 -exec chmod 755 {} \;
# Mozconfig
export MOZCONFIG=/home/vasco/Desktop/mozilla-firefox-it/mozconfig
# Compiliare
make -f client.mk checkout || exit
make -f client.mk distclean || exit
make -f client.mk build || exit
make install DESTDIR=$PKG
# Lanciatore
mkdir -p $PKG/usr/share/pixmaps
cat $CWD/firefox.png > $PKG/usr/share/pixmaps/firefox.png
# These files/directories are usually created if Firefox is run as root, which on many
# systems might (and possibly should) be never. Therefore, if we don't see them we'll
# put stubs in place to prevent startup errors.
( cd $PKG/usr/lib/firefox-$VERSION
if [ -d extensions/talkback\@mozilla.org ]; then
if [ ! -r extensions/talkback\@mozilla.org/chrome.manifest ]; then
echo > extensions/talkback\@mozilla.org/chrome.manifest
fi
fi
if [ ! -d updates ]; then
mkdir -p updates/0
fi
# Some icons aren't in the right place
mkdir -p chrome/icons/default
cp icons/{default,mozicon50}.xpm chrome/icons/default/
)
# Creare la directory ./install e copiare lo slack-desc e lo SlackBuild
mkdir -p $PKG/install
cat $CWD/$NAME.SlackBuild > $PKG/usr/doc/$NAME-$VERSION/$NAME.SlackBuild
cat $CWD/slack-desc > $PKG/install/slack-desc
# Costruire il pacchetto
makepkg -l y -c n $CWD/../$NAME-$VERSION-$ARCH-$BUILD.tgz
Codice: Seleziona tutto
# Firefox is browser
. $topsrcdir/browser/config/mozconfig
mk_add_options BUILD_OFFICIAL=1
mk_add_options MOZILLA_OFFICIAL=1
mk_add_options MOZ_CO_PROJECT=browser
ac_add_options --enable-application=browser
# Specify the installation prefix
ac_add_options --prefix=/usr
# Specified libraries
ac_add_options --with-system-zlib
# ac_add_options --with-system-png
ac_add_options --with-system-jpeg
# ac_add_options --enable-system-cairo
# Grafica
ac_add_options --enable-default-toolkit=cairo-gtk2 --disable-freetype2 --enable-xft
ac_add_options --enable-libxul
# This option causes the installed binaries to have the official
# Firefox name embedded in them.
ac_add_options --enable-official-branding
# This option specifies to include support for rendering the HTML
# <canvas></canvas> tag in the Firefox browser.
ac_add_options --enable-canvas
# This option is used so that the debugging symbols are removed from
# the installed binaries during the installation process. Comment out
# this option if you may have a need to retain the debugging symbols
# in the installed binaries. Note that this can substantially
# increase the size of the installed binaries.
ac_add_options --enable-strip
# This option is added so that test libraries and programs are not
# built. These would only be required for debugging purposes.
ac_add_options --disable-tests
# This option is added so that the Mozilla Installer program is not
# built or installed.
ac_add_options --disable-installer
# This option is used to disable the a11y support in the Firefox binaries
ac_add_options --disable-accessibility
# This option is used to enable support for rendering SVG files
ac_add_options --enable-svg
# Altro
ac_add_options --disable-shared
ac_add_options --prefix=/opt/mozilla
ac_add_options --with-default-mozilla-five-home=/opt/mozilla/lib/firefox3
ac_add_options --enable-crypto
ac_add_options --enable-single-profile
ac_add_options --disable-profilesharing
ac_add_options --disable-gnomevfs
ac_add_options --disable-debug
# Ottimizzazioni
ac_add_options --enable-optimize='-march=athlon -O2 -pipe -fomit-frame-pointer -msse3'
# Estensioni
ac_add_options --enable-extensions=default