make-ubufox 5.54 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#!/bin/sh
#
#    Copyright (C) 2008-2011  Rubén Rodríguez <ruben@trisquel.info>
#
#    This program is free software; you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation; either version 2 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program; if not, write to the Free Software
#    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
#

20
VERSION=1
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152

. ./config

#rm debian/patches/02_fix_about_home.patch
#sed -i /02_fix_about_home.patch/d debian/patches/series

# Unbranding
rm ./content/ubuntulogo32.png
replace ubuntulogo32.png internet32.png .

# This hack makes Firefox avoid sending a request for a list of plugins, instead returns a hardcoded xml list.
sed 's^https://mozilla-pfs.ubuntu.com/.*ID%^http://trisquel.info/sites/pfs.php?mime=%PLUGIN_MIMETYPE%^; ' -i modules/distributions/Ubuntu.jsm

# Changes the link to pfs.mozilla.org in the install wizard
sed 's_https://pfs.mozilla.org/plugins/_http://trisquel.info/browser/_' -i content/pluginInstallerWizard.js

#sed 's/ubuntu-artwork/trisquel-artwork/; s_http://start.ubuntu.com/_https://trisquel.info/welcome_; s/PREFIX +.*/PREFIX;/' -i ./components/aboutStartpage.js
rm components/aboutStartpage.js
sed s/components// -i ./config_build.sh
sed /components/d -i ./chrome.manifest
sed /startup/d -i defaults/preferences/ubuntu-mods.js

sed 's/www.ubuntu.com/trisquel.info/' -i debian/example-homepage.properties

for file in $(find -name ubufox-search.properties)
do
cat << EOF > $file
browser.search.defaultenginename="DuckDuckGo (SSL)"
browser.search.order.1="DuckDuckGo (SSL)"
browser.search.order.2=Google
EOF
done

for file in $(find locale -name ubufox.properties)
do
sed '/homepage/d' -i $file
cat << EOF >> $file
browser.startup.homepage=http://trisquel.info/
startup.homepage_override_url=http://trisquel.info/newbrowser
startup.homepage_welcome_url=http://trisquel.info/welcome
EOF
done

# Stablish Trisquel's default or mandatory settings
cat << EOF >> debian/xul-ext-ubufox.js

// Release notes and vendor URLs
pref("app.releaseNotesURL", "http://trisquel.info/browser");
pref("app.vendorURL", "http://trisquel.info/browser");

// PFS url
pref("pfs.datasource.url", "http://trisquel.info/sites/pfs.php?mime=%PLUGIN_MIMETYPE%");
pref("pfs.filehint.url", "http://trisquel.info/sites/pfs.php?mime=%PLUGIN_MIMETYPE%");

// I'm feeling Ducky.
pref("keyword.URL", "https://duckduckgo.com/?t=trisquel&q=!+");
pref("browser.search.defaultenginename", "DuckDuckGo (SSL)");
pref("browser.search.order.extra.duckduckgo", "DuckDuckGo (SSL)");

// Disable plugin installer
pref("plugins.hide_infobar_for_missing_plugin", true);
pref("plugins.hide_infobar_for_outdated_plugin", true);

//Speeding it up
pref("network.http.pipelining", true);
pref("network.http.proxy.pipelining", true);
pref("network.http.pipelining.maxrequests", 10);
pref("network.dns.disableIPv6", true);
pref("nglayout.initialpaint.delay", 0);

// Disable third party cookies
pref("network.cookie.cookieBehavior", 1);

// Extensions can be updated
pref("extensions.update.enabled", true);
// Use LANG environment variable to choose locale
pref("intl.locale.matchOS", true);
// Disable default browser checking.
pref("browser.shell.checkDefaultBrowser", false);
// Prevent EULA dialog to popup on first run
pref("browser.EULA.override", true);

// Default name strings
pref ("distribution.about", "Abrowser for Trisquel");
pref ("distribution.id", "trisquel");
pref ("distribution.version", "$REVISION");

// UserAgeng
pref("general.useragent.vendor", "Trisquel");
pref("general.useragent.vendorComment", "$CODENAME");
pref("general.useragent.vendorSub", "$REVISION");
// Set useragent to Firefox compatible
pref("general.useragent.compatMode.abrowser",true);

// Startup pages
//pref ("browser.startup.page" , 3);
//pref ("browser.startup.homepage" , "http://trisquel.info");
//pref ("startup.homepage_welcome_url", "http://trisquel.info/welcome");
//pref ("startup.homepage_override_url" , "http://trisquel.info/newbrowser");

// Preferences for the Get Add-ons panel
pref ("extensions.webservice.discoverURL", "https://trisquel.info/browser-plain");
pref ("extensions.getAddons.search.url", "http://trisquel.info");

// Help URL
pref ("app.support.baseURL", "http://trisquel.info/wiki/");

// Dictionary download preference
pref("browser.dictionaries.download.url", "http://dictionaries.mozdev.org/");
pref("browser.search.searchEnginesURL", "http://mycroft.mozdev.org/");

// Apturl preferences
pref("network.protocol-handler.app.apt","/usr/bin/apturl");
pref("network.protocol-handler.warn-external.apt",false);
pref("network.protocol-handler.app.apt+http","/usr/bin/apturl");
pref("network.protocol-handler.warn-external.apt+http",false);
pref("network.protocol-handler.external.apt",true);
pref("network.protocol-handler.external.apt+http",true);
EOF

sed '/You can uninstall/d; s/ask.com/Duck Duck GO!/; /Add the following options/d; /Get help on-line/d; /Help translating/d; /Trisquel Release/d; ' debian/control -i

replace Mozilla Trisquel .
replace Firefox Abrowser .
replace firefox abrowser .
replace Ubuntu Trisquel .
replace ubuntu-mozillateam@lists.ubuntu.com trisquel-devel@listas.trisquel.info .

changelog "Adapted for Trisquel"

compile