Browse Source

firefox:
- update to 4.0
- BR: libjpeg-turbo-devel >= 1.1.0
- BR: nspr-devel >= 4.8.7
- BR: nss-devel >= 3.12.9
- BR: cairo-devel >= 1.10.2-2
- use langpacks.xpi instead of l10n source
- update firefox startup script
- add unofficial branding logos to svn repository



git-svn-id: http://trac.vinelinux.org/repos/projects/specs@3236 ec354946-7b23-47d6-9f5a-488ba84defc7

daisuke 13 years ago
parent
commit
07e9ed5030

+ 66 - 0
f/firefox/firefox-4.0-vine.patch

@@ -0,0 +1,66 @@
+diff -up mozilla-2.0/browser/app/profile/firefox.js.orig mozilla-2.0/browser/app/profile/firefox.js
+--- mozilla-2.0/browser/app/profile/firefox.js.orig	2011-03-19 08:33:32.000000000 +0900
++++ mozilla-2.0/browser/app/profile/firefox.js	2011-03-29 23:12:00.000000000 +0900
+@@ -507,6 +507,9 @@ pref("browser.gesture.twist.right", "");
+ pref("browser.gesture.twist.left", "");
+ pref("browser.gesture.tap", "cmd_fullZoomReset");
+ 
++// Use LANG environment variable to choose locale
++pref("intl.locale.matchOS", true);
++
+ // 0=lines, 1=pages, 2=history , 3=text size
+ #ifdef XP_MACOSX
+ // On OS X, if the wheel has one axis only, shift+wheel comes through as a
+@@ -628,7 +631,7 @@ pref("browser.backspace_action", 0);
+ // 0 = spellcheck nothing
+ // 1 = check multi-line controls [default]
+ // 2 = check multi/single line controls
+-pref("layout.spellcheckDefault", 1);
++pref("layout.spellcheckDefault", 0);
+ 
+ pref("browser.send_pings", false);
+ 
+diff -up mozilla-2.0/browser/base/content/browser.xul.orig mozilla-2.0/browser/base/content/browser.xul
+--- mozilla-2.0/browser/base/content/browser.xul.orig	2011-03-19 08:33:32.000000000 +0900
++++ mozilla-2.0/browser/base/content/browser.xul	2011-03-29 23:12:00.000000000 +0900
+@@ -88,7 +88,7 @@
+         lightweightthemes="true"
+         lightweightthemesfooter="browser-bottombox"
+         windowtype="navigator:browser"
+-        screenX="4" screenY="4"
++        screenX="4" screenY="4" width="1000" height="9999"
+         browsingmode="normal"
+         persist="screenX screenY width height sizemode">
+ 
+diff -up mozilla-2.0/browser/branding/unofficial/locales/browserconfig.properties.orig mozilla-2.0/browser/branding/unofficial/locales/browserconfig.properties
+--- mozilla-2.0/browser/branding/unofficial/locales/browserconfig.properties.orig	2011-03-19 08:33:32.000000000 +0900
++++ mozilla-2.0/browser/branding/unofficial/locales/browserconfig.properties	2011-03-29 23:47:29.000000000 +0900
+@@ -1,2 +1,2 @@
+ # Do NOT localize or otherwise change these values
+-browser.startup.homepage=about:home
++browser.startup.homepage=http://vinelinux.org/
+diff -up mozilla-2.0/browser/branding/unofficial/pref/firefox-branding.js.orig mozilla-2.0/browser/branding/unofficial/pref/firefox-branding.js
+--- mozilla-2.0/browser/branding/unofficial/pref/firefox-branding.js.orig	2011-03-19 08:33:32.000000000 +0900
++++ mozilla-2.0/browser/branding/unofficial/pref/firefox-branding.js	2011-03-29 23:45:59.000000000 +0900
+@@ -1,6 +1,6 @@
+-pref("startup.homepage_override_url","http://www.mozilla.org/projects/%APP%/%VERSION%/whatsnew/");
+-pref("startup.homepage_welcome_url","http://www.mozilla.org/projects/%APP%/%VERSION%/firstrun/");
+-pref("browser.panorama.welcome_url", "http://www.mozilla.com/firefox/panorama/");
++pref("startup.homepage_override_url","http://vinelinux.org/");
++pref("startup.homepage_welcome_url","http://vinelinux.org/");
++pref("browser.panorama.welcome_url", "http://vinelinux.org/");
+ // The time interval between checks for a new version (in seconds)
+ // nightly=8 hours, official=24 hours
+ pref("app.update.interval", 28800);
+diff -up mozilla-2.0/modules/libpref/src/init/all.js.orig mozilla-2.0/modules/libpref/src/init/all.js
+--- mozilla-2.0/modules/libpref/src/init/all.js.orig	2011-03-19 08:34:02.000000000 +0900
++++ mozilla-2.0/modules/libpref/src/init/all.js	2011-03-29 23:12:00.000000000 +0900
+@@ -2802,7 +2802,7 @@ pref("font.size.fixed.x-tibt", 13);
+ 
+ /* PostScript print module prefs */
+ // pref("print.postscript.enabled",      true);
+-pref("print.postscript.paper_size",    "letter");
++pref("print.postscript.paper_size",    "a4");
+ pref("print.postscript.orientation",   "portrait");
+ pref("print.postscript.print_command", "lpr ${MOZ_PRINTER_NAME:+-P\"$MOZ_PRINTER_NAME\"}");
+ 

