Regole del forum
1) Citare in modo preciso il nome del pacchetto.
2) Specificare se discussione/suggerimento o richiesta d'aiuto.
3) Leggere attentamente le risposte ricevute
4) Scrivere i messaggi con il colore di default, evitare altri colori.
5) Scrivere in Italiano o in Inglese, se possibile grammaticalmente corretto, evitate stili di scrittura poco chiari, quindi nessuna abbreviazione tipo telegramma o scrittura stile SMS o CHAT.
6) Appena registrati è consigliato presentarsi nel forum dedicato.
La non osservanza delle regole porta a provvedimenti di vari tipo da parte dello staff, in particolare la non osservanza della regola 5 porta alla cancellazione del post e alla segnalazione dell'utente. In caso di recidività l'utente rischia il ban temporaneo.
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:
#!/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
# 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
Però il risultato è un file di circa 100MB invece di 9MB. Qualcuno può darmi una mano?
#!/bin/sh
# Heavily based on the Slackware 12.1 SlackBuild
# Slackware build script for Mozilla Firefox (www.mozilla.org)
# Copyright 2008 Corrado Franco (http://www.conraid.net)
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Based on slackbuild of Pat Volkerding and Daedra
# Exit on most errors
set -e
# Set variables:
CWD=$(pwd)
PRGNAME=${PRGNAME:-firefox}
VERSION=${VERSION:-3.0}
ARCH=${ARCH:-i686}
BUILD=${BUILD:-2}
TAG=${TAG:-cf}
TMP=${TMP:-/tmp/tgz}
PKG=$TMP/package-$PRGNAME
OUTPUT=$CWD
DOCS="$PKG/usr/doc/$PRGNAME-$VERSION"
# Insert document files in this variable
DOCFILES=""
# Set compiling FLAGS
SLKFLAGS="-O3 -march=pentium3 -freorder-blocks -fno-reorder-functions -msse -mmmx -mfpmath=sse -D_FORTIFY_SOURCE=2"
# Extract source and prepare:
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
if ! [ -d mozilla ]; then
tar xjvf $CWD/$PRGNAME-$VERSION-source.tar.bz2
fi
cd mozilla
# Make sure ownerships and permissions are sane:
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
# Configure:
# Fix a long standing bug that's prevented staying current on GTK+.
# Thanks to the BLFS folks. :-)
cat >> layout/build/Makefile.in << EOF
ifdef MOZ_ENABLE_CANVAS
EXTRA_DSO_LDOPTS += \$(XLDFLAGS) -lX11 -lXrender
endif
EOF
echo "ac_cv_visibility_pragma=no" > .mozconfig
export MOZILLA_OFFICIAL="1" &&
export BUILD_OFFICIAL="1" &&
export MOZ_PHOENIX="1" &&
./configure --prefix=/usr \
--enable-application=browser \
--enable-optimize="$SLKCFLAGS" \
--disable-debug \
--disable-tests \
--disable-installer \
--disable-accessibility \
--enable-official-branding \
--with-default-mozilla-five-home=/usr/lib/firefox-$VERSION \
--with-user-appdir=.firefox \
--libdir=/usr/lib \
--enable-static \
--enable-strip \
--disable-shared \
--disable-libxul \
--enable-default-toolkit=cairo-gtk2 \
--enable-system-cairo \
--with-system-zlib \
--with-system-jpeg \
--enable-xft \
--enable-jemalloc \
--enable-svg \
--enable-crypto \
--enable-extensions=default,xforms,schema-validation \
--with-pthreads \
# Build and install:
make
make install DESTDIR=$PKG
# Apply patch
( cd $PKG/usr/lib/firefox-$VERSION
zcat $CWD/mozilla-firefox-thunderbird.diff.gz | patch -p1 --verbose || exit 1
if [ ! $? = 0 ]; then
exit 1
fi
cd $PKG/usr/lib/firefox-$VERSION
zcat $CWD/firefox.moz_plugin_path.diff.gz | patch -p0 --verbose || exit 1
if [ ! $? = 0 ]; then
exit 1
fi
cd $PKG/usr/lib/firefox-$VERSION/defaults/pref
zcat $CWD/mozilla-firefox-ua.diff.gz | patch -p0 --verbose || exit 1
if [ ! $? = 0 ]; then
exit 1
fi
)
# Strip binaries:
( cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
)
# Compress and link manpages, if any:
if [ -d $PKG/usr/man ]; then
( cd $PKG/usr/man
find . -type f -exec gzip -9 {} \;
for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
)
fi
# Compress info files, if any:
if [ -d $PKG/usr/info ]; then
rm -f $PKG/usr/info/dir
gzip -9 $PKG/usr/info/*.info*
fi
# Add a documentation directory:
mkdir -p ${DOCS}
for i in ${DOCFILES}; do
if [ -e ${i} ]; then
if ! [ -L ${i} ]; then
cp -a ${i} ${DOCS}
else
cp -LRp ${i} ${DOCS}
fi
fi;
done
mkdir -p $PKG/usr/lib/mozilla/plugins
mkdir -p $PKG/usr/share/applications
cat $CWD/mozilla-firefox.desktop > $PKG/usr/share/applications/mozilla-firefox.desktop
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
# We make sure that the default icons are in the right place ;)
mkdir -p chrome/icons/default
#cp icons/default.xpm chrome/icons/default/default.xpm
cp icons/mozicon50.xpm chrome/icons/default/main-window.xpm
)
rm -rf $PKG/usr/lib/firefox-devel-3.0
# Add a slackbuild script:
cat $CWD/$PRGNAME.SlackBuild > $PKG/usr/doc/$PRGNAME-$VERSION/$PRGNAME.SlackBuild
# Add slack-desc and doinst.sh, if any
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
if [ -f $CWD/doinst.sh.gz ]; then
zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
else
if [ -f $CWD/doinst.sh ]; then
cat $CWD/doinst.sh > $PKG/install/doinst.sh
fi
fi
# Create slack-required file:
if [ -x /usr/bin/requiredbuilder ]; then
requiredbuilder -v -y -s $CWD $PKG
fi
# Create package:
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAME-$VERSION-$ARCH-$BUILD$TAG.tgz
# Clean file, if option is set:
if [ "$1" = "--cleanup" ]; then
rm -rf $TMP
fi
cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/l10n co l10n/it
e poi copi la directory, ma non saprei dirti dove, ma come ti ho detto mai fatto, e farlo in uno slackbuild ancora più complicato (anche se non impossibile)
Si tratta di scaricare un CVS nella dir giusta dopo che hai decompresso i sorgenti
configure: warning: Recreating autoconf.mk with updated nspr-config output
mozilla-firefox.SlackBuild: line 106: --enable-xft: command not found
prima con --enable-system-cairo, commento, poi --with-system-zlib, commento, poi --with-system-jpeg, commento e poi --enable-xft.
Insomma tutte le opzioni messe una dietro l'altro dopo cario.
Ad occhio sembra che ti sei scordato un \ dopo qualche opzione del configure
Se non lo metti lui non lo prendi come una stessa riga, e pensa a quelle opzioni del configure come dei comandi
checking for cairo >= 1.6.0 freetype2 fontconfig... Requested 'cairo >= 1.6.0' but version of cairo is 1.4.14
configure: error: Library requirements (cairo >= 1.6.0 freetype2 fontconfig) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.
checking for cairo >= 1.6.0 freetype2 fontconfig... Requested 'cairo >= 1.6.0' but version of cairo is 1.4.14
configure: error: Library requirements (cairo >= 1.6.0 freetype2 fontconfig) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.
Te l'ho detto che era uno slackbuild per il sistema dei font in firefox, hai bisogno di alcuni pacchetti aggiornati.
Cerca la discussione, se la trovo te la posto
Leggi tutta la discussione ed anche tutti i link che ci sono, così capisci sia come sono arrivato a quello slackbuild (che puoi e forse devi adattare alle tue esigenze) sia cosa serve a firefox per compilarsi