FirefoxBuildNotes

InveneoPuppyLinux | PackagesAdded

Firefox is built from source in order to have an optimised build for this low-memory environment.

Latest stable source: ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.5.0.1/source/firefox-1.5.0.1-source.tar.bz2

Build process:

(1) Boot Puppy with usr_devx.sfs to ensure that a development environment is available - either place on CD or with pup001

(2) Prepare source tree:

cd /mnt/home wget ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.5.0.1/source/firefox-1.5.0.1-source.tar.bz2 tar jxvf firefox-1.5.0.1-source.tar.bz2 cd mozilla
 * 1) Assuming you have a hard disk to compile on

(3) Customise a suitable .mozconfig:

See discussion: http://www.murga.org/%7Epuppy/viewtopic.php?t=2198

# mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-ff-@CONFIG_GUESS@ ac_add_options --enable-application=browser ac_add_options --with-default-mozilla-five-home=/usr/lib/firefox ac_add_options --enable-extensions=cookie,xmlextras,pref,universalchardet ac_add_options --enable-necko-small-buffers ac_add_options --disable-toolkit-qt ac_add_options --disable-toolkit-xlib ac_add_options --enable-toolkit-gtk ac_add_options --disable-toolkit-gtk2 ac_add_options --enable-default-toolkit=gtk ac_add_options --with-system-jpeg ac_add_options --with-system-zlib ac_add_options --with-system-png ac_add_options --disable-mailnews ac_add_options --disable-composer ac_add_options --disable-irc ac_add_options --disable-calendar ac_add_options --disable-ldap ac_add_options --disable-gnomevfs ac_add_options --disable-gnomeui ac_add_options --disable-installer ac_add_options --disable-updater ac_add_options --disable-tests ac_add_options --disable-freetype2 ac_add_options --disable-xprint ac_add_options --disable-jsd ac_add_options --disable-accessibility ac_add_options --disable-svg ac_add_options --disable-mathml ac_add_options --disable-logging ac_add_options --disable-profilesharing ac_add_options --enable-crypto ac_add_options --enable-single-profile ac_add_options --enable-optimize="-Os" ac_add_options --disable-debug ac_add_options --enable-strip
 * 1) See http://www.mozilla.org/build/ for build instructions.
 * 1) Options for 'configure' (same as command-line options).
 * 1) Use separate Object directory to keep build tree clean
 * 1) We're building firefox
 * 1) Extensions
 * 2) ac_add_options --enable-extensions=cookie,xml-rpc,xmlextras,pref,universalchardet
 * 1) Small system
 * 1) ac_add_options --disable-necko-disk-cache
 * 1) Use gtk1.2 toolkit
 * 1) Use system libs
 * 1) Disable
 * 1) We want Java plugin to work
 * 2) ac_add_options --disable-oji
 * 1) Enable
 * 1) Compile options

(4) Compile: LD_LIBRARY_PATH=/lib:/usr/lib:/usr/X11R6/lib export LD_LIBRARY_PATH gmake -f client.mk build gmake -C obj-ff-i686-pc-linux-gnu/browser/installer

Installation:

cd /usr/lib tar zxvf /mnt/home/mozilla/obj-ff-i686-pc-linux-gnu/dist/firefox-1.5.0.1.en-US.linux-i686-gtk1.tar.gz cp mozstart /usr/lib/firefox chmod +x /usr/lib/firefox/mozstart ln -sf /usr/lib/firefox/mozstart /usr/local/bin/mozstart

mozstart: COMTAIL="$@" URLPREFIX="`echo "$COMTAIL" | grep --extended-regexp "http://|ftp://|https://|file://|-mail|-edit|-addressbook|-calendar|-remote"`" if [ "$URLPREFIX" = "" ];then [ "$COMTAIL" = "" ] || COMTAIL="file://${COMTAIL}" fi ps | grep "firefox\-bin" > /dev/null 2>&1 if [ $? -eq 0 ];then #=0 if found. exec /usr/lib/firefox/firefox-bin -a firefox -remote "openURL($COMTAIL,new-tab)" else exec /usr/lib/firefox/firefox-bin $COMTAIL fi
 * 1) !/bin/sh
 * 1) We don't want more than one instance running.

Packaging for Puppy:

DotPup used instead of PupGet since both neither can use script-based functionality with PCCC & DotPups are more easily added to a live system (can simply double-click in ROX)

dotpup.sh: tar -xzpvP --no-same-owner -f firefox-1.5.0.1.tar.gz ln -sf /usr/lib/mozilla/plugins/libflashplayer.so /usr/lib/firefox/plugins/libflashplayer.so ln -sf /usr/lib/mozilla/plugins/flashplayer.xpt /usr/lib/firefox/plugins/flashplayer.xpt ln -sf /usr/lib/firefox/firefox /usr/local/bin/firefox echo "/usr/lib/firefox" >> /etc/ld.so.conf ldconfig ln -sf /usr/lib/firefox/mozstart /usr/local/bin/mozstart echo '"firefox-1.5.0.1" "firefox-1.5.0.1" on "GTK1APPS 7.3M" \' >> /root/.packages/alienpackages.txt echo "firefox-1.5.0.1" > /root/.packages/firefox-1.5.0.1.keyword mv /tmp/firefox-1.5.0.1.files /root/.packages/firefox-1.5.0.1.files /usr/sbin/fixmenus /root  +Firefox exit 0
 * 1) !/bin/bash
 * 1) unzip the files using absolute paths
 * 1) post-unzip tasks
 * 1) Set as default Browser
 * 1) Register with PupGet as an alien package
 * 1) Register with menus

tar cvfP firefox-1.5.0.1.tar /usr/lib/firefox find /usr/lib/firefox > /tmp/firefox-1.5.0.1.files find /tmp/firefox-1.5.0.1.files >> /tmp/firefox-1.5.0.1.files tar rvfP firefox-1.5.0.1.tar /tmp/firefox-1.5.0.1.files gzip -9 firefox-1.5.0.1.tar md5sum dotpup.sh > md5sum.txt md5sum firefox-1.5.0.1.tar.gz >> md5sum.txt zip -r -9 firefox-1.5.0.1.pup dotpup.sh md5sum.txt firefox-1.5.0.1.tar.gz

Install package:

dotpuprox.sh firefox-1.5.0.1.pup