+ 4 - 0
f/firefox/firefox-vine-default-prefs.js

@@ -1,9 +1,13 @@
 // Vine Linux default settings
+pref("app.update.auto", false);
 pref("app.update.enabled", false);
 pref("app.update.autoInstallEnabled", false);
+pref("browser.backspace_action",            2);
 pref("browser.display.use_system_colors",   true);
+pref("browser.download.folderList",         1);
 pref("browser.link.open_external",          3);
 pref("general.smoothScroll",                true);
+pref("browser.shell.checkDefaultBrowser",   false);
 pref("general.useragent.vendor", "Vine");
 pref("general.useragent.vendorSub", "FIREFOX_RPM_VR");
 pref("font.default", "sans-serif");

+ 121 - 71
f/firefox/firefox-vl.spec

@@ -1,10 +1,15 @@
 ## do not include minor version number in MOZILLA_FIVE_HOME
-%global ffmajor 3.6
-%global geckomajor 1.9.2
-%global ffminor 15
-%global ffversion %{ffmajor}.%{ffminor}
+%global ffmajor 4.0
+%global geckomajor 2.0
+##global ffminor 
+##global ffversion %{ffmajor}.%{ffminor}
+%global ffversion %{ffmajor}
 %define ffdir %{_libdir}/firefox-%{ffmajor}
-%define tarballdir mozilla-1.9.2
+%global langpackdir %{ffdir}/langpacks
+%define tarballdir mozilla-2.0
+
+%define firefox_app_id \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}
+%define homepage http://vinelinux.org/
 
 %define build_vine6 0
 %define build_vine5 0
@@ -21,14 +26,17 @@
 %define ffrelease 1%{?_dist_release}
 
 %define desktop_file_utils_version 0.6
-%define nspr_version 3.8.6
-%define nss_version 3.12.3
-%define gecko_version %{geckomajor}.%{ffminor}
+%define nspr_version 4.8.7
+%define nss_version 3.12.9
+%define cairo_version 1.10.2-2
+%define libjpeg-turbo_version 1.1.0
+##define gecko_version %{geckomajor}.%{ffminor}
+%define gecko_version %{geckomajor}
 
 ExclusiveArch: i386 i586 i686 x86_64 ia64 ppc s390 s390x
 
-Summary:        Fx3.6 for Vine Linux
-Summary(ja):	Fx3.6 for Vine Linux
+Summary:        Fx4 for Vine Linux
+Summary(ja):	Fx4 for Vine Linux
 Name:           firefox
 Version:        %{ffversion}
 Release:        %{ffrelease}
@@ -37,33 +45,32 @@ License:        MPL/LGPL
 Group:          Applications/Internet
 Source0:        firefox-%{version}.source.tar.bz2
 
-Source220:       mozconfig-firefox36-vine5
-Source230:       mozconfig-firefox36-vine6
+Source220:       mozconfig-firefox4-vine5
+Source230:       mozconfig-firefox4-vine6
 
 Source11:       firefox-vine-default-bookmarks.html
 Source12:       firefox-vine-default-prefs.js
 Source21:       firefox.vine.sh.in
 Source22:       firefox.png
-Source23:       fx36-about.png
+Source23:       fx-about.png
+Source24:       fx-about-wordmark.png
 Source25:       firefox.desktop
 Source26:       firefox-safe-mode.desktop
 Source30:       firefox.1
 Source50:       firefox-xremote-client.sh.in
-Source55:       firefox-rebuild-databases.pl.vine.in
 Source100:      find-external-requires
 
 # locale sources
 %define MOZ_BUILD_LOCALES "ja"
