From b75392101f4a4fcb79f9f47866eabdd2d3adfa73 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 22 May 2012 18:01:46 +0400 Subject: [PATCH] fixed prefs.js, cleaned mandriva.js a bit, added to files lanhcheck script --- firefox-searchengines-bing.xml | 12 ++++++++++++ firefox.spec | 26 ++++++++++++-------------- firefoxlangcheck | 11 +++++++++++ 3 files changed, 35 insertions(+), 14 deletions(-) create mode 100644 firefox-searchengines-bing.xml create mode 100755 firefoxlangcheck diff --git a/firefox-searchengines-bing.xml b/firefox-searchengines-bing.xml new file mode 100644 index 0000000..4a16cfb --- /dev/null +++ b/firefox-searchengines-bing.xml @@ -0,0 +1,12 @@ + + + Bing + Bing + Bing. Search by Microsoft. + msosa@microsoft.com + UTF-8 + limited + http://www.bing.com/favicon.ico + + + diff --git a/firefox.spec b/firefox.spec index 4bdcc07..1d1ff3b 100644 --- a/firefox.spec +++ b/firefox.spec @@ -23,13 +23,13 @@ Group: Networking/WWW Url: http://www.firefox.com/ Source0: ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/%{realver}esr/source/firefox-%{realver}esr.source.tar.bz2 Source4: firefox.desktop -#Source5: firefox-searchengines-jamendo.xml -#Source6: firefox-searchengines-exalead.xml -#Source8: firefox-searchengines-askcom.xml +Source5: firefox-searchengines-jamendo.xml +Source6: firefox-searchengines-exalead.xml +Source8: firefox-searchengines-askcom.xml Source9: kde.js Source10: firefox-searchengines-yandex.xml Source11: firefox-searchengines-google.xml - +Source12: firefox-searchengines-bing.xml Patch1: firefox-lang.patch Patch2: firefox-vendor.patch Patch3: firefox-disable-check-default-browser.patch @@ -230,10 +230,10 @@ rm -f %{buildroot}%{mozillalibdir}/precomplete install -D -m644 browser/app/profile/prefs.js %{buildroot}%{mozillalibdir}/defaults/profile/prefs.js cat << EOF >> %{buildroot}%{mozillalibdir}/defaults/profile/prefs.js +user_pref("browser.search.defaultenginename", "Yandex"); user_pref("browser.search.selectedEngine", "Yandex"); user_pref("browser.search.order.1", "Yandex"); user_pref("browser.search.order.2", "Google"); -user_pref("browser.search.defaultenginename", "Yandex"); user_pref("browser.EULA.override", true); user_pref("browser.shell.checkDefaultBrowser", false); user_pref("browser.ctrlTab.previews", true); @@ -243,6 +243,7 @@ user_pref("app.update.enabled", false); user_pref("app.update.autoInstallEnabled", false); user_pref("security.ssl.require_safe_negotiation", false); user_pref("browser.startup.homepage", "file:///usr/share/doc/HTML/index.html"); +user_pref("browser.startup.homepage_override.mstone", "ignore"); EOF # files in this directory are read on every startup, and can change/add @@ -264,10 +265,6 @@ pref("browser.ctrlTab.previews", true); pref("browser.display.use_system_colors", true); pref("browser.download.folderList", 1); pref("browser.link.open_external", 3); -pref("browser.search.order.1", "Yandex"); -pref("browser.search.order.2", "Google"); -pref("browser.search.selectedEngine", "Yandex"); -pref("browser.search.defaultenginename", "Yandex"); pref("browser.shell.checkDefaultBrowser", false); pref("browser.tabs.insertRelatedAfterCurrent", false); pref("dom.ipc.plugins.enabled.nswrapper*", false); @@ -278,15 +275,16 @@ EOF # search engines rm -f %{buildroot}%{mozillalibdir}/searchplugins/* -#cp -f %{SOURCE5} %{buildroot}%{mozillalibdir}/searchplugins/jamendo.xml -#cp -f %{SOURCE6} %{buildroot}%{mozillalibdir}/searchplugins/exalead.xml -#cp -f %{SOURCE8} %{buildroot}%{mozillalibdir}/searchplugins/askcom.xml +cp -f %{SOURCE5} %{buildroot}%{mozillalibdir}/searchplugins/jamendo.xml +cp -f %{SOURCE6} %{buildroot}%{mozillalibdir}/searchplugins/exalead.xml +cp -f %{SOURCE8} %{buildroot}%{mozillalibdir}/searchplugins/askcom.xml cp -f %{SOURCE10} %{buildroot}%{mozillalibdir}/searchplugins/yandex.xml cp -f %{SOURCE11} %{buildroot}%{mozillalibdir}/searchplugins/google.xml +cp -f %{SOURCE12} %{buildroot}%{mozillalibdir}/searchplugins/bing.xml # Correct distro values on search engines -#sed -i 's/@DISTRO_VALUE@/ffx/' %{buildroot}%{mozillalibdir}/searchplugins/askcom.xml -#sed -i 's/@DISTRO_VALUE@//' %{buildroot}%{mozillalibdir}/searchplugins/exalead.xml +sed -i 's/@DISTRO_VALUE@/ffx/' %{buildroot}%{mozillalibdir}/searchplugins/askcom.xml +sed -i 's/@DISTRO_VALUE@//' %{buildroot}%{mozillalibdir}/searchplugins/exalead.xml mkdir -p %{buildroot}%{_sys_macros_dir} cat <%{buildroot}%{_sys_macros_dir}/%{name}.macros diff --git a/firefoxlangcheck b/firefoxlangcheck new file mode 100755 index 0000000..2dadeca --- /dev/null +++ b/firefoxlangcheck @@ -0,0 +1,11 @@ +#!/bin/sh +if [ "'locale |grep LANG |grep -c ru_RU'" = "1" ] +then +/bin/true +else +sed -i 's/user_pref("browser.search.defaultenginename", "Yandex");/user_pref("browser.search.defaultenginename", "Google");/g' /usr/lib/firefox-10.0.4/defaults/profile/prefs.js +sed -i 's/user_pref("browser.search.selectedEngine", "Yandex");/user_pref("browser.search.selectedEngine", "Google");/g' /usr/lib/firefox-10.0.4/defaults/profile/prefs.js +sed -i 's/user_pref("browser.search.order.1", "Yandex");/user_pref("browser.search.order.1", "Google");/g' /usr/lib/firefox-10.0.4/defaults/profile/prefs.js +sed -i 's/user_pref("browser.search.order.2", "Google");/user_pref("browser.search.order.2", "Yandex");/g' /usr/lib/firefox-10.0.4/defaults/profile/prefs.js +fi +rm firefoxlangcheck \ No newline at end of file