# HG changeset patch # User Dominique Corbex # Date 1362841068 -3600 # Node ID d695cc826ef17f2ff033152c87393e199e5efd99 # Parent fba163536f84ee502388a713c868e62c0b37d5f3 firefox: update bdeps diff -r fba163536f84 -r d695cc826ef1 firefox/receipt --- a/firefox/receipt Fri Mar 08 12:38:28 2013 +0100 +++ b/firefox/receipt Sat Mar 09 15:57:48 2013 +0100 @@ -1,157 +1,120 @@ # SliTaz package receipt. PACKAGE="firefox" -VERSION="17.0.3esr" +VERSION="10.0.2" CATEGORY="network" SHORT_DESC="User friendly, secure and fast web browser." MAINTAINER="pankso@slitaz.org" TARBALL="$PACKAGE-$VERSION.source.tar.bz2" WEB_SITE="http://www.mozilla.org/" +#WGET_URL="http://releases.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/source/$TARBALL" WGET_URL="ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/source/$TARBALL" CONFIG_FILES="/etc/firefox" TAGS="browser" DEPENDS="gtk+ sqlite dbus dbus-glib glib jpeg xorg-libX11 xorg-libXdamage \ -alsa-lib xorg-libXt libevent libvpx pango nspr sqlite mozilla-common \ -gstreamer gst-plugins-base" +alsa-lib xorg-libXt libfirefox libevent libvpx" BUILD_DEPENDS="zip libIDL coreutils findutils wireless_tools-dev \ perl python yasm alsa-lib-dev mesa-dev libevent-dev libvpx-dev dbus-dev \ -dbus-glib-dev gtk+-dev glib-dev pango-dev nspr-dev sqlite-dev tar gzip \ -gstreamer-dev gst-plugins-base-dev" +dbus-glib-dev gtk+-dev glib-dev" # Rules to configure and make the package. # # A long compile time... dont forget to build libidl before and check the # .mozconfig file from the stuff and the stuff/README document. # -# WARNING: 1GB RAM minimum. Additional RAM will significantly decrease -# build time. -# At least 600 MB free disk space (1 GB recommended) - - compile_rules() { + cp -a $stuff/firefox.mozconfig $src/.mozconfig cd $src - # load mozconfig - cp -a $stuff/mozconfig $src + patch -Np1 -i $stuff/mozilla-firefox-1.0-lang.patch + patch -Np1 -i $stuff/firefox-install-dir.patch - # build firefox and create a firefox tarball - make -f client.mk && - make -C obj-firefox/browser/installer + # Fix PRE_RELEASE_SUFFIX + sed -i '/^PRE_RELEASE_SUFFIX := ""/s/ ""//' \ + browser/base/Makefile.in - # install - # locate tarball - local tarball tarpath fn1 fn2 - tarpath=$src/obj-firefox/dist - fn1="$tarpath/firefox-${VERSION%esr}.en-US.linux-$ARCH.tar.bz2" - fn2="$tarpath/firefox-${VERSION%esr}.en-US.linux-$(uname -m).tar.bz2" - [ -e "$fn1" ] && tarball="$fn1" && echo "$ARCH tarball found" - [ -e "$fn2" ] && tarball="$fn2" && echo "$(uname -m) tarball found" - [ -z "$tarball" ] && echo "ERROR: tarball not found" && exit 1 - # extract tarball - mkdir -p $install/usr/lib/firefox-$VERSION && - tar -xvf $tarball -C $install/usr/lib/firefox-$VERSION \ - --strip-components=1 && - chown -R -v root:root $install/usr/lib/firefox-$VERSION && - chmod -v 755 $install/usr/lib/firefox-$VERSION/libxpcom.so && - # install symlink in /usr/bin - mkdir -p $install/usr/bin && - ln -sfv ../lib/firefox-$VERSION/firefox $install/usr/bin && - # install symlink for plugins - mkdir -p $install/usr/lib/mozilla/plugins && - ln -sfv ../mozilla/plugins $install/usr/lib/firefox-$VERSION + # Don't generate startup cache. Unbreaks build + sed -i 's/^GENERATE_CACHE ?=.*/GENERATE_CACHE = true/' \ + toolkit/mozapps/installer/packager.mk + ./configure $CONFIGURE_ARGS && + make $MAKEFLAGS && + make DESTDIR=$DESTDIR install && + cp -a xpcom/typelib $DESTDIR } # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { - # program - printf "Installing program.." - mkdir -p $fs/usr/lib && - cp -a $install/usr/lib/$PACKAGE-$VERSION $fs/usr/lib && - cp -a $install/usr/lib/mozilla $fs/usr/lib && + mkdir -p $fs/usr/lib/$PACKAGE \ + $fs/usr/share $fs/etc/$PACKAGE/profile/chrome cp -a $install/usr/bin $fs/usr - status + cp -a $install/usr/lib/$PACKAGE $fs/usr/lib - # search Plugin (by: oddball) - printf "Installing SliTaz search plugins.." - cp -a $stuff/searchplugins $fs/usr/lib/$PACKAGE-$VERSION - status + # Home page, bookmarks file and branding. + cp -a $stuff/browserconfig.properties $fs/etc/$PACKAGE + cp -a $stuff/bookmarks.html \ + $fs/etc/$PACKAGE/profile + mkdir -p $fs/etc/$PACKAGE/pref + cp -a $stuff/firefox-branding.js \ + $fs/etc/$PACKAGE/pref/firefox.js - # prefs - printf "Installing SliTaz preferences.." - mkdir -p $fs/usr/lib/$PACKAGE-$VERSION/distribution && - cp -a $stuff/distribution.ini $fs/usr/lib/$PACKAGE-$VERSION/distribution - status + # User preference. + cp -a $stuff/prefs.js $fs/etc/$PACKAGE/profile + cp -a $stuff/userChrome.css \ + $fs/etc/$PACKAGE/profile/chrome - # mozilla-common files - # dictionaries - printf "Installing common dictionnaries.." - rm -rf $fs/usr/lib/$PACKAGE-$VERSION/dictionaries && - ln -sf ../mozilla-common-$VERSION/dictionaries \ - $fs/usr/lib/$PACKAGE-$VERSION/dictionaries - status - # plugin-container - printf "Installing common plugin-container" - rm -f $fs/usr/lib/$PACKAGE-$VERSION/plugin-container && - ln -sf ../mozilla-common-$VERSION/plugin-container \ - $fs/usr/lib/$PACKAGE-$VERSION/plugin-container - status - # mozilla-xremote-client - printf "Installing common mozilla-xremote-client" - rm -f $fs/usr/lib/$PACKAGE-$VERSION/mozilla-xremote-client && - ln -sf ../mozilla-common-$VERSION/mozilla-xremote-client \ - $fs/usr/lib/$PACKAGE-$VERSION/mozilla-xremote-client - status - # components/libdbusservice.so - # components/libmozgnome.so - for file in libdbusservice.so libmozgnome.so; do - printf "Installing common components/$file" - rm -f $fs/usr/lib/$PACKAGE-$VERSION/components/$file && - ln -sf ../../mozilla-common-$VERSION/components/$file \ - $fs/usr/lib/$PACKAGE-$VERSION/components/$file - status - done - # chrome.manifest - printf "Installing common chrome.manifest" - rm -f $fs/usr/lib/$PACKAGE-$VERSION/chrome.manifest && - ln -sf ../mozilla-common-$VERSION/chrome.manifest \ - $fs/usr/lib/$PACKAGE-$VERSION/chrome.manifest - status + # added firefox-l10n.js to stuff to make sure its copyed for langpacks + cp -a $stuff/firefox-l10n.js \ + $fs/etc/$PACKAGE/pref/firefox-l10n.js - # run-mozilla.sh - printf "Installing common run-mozilla.sh" - rm -f $fs/usr/lib/$PACKAGE-$VERSION/run-mozilla.sh && - ln -sf ../mozilla-common-$VERSION/run-mozilla.sh \ - $fs/usr/lib/$PACKAGE-$VERSION/run-mozilla.sh - status + rm -rf $fs/usr/lib/$PACKAGE/defaults - # libmozalloc.so - printf "Installing common libmozalloc.so" - rm -f $fs/usr/lib/$PACKAGE-$VERSION/libmozalloc.so && - ln -sf ../mozilla-common-$VERSION/libmozalloc.so \ - $fs/usr/lib/$PACKAGE-$VERSION/libmozalloc.so - status + ln -sf /etc/$PACKAGE/browserconfig.properties $fs/usr/lib/$PACKAGE + ln -sf /etc/$PACKAGE $fs/usr/lib/$PACKAGE/defaults + # EULA is accepted by SliTaz project. + sed -i s:'pref("browser.EULA.3.accepted", false);':'pref("browser.EULA.3.accepted", true);': \ + $fs/etc/firefox/pref/firefox.js + + # Search Plugin (by: oddball) + cp -a $stuff/searchplugins $fs/usr/lib/firefox/ chown -R root.root $fs + + # Remove unnecessary files. + rm -rf $fs/usr/lib/$PACKAGE/dictionaries/* + rm -rf $fs/usr/lib/$PACKAGE/icons + # split firefox libs + rm -rf $fs/usr/lib/$PACKAGE/*.so + #retain big firefox libs + cp -a $install/usr/lib/$PACKAGE/libxul.so \ + $fs/usr/lib/$PACKAGE + #workaround for now + #https://bugzilla.mozilla.org/show_bug.cgi?id=658850 + ln -sf firefox $fs/usr/lib/$PACKAGE/firefox-bin } # Pre - Post install command to set default locale. pre_install() { - local root="$1" - # backup plugins + local root + root=$1 + # Get old plugins mkdir /tmp/firefox-plugins-$$ cp -a $root/usr/lib/firefox/plugins/* /tmp/firefox-plugins-$$ 2> /dev/null - # remove old libs and configs + # Remove old libs and configs rm -rf $root/usr/lib/firefox/plugins rm -rf $root/usr/lib/firefox/dictionaries + rm -rf $root/etc/firefox } - post_install() { - local root="$1" - # restore plugins + local root + root=$1 + if grep -q "fr_*" $root/etc/locale.conf 2>/dev/null; then + sed -i 's/en-US/fr/' \ + $root/etc/firefox/pref/firefox-l10n.js + fi for i in /tmp/firefox-plugins-$$/* ; do [ -e $i ] || continue [ -e /usr/lib/firefox/plugins/$(basename $i) ] && continue