-Source1000:     firefox-%{ffversion}-ja.tar.bz2
-Source1010:     firefox-3.6-unofficial-branding-fx.tar.bz2
-
+Source1000:     firefox-%{ffversion}-langpacks.tar.bz2
+Source1010:     firefox-unofficial-branding-fx4.tar.bz2
 #
-Source2000:     firefox-searchplugins-3.0-ja.tar.bz2
+Source2000:     firefox-searchplugins-4.0-ja.tar.bz2
 
 # upstream patch
 
 # build patches
-Patch1:         firefox-2.0-link-layout.patch
+Patch0:		firefox-version.patch
 
 # customization patches
 Patch26:	firefox-1.5-default-a4-paper.patch
@@ -73,7 +80,7 @@ Patch26:	firefox-1.5-default-a4-paper.patch
 Patch1000:      firefox-3.6.2-sjisalias.patch
 
 # vine customization patch
-Patch2000:      firefox-3.6-vine.patch
+Patch2000:      firefox-4.0-vine.patch
 
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
@@ -87,6 +94,8 @@ BuildRequires:	libgnome-devel
 BuildRequires:  pango-devel
 %if %{build_vine6}
 BuildRequires:  libnotify-devel
+BuildRequires:  cairo-devel >= %{cairo_version}
+BuildRequires:  libjpeg-turbo-devel >= %{libjpeg-turbo_version}
 %endif
 %if %{build_vine5}
 BuildRequires:  nspr-devel >= %{nspr_version}
@@ -121,11 +130,13 @@ This is unofficial build of firefox browser.
 #---------------------------------------------------------------------
 
 %prep
-%setup -q -n %{name}-%{version} -c -b 1000 -b 1010
+%setup -q -n %{name}-%{version} -c
 cd %{tarballdir}
 
-%patch1 -p1 -b .link-layout
-
+sed -e 's/__RPM_VERSION_INTERNAL__/%{ffmajor}/' \
+    %{P:%%PATCH0} > version.patch
+%{__patch} -p1 -b --suffix .version < version.patch
+    
 %patch26 -p1
 
 #
@@ -144,12 +155,13 @@ echo "ac_add_options --with-libxul-sdk=`pkg-config --variable=sdkdir libxul`" >>
 %endif
 
 # update searchplugins
-%{__tar} xjvf %{SOURCE2000} -C ../l10n/ja/browser/
+%{__tar} xjvf %{SOURCE2000} -C browser/locales/en-US/
 
 # setup unofficial branding logos
+%{__tar} xjvf %{SOURCE1010}
 %{__cp} %{SOURCE23} browser/branding/unofficial/content/about.png
-#%{__cp} browser/branding/unofficial/content/*.png browser/base/branding/
-%{__cp} ../l10n/ja/browser/branding/unofficial/brand.* browser/branding/unofficial/locales/en-US/
+%{__cp} %{SOURCE24} browser/branding/unofficial/content/about-wordmark.png
+%{__cp} browser/branding/unofficial/locales/en-US/brand.* browser/branding/nightly/locales/en-US/
 
 
 #---------------------------------------------------------------------
@@ -163,7 +175,6 @@ MOZ_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | %__sed -e 's/-Wall//')
 export RPM_OPT_FLAGS=$MOZ_OPT_FLAGS
 export MOZILLA_OFFICIAL=1
 export BUILD_OFFICIAL=1
-#export MOZ_APP_DISPLAYNAME="Firefox Community Edition"
 export MOZ_APP_DISPLAYNAME="Fx for Vine Linux"
 
 %ifarch ppc ppc64 s390 s390x
@@ -181,14 +192,14 @@ export MAKE="gmake %{moz_mflags}"
 %__make -f client.mk build
 
 # build locales
-LOCALEDIRS=`find . -print | grep 'locales/Makefile$' | \
-            sed -e 's|\./\(.*\)/locales/.*|\1|g'`
-for dir in $LOCALEDIRS
-do
-  for lang in %{MOZ_BUILD_LOCALES} ; do
-    make -C $dir/locales AB_CD=$lang
-  done
-done
+#LOCALEDIRS=`find . -print | grep 'locales/Makefile$' | \
+#            sed -e 's|\./\(.*\)/locales/.*|\1|g'`
+#for dir in $LOCALEDIRS
+#do
+#  for lang in %{MOZ_BUILD_LOCALES} ; do
+#    make -C $dir/locales AB_CD=$lang
+#  done
+#done
 
 #---------------------------------------------------------------------
 
