#!/bin/sh # test we are root if [ "$USER" != "root" ] ; then echo "Run as root please, exiting." exit 1 fi # build depends not used see config below su -c 'tce-load -wl alsa-dev autoconf compiletc graphics-libs-1-dev.tcz gtk2-dev libIDL mtpaint-cli \ perl5 python submitqc4 sqlite3 sqlite3-dev yasm yasm-dev zip-unzip ' tc su -c 'tce-load -i alsa-dev autoconf compiletc graphics-libs-1-dev.tcz gtk2-dev libIDL mtpaint-cli \ perl5 python submitqc4 sqlite3 sqlite3-dev yasm yasm-dev zip-unzip ' tc F=firefox-21.0 M=minefield21 SRC=mozilla-release HERE=`pwd` T=/tmp/minefield21/usr/local/$M # get the icon to replace the branded firefox icon and the nightly icon su -c '/usr/local/bin/wget -nc http://www-archive.mozilla.org/projects/minefield/minefield-icon.png \ -O '$HERE'/minefield-src.png ' tc LIST="default16.png default32.png default48.png minefield.png" for Z in $LIST do cp minefield-src.png $Z done mtpaint-cli -scaleh 16 -scalew 16 default16.png mtpaint-cli -scaleh 32 -scalew 32 default32.png mtpaint-cli -scaleh 48 -scalew 48 default48.png mtpaint-cli -scaleh 48 -scalew 48 minefield.png su -c '/usr/local/bin/wget -nc ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/latest/source/firefox-21.0.source.tar.bz2 \ -O '$HERE'/firefox-21.0.source.tar.bz2' tc tar xjf fire*bz2 cd $SRC echo "mk_add_options MOZ_MAKE_FLAGS="-j3" mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../minefield ac_add_options --build=i486 ac_add_options --srcdir=$HERE/mozilla-release ac_add_options --prefix=/usr/local/minefield21 ac_add_options --bindir=/usr/local/minefield21 ac_add_options --libdir=/usr/local/minefield21 ac_add_options --includedir=/usr/local/minefield21/include ac_add_options --datadir=/usr/local/minefield21 ac_add_options --disable-accessibility ac_add_options --disable-crashreporter ac_add_options --disable-dbus ac_add_options --disable-debug-symbols ac_add_options --disable-debug ac_add_options --disable-libnotify ac_add_options --disable-necko-wifi ac_add_options --disable-official-branding ac_add_options --disable-tests ac_add_options --disable-updater ac_add_options --enable-application=browser ac_add_options --enable-safe-browsing ac_add_options --enable-strip " > .mozconfig unset CPPFLAGS swapon -a make -f client.mk build make -f client.mk DESTDIR=/tmp/minefield21 install # delete heaps ########### cd /tmp ########## rm -rf $T/firefox-dev* rm -rf $T/idl rm -rf $T/include rm -rf $T/firefox mkdir -p $M/usr/local/tce.installed echo "#!/bin/sh if [ -f /usr/local/bin/firefox ] ; then rm -rf /usr/local/bin/firefox ln -s /tmp/tcloop/minefield21/usr/local/minefield21/firefox-21.0/firefox /usr/local/bin/ else ln -s /tmp/tcloop/minefield21/usr/local/minefield21/firefox-21.0/firefox /usr/local/bin/ fi " > $M/usr/local/tce.installed/minefield21 chown -R root:staff $M/usr/local/tce.installed chmod -R 775 $M/usr/local/tce.installed mkdir -p $M/usr/local/share/pixmaps ######### cd $HERE ######### cp minefield.png /tmp/$M/usr/local/share/pixmaps/ cp -f default* /tmp/$M/usr/local/$M/$F/browser/chrome/icons/default/ cp -f minefield-src.png /tmp/$M/usr/local/$M/$F/browser/icons/mozicon128.png ####### cd /tmp ####### mkdir -p $M/usr/local/share/applications echo "[Desktop Entry] Name=minefield21 Exec=/usr/local/minefield21/firefox-21.0/firefox Terminal=False Comment= web browser based on Mozilla technology StartupNotify=True Type=Application Categories=Application;Network; Icon=minefield.png X-FullPathIcon=/usr/local/share/pixmaps/minefield.png " > $M/usr/local/share/applications/minefield21.desktop # fix up run-mozilla.sh sed -i '/export MOZILLA_FIVE_HOME LD_LIBRARY_PATH/i\ export MOZ_PLUGIN_PATH=~/.mozilla/plugins:${MRE_HOME}/plugins:/usr/local/lib/mozilla/plugins:${MOZ_PLUGIN_PATH} ' minefield21/usr/local/minefield21/firefox-21.0/run-mozilla.sh # squash mksquashfs $M $M.tcz md5sum $M.tcz > $M.tcz.md5.txt cd $M find usr -not -type d > $M.tcz.list mv $M.tcz.list /tmp # finish off cd /tmp echo "gtk2.tcz libasound.tcz " > minefield21.tcz.dep submitqc4