@@ -196,10 +207,25 @@ done
 cd %{tarballdir}
 %{__rm} -rf $RPM_BUILD_ROOT
 
-#cd xpinstall/packager/
-#%{__make} MOZILLA_BIN="\$(DIST)/bin/firefox-bin" STRIP=/bin/true
-#cd -
+# set up our prefs and add it to the package manifest file, so it gets pulled in
+# to omni.jar which gets created during make install
+%{__cat} %{SOURCE12} | sed -e 's,FIREFOX_RPM_VR,%{version}-%{release},g' > dist/bin/defaults/preferences/all-vine.js
+# This sed call "replaces" firefox.js with all-vine.js, newline, and itself (&)
+# having the net effect of prepending all-vine.js above firefox.js
+%{__sed} -i -e\
+    's|@BINPATH@/@PREF_DIR@/firefox.js|@BINPATH@/@PREF_DIR@/all-vine.js\n&|' \
+    browser/installer/package-manifest.in
+	
+# set up our default bookmarks
+%{__install} -p -D -m 664 %{SOURCE11} $RPM_BUILD_ROOT%{ffdir}/defaults/profile/US/bookmarks.html
+%{__install} -p -D -m 664 %{SOURCE11} $RPM_BUILD_ROOT%{ffdir}/defaults/profile/bookmarks.html
+
+# Make sure locale works for langpacks
+%{__cat} > dist/bin/defaults/preferences/firefox-l10n.js << EOF
+pref("general.useragent.locale", "chrome://global/locale/intl.properties");
+EOF
 
+export MOZ_APP_DISPLAYNAME="Fx for Vine Linux"
 %{__make} install DESTDIR=$RPM_BUILD_ROOT
 
 %{__mkdir_p} $RPM_BUILD_ROOT{%{_libdir},%{_bindir},%{_datadir}/applications}
@@ -221,28 +247,25 @@ do
 done
 
 # set up the firefox start script
+#%{__rm} -rf $RPM_BUILD_ROOT%{_bindir}/firefox
+#%{__cat} %{SOURCE21} | %{__sed} -e 's,FIREFOX_VERSION,%{ffmajor},g' > \
+#  $RPM_BUILD_ROOT%{_bindir}/firefox
+#%{__chmod} 755 $RPM_BUILD_ROOT%{_bindir}/firefox
 %{__rm} -rf $RPM_BUILD_ROOT%{_bindir}/firefox
-%{__cat} %{SOURCE21} | %{__sed} -e 's,FIREFOX_VERSION,%{ffmajor},g' > \
+XULRUNNER_DIR=`pkg-config --variable=libdir libxul | %{__sed} -e "s,%{_libdir},,g"`
+%{__cat} %{SOURCE21} | %{__sed} -e 's,FIREFOX_VERSION,%{ffmajor},g' \
+		     | %{__sed} -e "s,XULRUNNER_DIRECTORY,$XULRUNNER_DIR,g" > \
   $RPM_BUILD_ROOT%{_bindir}/firefox
 %{__chmod} 755 $RPM_BUILD_ROOT%{_bindir}/firefox
 
-# set up our default preferences
-%{__cat} %{SOURCE12} | sed -e 's,FIREFOX_RPM_VR,%{version}-%{release},g' > vine-default-prefs
-%{__cat} vine-default-prefs >> $RPM_BUILD_ROOT/%{ffdir}/defaults/preferences/firefox.js
-%{__rm} vine-default-prefs
-
-# set up our default bookmarks
-%{__install} -p -D -m 664 %{SOURCE11} $RPM_BUILD_ROOT%{ffdir}/defaults/profile/US/bookmarks.html
-%{__install} -p -D -m 664 %{SOURCE11} $RPM_BUILD_ROOT%{ffdir}/defaults/profile/bookmarks.html
-
 %{__cat} %{SOURCE50} | sed -e 's,FFDIR,%{ffdir},g' -e 's,LIBDIR,%{_libdir},g' > \
   $RPM_BUILD_ROOT%{ffdir}/firefox-xremote-client
 
-%{__chmod} 755 $RPM_BUILD_ROOT%{ffdir}/firefox-xremote-client
+# Remove binary stub from xulrunner
+%{__rm} -rf $RPM_BUILD_ROOT/%{ffdir}/firefox
+
+#%{__chmod} 755 $RPM_BUILD_ROOT%{ffdir}/firefox-xremote-client
 %{__install} -p -D -m 664 %{SOURCE30} $RPM_BUILD_ROOT%{_mandir}/man1/firefox.1
-%{__cat} %{SOURCE55} | sed -e 's,FFDIR,%{ffdir},g' > \
-  $RPM_BUILD_ROOT/%{ffdir}/firefox-rebuild-databases.pl
-%{__chmod} 755 $RPM_BUILD_ROOT/%{ffdir}/firefox-rebuild-databases.pl
 
 %{__rm} -f $RPM_BUILD_ROOT%{ffdir}/firefox-config
 
@@ -251,9 +274,42 @@ find . -maxdepth 1 -mindepth 1 -name "*" -type d -exec %{__rm} -rf {} \;
 cd -
 
 # install locales
-for lang in %{MOZ_BUILD_LOCALES} ; do
-  %{__install} -p -D -m 664 dist/bin/chrome/$lang.{jar,manifest} $RPM_BUILD_ROOT%{ffdir}/chrome/
+#for lang in %{MOZ_BUILD_LOCALES} ; do
+#  %{__install} -p -D -m 664 dist/bin/chrome/$lang.{jar,manifest} $RPM_BUILD_ROOT%{ffdir}/chrome/
+#done
+
+
+echo > ../%{name}.lang
+# Extract langpacks, make any mods needed, repack the langpack, and install it.
+%{__mkdir_p} $RPM_BUILD_ROOT%{langpackdir}
+%{__tar} xf %{SOURCE1000}
+for langpack in `ls firefox-langpacks/*.xpi`; do
+  language=`basename $langpack .xpi`
+  extensionID=langpack-$language@firefox.mozilla.org
+  %{__mkdir_p} $extensionID
+  unzip $langpack -d $extensionID
+  find $extensionID -type f | xargs chmod 644
+
+  sed -i -e "s|browser.startup.homepage.*$|browser.startup.homepage=%{homepage}|g;" \
+     $extensionID/chrome/$language/locale/branding/browserconfig.properties
+
+  cd $extensionID
+  zip -r9mX ../${extensionID}.xpi *
+  cd -
+
+  %{__install} -m 644 ${extensionID}.xpi $RPM_BUILD_ROOT%{langpackdir}
+  language=`echo $language | sed -e 's/-/_/g'`
+  echo "%%lang($language) %{langpackdir}/${extensionID}.xpi" >> ../%{name}.lang
 done
+%{__rm} -rf firefox-langpacks
+
+
+# System extensions
+%{__mkdir_p} $RPM_BUILD_ROOT%{_datadir}/mozilla/extensions/%{firefox_app_id}
+%{__mkdir_p} $RPM_BUILD_ROOT%{_libdir}/mozilla/extensions/%{firefox_app_id}
+
+# Copy over the LICENSE
+%{__install} -p -c -m 644 LICENSE $RPM_BUILD_ROOT/%{ffdir}
 
 # another bug fixed by looking at the debian package
 %{__mkdir_p} $RPM_BUILD_ROOT%{ffdir}/chrome/icons/default/
@@ -271,10 +327,6 @@ done
 # own mozilla plugin dir (#135050)
 %{__mkdir_p} $RPM_BUILD_ROOT%{_libdir}/mozilla/plugins
 
-# ghost files
-touch $RPM_BUILD_ROOT%{ffdir}/components/compreg.dat
-touch $RPM_BUILD_ROOT%{ffdir}/components/xpti.dat
-
 
 #---------------------------------------------------------------------
 
@@ -286,25 +338,17 @@ touch $RPM_BUILD_ROOT%{ffdir}/components/xpti.dat
 %post
 update-desktop-database %{_datadir}/applications >& /dev/null ||:
 
-umask 022
-%{ffdir}/firefox-rebuild-databases.pl || :
-
-# create extensions directory
-HOME=/root %{ffdir}/firefox -register ||:
-
 %postun
 update-desktop-database %{_datadir}/applications>& /dev/null ||:
 umask 022
-# was this an upgrade?
-if [ $1 -gt 1 ]; then
- %{ffdir}/firefox-rebuild-databases.pl ||:
-fi
 
 %preun
 # is it a final removal?
 if [ $1 -eq 0 ]; then
   %{__rm} -rf %{ffdir}/components
   %{__rm} -rf %{ffdir}/extensions
+  %{__rm} -rf %{ffdir}/plugins
+  %{__rm} -rf %{langpackdir}
 fi
 
 %files
@@ -317,12 +361,18 @@ fi
 %{ffdir}
 %{_libdir}/mozilla
 
-%ghost %{ffdir}/components/compreg.dat
-%ghost %{ffdir}/components/xpti.dat
-
 #---------------------------------------------------------------------
 
 %changelog
+* Wed Mar 30 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 4.0-1
+- update to 4.0
+- BR: libjpeg-turbo-devel >= 1.1.0
+- BR: nspr-devel >= 4.8.7
+- BR: nss-devel >= 3.12.9
+- BR: cairo-devel >= 1.10.2-2
+- use langpacks.xpi instead of l10n source
+- update firefox startup script
+
 * Thu Mar 10 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 3.6.15-1
 - update to 3.6.15
 

+ 92 - 21
f/firefox/firefox.vine.sh.in

@@ -23,7 +23,7 @@
 ## 
 ## Usage:
 ##
-## $ mozilla
+## $ firefox
 ##
 ## This script is meant to run a mozilla program from the mozilla
 ## rpm installation.
@@ -38,7 +38,7 @@ cmdname=`basename $0`
 ##
 MOZ_ARCH=$(uname -m)
 case $MOZ_ARCH in
-	x86_64 | ia64 | s390 )
+	x86_64 | s390x | sparc64)
 		MOZ_LIB_DIR="/usr/lib64"
 		SECONDARY_LIB_DIR="/usr/lib"
 		;;
@@ -48,21 +48,25 @@ case $MOZ_ARCH in
 		;;
 esac
 
-if [ ! -x $MOZ_LIB_DIR/firefox-FIREFOX_VERSION/firefox ]; then
-    if [ ! -x $SECONDARY_LIB_DIR/firefox-FIREFOX_VERSION/firefox ]; then
-	echo "Error: $MOZ_LIB_DIR/firefox-FIREFOX_VERSION/firefox not found"
+MOZ_FIREFOX_FILE="application.ini"
+
+if [ ! -r $MOZ_LIB_DIR/firefox-FIREFOX_VERSION/$MOZ_FIREFOX_FILE ]; then
+    if [ ! -r $SECONDARY_LIB_DIR/firefox-FIREFOX_VERSION/$MOZ_FIREFOX_FILE ]; then
+	echo "Error: $MOZ_LIB_DIR/firefox-FIREFOX_VERSION/$MOZ_FIREFOX_FILE not found"
 	if [ -d $SECONDARY_LIB_DIR ]; then
-	    echo "       $SECONDARY_LIB_DIR/firefox-FIREFOX_VERSION/firefox not found"
+	    echo "       $SECONDARY_LIB_DIR/firefox-FIREFOX_VERSION/$MOZ_FIREFOX_FILE not found"
 	fi
 	exit 1
     fi
     MOZ_LIB_DIR="$SECONDARY_LIB_DIR"
 fi
 MOZ_DIST_BIN="$MOZ_LIB_DIR/firefox-FIREFOX_VERSION"
-MOZ_EXTENSIONS_DIR="$MOZ_DIST_BIN/extensions"
-MOZ_PROGRAM="$MOZ_DIST_BIN/firefox"
-MOZ_LAUCHER="$MOZ_DIST_BIN/run-mozilla.sh"
-
+MOZ_XUL_DIR="$MOZ_LIB_DIR/XULRUNNER_DIRECTORY"
+MOZ_LANGPACKS_DIR="$MOZ_DIST_BIN/langpacks"
+MOZ_EXTENSIONS_PROFILE_DIR="$HOME/.mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
+MOZ_PROGRAM="/usr/bin/xulrunner $MOZ_DIST_BIN/$MOZ_FIREFOX_FILE"
+MOZ_LAUNCHER="$MOZ_DIST_BIN/run-mozilla.sh"
+ 
 ##
 ## Set MOZ_GRE_CONF
 ##
@@ -101,6 +105,11 @@ else
 fi
 export MOZ_PLUGIN_PATH
 
+##
+## Set MOZ_APP_LAUNCHER for gnome-session
+##
+export MOZ_APP_LAUNCHER="/usr/bin/firefox"
+
 ##
 ## If plugins are wrapped, check them
 ##
@@ -142,18 +151,80 @@ then
   export FLASH_FORCE_PULSEAUDIO
 fi
 
+##
+## Disable the GNOME crash dialog, Moz has it's own
+##
+GNOME_DISABLE_CRASH_DIALOG=1
+export GNOME_DISABLE_CRASH_DIALOG
+
 # OK, here's where all the real work gets done
 
-# check system locale
-MOZARGS=
-MOZLOCALE=`echo $LANG | sed "s|_\([^.]*\).*|-\1|g"`
-MOZLOCALESHORT=`echo $MOZLOCALE | cut -f1 -d-`
-if [ -f $MOZILLA_FIVE_HOME/chrome/$MOZLOCALE.jar ] || [ -f $MOZILLA_FIVE_HOME/chrome/$MOZLOCALESHORT.jar ];
-then
-  MOZARGS="-UILocale $MOZLOCALE"
-else
-  MOZARGS="-UILocale en-US"
+
+##
+## To disable the use of Firefox localization, set MOZ_DISABLE_LANGPACKS=1
+## in your environment before launching Firefox.
+##
+#
+# MOZ_DISABLE_LANGPACKS=1
+# export MOZ_DISABLE_LANGPACKS
+#
+
+##
+## Automatically installed langpacks are tracked by .vine-langpack-install
+## config file.
+##
+VINE_LANGPACK_CONFIG="$MOZ_EXTENSIONS_PROFILE_DIR/.vine-langpack-install"
+
+# MOZ_DISABLE_LANGPACKS disables language packs completely
+MOZILLA_DOWN=0
+if ! [ $MOZ_DISABLE_LANGPACKS ] || [ $MOZ_DISABLE_LANGPACKS -eq 0 ]; then
+    if [ -x $MOZ_XUL_DIR/mozilla-xremote-client ]; then
+        # Is firefox running?
+        $MOZ_XUL_DIR/mozilla-xremote-client -a firefox 'ping()' > /dev/null 2>&1
+        MOZILLA_DOWN=$?
+    fi
+fi
+
+# Modify language pack configuration only when firefox is not running 
+# and language packs are not disabled
+if [ $MOZILLA_DOWN -ne 0 ]; then
+
+    # Clear already installed langpacks
+    mkdir -p $MOZ_EXTENSIONS_PROFILE_DIR
+    if [ -f $VINE_LANGPACK_CONFIG ]; then
+        rm `cat $VINE_LANGPACK_CONFIG` > /dev/null 2>&1
+        rm $VINE_LANGPACK_CONFIG > /dev/null 2>&1
+    fi
+
+    # Get locale from system
+    CURRENT_LOCALE=$LC_ALL
+    CURRENT_LOCALE=${CURRENT_LOCALE:-$LC_MESSAGES}
+    CURRENT_LOCALE=${CURRENT_LOCALE:-$LANG}
+    
+    # Try without a local variant first, then with a local variant
+    # So that pt-BR doesn't try to use pt for example
+    SHORTMOZLOCALE=`echo $CURRENT_LOCALE | sed "s|_\([^.]*\).*||g"`
+    MOZLOCALE=`echo $CURRENT_LOCALE | sed "s|_\([^.]*\).*|-\1|g"`
+
+    MOZARGS=""
+
+    function create_langpack_link() {
+        local language=$*
+        local langpack=langpack-${language}@firefox.mozilla.org.xpi
+        if [ -f $MOZ_LANGPACKS_DIR/$langpack ]; then
+            rm -rf $MOZ_EXTENSIONS_PROFILE_DIR/$langpack
+            ln -s $MOZ_LANGPACKS_DIR/$langpack \
+                  $MOZ_EXTENSIONS_PROFILE_DIR/$langpack
+            echo $MOZ_EXTENSIONS_PROFILE_DIR/$langpack > $VINE_LANGPACK_CONFIG
+            MOZARGS="-UILocale $MOZLOCALE"
+            return 0
+        fi
+        return 1
+    }
+
+    create_langpack_link $SHORTMOZLOCALE || create_langpack_link $MOZLOCALE || true
 fi
+
 # Prepare command line arguments
 script_args=""
 pass_arg_count=0
@@ -187,7 +258,7 @@ done
 debugging=0
 if [ $debugging = 1 ]
 then
-  echo $MOZ_LAUCHER $script_args $MOZ_PROGRAM $MOZARGS "$@"
+  echo $MOZ_LAUNCHER $script_args $MOZ_PROGRAM $MOZARGS "$@"
 fi
 
-exec $MOZ_LAUCHER $script_args $MOZ_PROGRAM $MOZARGS "$@"
+exec $MOZ_LAUNCHER $script_args $MOZ_PROGRAM $MOZARGS "$@"

BIN
f/firefox/fx-about-wordmark.png


BIN
f/firefox/fx-about-wordmark.xcf


BIN
f/firefox/fx-about.png


BIN
f/firefox/fx-about.xcf


+ 49 - 0
f/firefox/mozconfig-firefox4-vine5

@@ -0,0 +1,49 @@
+. $topsrcdir/browser/config/mozconfig
+
+ac_add_options --prefix="$PREFIX"
+ac_add_options --libdir="$LIBDIR"
+ac_add_options --with-system-jpeg
+ac_add_options --with-system-zlib
+#ac_add_options --with-system-png
+ac_add_options --with-system-nspr
+ac_add_options --with-system-nss
+#ac_add_options --with-system-cairo
+ac_add_options --enable-system-cairo
+#ac_add_options --disable-system-cairo
+ac_add_options --without-mng
+ac_add_options --with-pthreads
+ac_add_options --disable-tests
+ac_add_options --disable-mochitest
+ac_add_options --disable-debug
+ac_add_options --disable-installer
+ac_add_options --enable-jsd
+ac_add_options --enable-optimize="$RPM_OPT_FLAGS"
+ac_add_options --enable-default-toolkit=cairo-gtk2
+#ac_add_options --enable-xft
+ac_add_options --enable-pango
+ac_add_options --enable-xinerama
+ac_add_options --enable-crypto
+ac_add_options --enable-svg
+ac_add_options --enable-canvas
+ac_add_options --disable-xprint
+ac_add_options --disable-strip
+ac_add_options --enable-single-profile
+ac_add_options --disable-profilesharing
+ac_add_options --disable-official-branding
+ac_add_options --disable-crashreporter
+ac_add_options --disable-dbus
+ac_add_options --enable-safe-browsing
+ac_add_options --enable-libxul
+ac_add_options --enable-startup-notification
+ac_add_options --disable-necko-wifi
+ac_add_options --with-branding=browser/branding/unofficial
+ac_add_options --with-distribution-id=org.vinelinux
+
+#ac_add_options --with-l10n-base=../l10n
+
+export BUILD_OFFICIAL=1
+export MOZILLA_OFFICIAL=1
+mk_add_options BUILD_OFFICIAL=1
+mk_add_options MOZILLA_OFFICIAL=1
+mk_add_options MOZ_OBJDIR=@TOPSRCDIR@
+

+ 53 - 0
f/firefox/mozconfig-firefox4-vine6

@@ -0,0 +1,53 @@
+. $topsrcdir/browser/config/mozconfig
+
+ac_add_options --prefix="$PREFIX"
+ac_add_options --libdir="$LIBDIR"
+ac_add_options --with-system-jpeg
+ac_add_options --with-system-zlib
+ac_add_options --with-system-nspr
+ac_add_options --with-system-nss
+ac_add_options --with-system-libvpx
+ac_add_options --enable-system-cairo
+ac_add_options --enable-system-sqlite
+ac_add_options --without-mng
+ac_add_options --with-pthreads
+ac_add_options --disable-tests
+ac_add_options --disable-mochitest
+ac_add_options --disable-debug
+ac_add_options --disable-installer
+ac_add_options --enable-jsd
+ac_add_options --enable-optimize="$RPM_OPT_FLAGS"
+ac_add_options --enable-default-toolkit=cairo-gtk2
+#ac_add_options --enable-xft
+ac_add_options --enable-pango
+ac_add_options --enable-xinerama
+ac_add_options --enable-crypto
+ac_add_options --enable-svg
+ac_add_options --enable-canvas
+ac_add_options --disable-xprint
+ac_add_options --disable-strip
+ac_add_options --enable-single-profile
+ac_add_options --disable-profilesharing
+ac_add_options --disable-official-branding
+ac_add_options --disable-crashreporter
+ac_add_options --disable-dbus
+ac_add_options --enable-safe-browsing
+ac_add_options --enable-libxul
+ac_add_options --enable-startup-notification
+ac_add_options --enable-libnotify
+ac_add_options --disable-necko-wifi
+ac_add_options --disable-cpp-exceptions
+ac_add_options --enable-shared-js
+ac_add_options --enable-url-classifier
+ac_add_options --enable-gio
+ac_add_options --disable-gnomevfs
+ac_add_options --with-branding=browser/branding/unofficial
+ac_add_options --with-distribution-id=org.vinelinux
+
+#ac_add_options --with-l10n-base=../l10n
+
+export BUILD_OFFICIAL=1
+export MOZILLA_OFFICIAL=1
+mk_add_options BUILD_OFFICIAL=1
+mk_add_options MOZILLA_OFFICIAL=1
+mk_add_options MOZ_OBJDIR=@TOPSRCDIR@