make-firefox 23.9 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-2012  Ruben Rodriguez <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
QUILT=skip

. ./config

# Make ubufox mandatory
sed 's/Depends: lsb-release,/Depends: lsb-release, xul-ext-ubufox,/' -i debian/control debian/control.in
sed 's/iceweasel,/iceweasel, firefox, icecat,/' -i debian/control*

# Remove extra firefox metapackages
sed '/Package: firefox/,/It can be safely removed/d' -i debian/control.in

# Remove Ubuntu bookmarks
33
sed -i /ubuntu-bookmarks/d debian/patches/series.in
34 35 36
rm debian/patches/ubuntu-bookmarks*

#Unbrand url codes for google and amazon
37 38
#rm debian/patches/ubuntu-codes*
#sed /ubuntu-codes/d debian/patches/series.in -i
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58

cat << EOF > debian/distribution.ini
[Global]
id=trisquel
version=$REVISION
about=Abrowser for Trisquel GNU/Linux

[Preferences]
app.distributor = "trisquel"
app.distributor.channel = "trisquel"
app.partner.ubuntu = "trisquel"
EOF

# speed up build process
#sed 's/\(^MOZ_WANT_UNIT_TESTS.*\)1/\1 0/' -i debian/rules
sed 's/\(^MOZ_ENABLE_BREAKPAD.*\)1/\1 0/' -i debian/rules

# Set release to unofficial
sed "s/\(^MOZ_BUILD_UNOFFICIAL.*\)0/\1 1/; s/release$/$CODENAME/" -i debian/rules

59 60 61
#TARBALL=$(ls *.tar.bz2)
#tar -jxf $TARBALL
#rm $TARBALL
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
sed  "s/^MOZ_APP_NAME\t.*/MOZ_APP_NAME\t\t:= abrowser/; s/firefox/abrowser/" debian/rules -i

# Hack to avoid compilation to fail on 3.0x kernel
#cp mozilla/security/coreconf/Linux2.6.mk mozilla/security/coreconf/Linux3.0.mk

############################################################################3
############################################################################3
############################################################################3
sed -i s/abrowser/abrowser-old/ debian/control*
sed "s_^Maintainer.*_Maintainer: $DEBFULLNAME <$DEBEMAIL>_g" -i debian/control*

# Replace Firefox branding
find -type d | grep firefox | xargs rename s/firefox/abrowser/
find -type f | grep firefox | xargs rename s/firefox/abrowser/
replace(){
find $3 -type f |grep -v changelog |grep -v copyright | xargs sed -i s^"$1"^"$2"^g
}
replace firefox abrowser .
replace Firefox Abrowser .
replace FIREFOX ABROWSER .
replace " Mozilla " " Trisquel " .
sed -i '1s/^Source:.*/Source: firefox/' debian/control*
replace PACKAGES/abrowser PACKAGES/firefox .
85
sed s/Trisquel/Mozilla/ compare-locales/scripts/compare-locales -i
86 87 88 89 90 91 92
replace "iceweasel, abrowser" "iceweasel, firefox" .
replace "Replaces: abrowser" "Replaces: firefox" .
sed s/Ubuntu/Trisquel/g debian/rules -i
sed s/ubuntu/trisquel/g debian/distribution.ini debian/config/mozconfig.in -i
sed 's/ubuntu_version/trisquel_version/; s/Ubuntu 10.10/Trisquel 4.0/; s/1010/40/' -i debian/abrowser.postinst.in

# Redirect feedback menu
93
sed s:input.mozilla.com/feedback:trisquel.info/contact: -i browser/base/content/utilityOverlay.js
94 95

# Make abrowser-locale-$lang provide firefox-locale-$lang
96
#sed 's/Package:\(.*\)/Package:\1\nProvides: firefox-locale-@LANGCODE@/g' debian/control.langpacks* -i
97 98

# Branding files
99 100
rm browser/branding/* -rf
cp -a $DATA/branding/ browser/branding/$CODENAME
101 102 103 104 105 106 107 108 109 110 111
cat << EOF > debian/config/branch.mk
CHANNEL                 = $CODENAME
MOZ_WANT_UNIT_TESTS     = 0
MOZ_BUILD_UNOFFICIAL    = 1
MOZ_ENABLE_BREAKPAD     = 0

MOZILLA_REPO = http://hg.mozilla.org/releases/mozilla-release
L10N_REPO = http://hg.mozilla.org/releases/l10n/mozilla-release
EOF

#set default layout
112
cat << EOF |patch -p1 -N -r /dev/null
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
--- mozilla/browser/base/content/browser.xul.old	2011-07-18 02:35:10.000000000 +0000
+++ mozilla/browser/base/content/browser.xul	2011-07-18 02:40:51.000000000 +0000
@@ -477,6 +477,7 @@
              defaultset="menubar-items"
              mode="icons" iconsize="small" defaulticonsize="small"
              lockiconsize="true"
+             autohide="true"
 #ifdef MENUBAR_CAN_AUTOHIDE
              toolbarname="&menubarCmd.label;"
              accesskey="&menubarCmd.accesskey;"
@@ -473,7 +473,7 @@
              toolbarname="&navbarCmd.label;" accesskey="&navbarCmd.accesskey;"
              fullscreentoolbar="true" mode="icons" customizable="true"
              iconsize="large"
-             defaultset="unified-back-forward-button,urlbar-container,reload-button,stop-button,search-container,home-button,bookmarks-menu-button-container,window-controls"
+             defaultset="unified-back-forward-button,reload-button,stop-button,home-button,urlbar-container,search-container,fullscreenflex,window-controls"
              context="toolbar-context-menu">
 
       <toolbaritem id="unified-back-forward-button" class="chromeclass-toolbar-additional"
@@ -724,7 +725,7 @@
              context="toolbar-context-menu"
              defaultset="personal-bookmarks"
              toolbarname="&personalbarCmd.label;" accesskey="&personalbarCmd.accesskey;"
-             collapsed="true"
+             collapsed="false"
              customizable="true">
       <toolbaritem flex="1" id="personal-bookmarks" title="&bookmarksItem.title;"
                    removable="true">
@@ -801,7 +802,7 @@
              aria-label="&tabsToolbar.label;"
              context="toolbar-context-menu"
 #ifdef APPMENU_ON_TABBAR
-             defaultset="appmenu-toolbar-button,tabbrowser-tabs,new-tab-button,alltabs-button,tabs-closebutton"
+             defaultset="appmenu-toolbar-button,tabbrowser-tabs,new-tab-button,flvideoreplacer-toolbar-button,downloads-button,feed-button,alltabs-button,tabs-closebutton"
 #else
              defaultset="tabbrowser-tabs,new-tab-button,alltabs-button,tabs-closebutton"
 #endif
EOF

#Trisquel custom bookmarks
153
cat << EOF > browser/locales/generic/profile/bookmarks.html.in
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!-- This is an automatically generated file.
     It will be read and overwritten.
     DO NOT EDIT! -->
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks Menu</H1>

<DL><p>
    <DT><H3 ADD_DATE="1245542278" LAST_MODIFIED="1245543070" PERSONAL_TOOLBAR_FOLDER="true">Bookmarks Toolbar</H3>
<DD>Add bookmarks to this folder to see them displayed on the Bookmarks Toolbar
    <DL><p>
	<HR>
        <DT><A HREF="http://trisquel.info/" ADD_DATE="1245542718" LAST_MODIFIED="1245542736" ICON_URI="http://trisquel.info/sites/default/themes/trisquel3/favicon.ico" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACRklEQVQ4jY2SXU/SYRiHL9xwUzd7s80AzRmzmiKhgCKof0X4C4FHYZtOV2nMWZvTtFyNyQwrX1gwshTzDQQN8f0gD9w6ydo6aJ201Rfoc3Sgs+wg+Z3e9/Xcv117IOWUS1F7NJSNVYMrI3UOoGAgF/PCDg0LccyLK4jRPfTeouNLao+G+rkXWCLzCLNDXBssOJoJs0Po/Q5oy0LVW0jNq3s0LEaAtIMFY7AZMfEDMZLAshDFvvYT++p3TAEXALWhYQrdpwAJ5d5OFB1KbMmP5LrOA21ZWJf3qRipo/hRPjq/GfWgBnFlF/vqPuphDTp/FaZgD8ZAE9qRdozBZqyJHXBngrxVgTXynoJbp9E976ZitA7jxGO0z4w4Nj4gxt9x+aGM4p58Sr0l6HxV2FfjCNNPDurnt5zBEtumqEt+ZNcwOoDsdh7O9U2cW2s0rixhmRvFEglyfWMXcWkeefu5PwKNk/exRKeonrxBTagDw3gLeq8W59Yaju09HOtfsCW+IsY+0TDjO/RxLBLKPSoMAZFSbwkA9bMTODd/IYSfUuK+dCQxtbilNC5/RozGkblzqPT3YXjpQe/TpsZnu85iT37DFL6DKehGNVgIrgzqpsYo61Wm0iATcXkf4XUX1YG7qB5cAdKoCd1EmO5MrYX5rR9rLInMnYNmxEZxtxIh3I8p1HISKgHSyGuSYY0lMUdnqA25EML9iJEE8lYFB1/4v0IlQDoXrl7EONZL/ZsAleN9ZAtKIP0k+O9HpMhbFeh92sPL0n/h3yJfoqCu2Os+AAAAAElFTkSuQmCC">Trisquel GNU/Linux</A>
        <DT><A HREF="http://trisquel.info/wiki/" ADD_DATE="1245542718" LAST_MODIFIED="1245542736" ICON_URI="http://trisquel.info/sites/default/themes/trisquel3/favicon.ico" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACRklEQVQ4jY2SXU/SYRiHL9xwUzd7s80AzRmzmiKhgCKof0X4C4FHYZtOV2nMWZvTtFyNyQwrX1gwshTzDQQN8f0gD9w6ydo6aJ201Rfoc3Sgs+wg+Z3e9/Xcv117IOWUS1F7NJSNVYMrI3UOoGAgF/PCDg0LccyLK4jRPfTeouNLao+G+rkXWCLzCLNDXBssOJoJs0Po/Q5oy0LVW0jNq3s0LEaAtIMFY7AZMfEDMZLAshDFvvYT++p3TAEXALWhYQrdpwAJ5d5OFB1KbMmP5LrOA21ZWJf3qRipo/hRPjq/GfWgBnFlF/vqPuphDTp/FaZgD8ZAE9qRdozBZqyJHXBngrxVgTXynoJbp9E976ZitA7jxGO0z4w4Nj4gxt9x+aGM4p58Sr0l6HxV2FfjCNNPDurnt5zBEtumqEt+ZNcwOoDsdh7O9U2cW2s0rixhmRvFEglyfWMXcWkeefu5PwKNk/exRKeonrxBTagDw3gLeq8W59Yaju09HOtfsCW+IsY+0TDjO/RxLBLKPSoMAZFSbwkA9bMTODd/IYSfUuK+dCQxtbilNC5/RozGkblzqPT3YXjpQe/TpsZnu85iT37DFL6DKehGNVgIrgzqpsYo61Wm0iATcXkf4XUX1YG7qB5cAdKoCd1EmO5MrYX5rR9rLInMnYNmxEZxtxIh3I8p1HISKgHSyGuSYY0lMUdnqA25EML9iJEE8lYFB1/4v0IlQDoXrl7EONZL/ZsAleN9ZAtKIP0k+O9HpMhbFeh92sPL0n/h3yJfoqCu2Os+AAAAAElFTkSuQmCC">Wiki</A>
        <DT><A HREF="http://trisquel.info/donate" ADD_DATE="1245542718" LAST_MODIFIED="1245542736" ICON_URI="http://trisquel.info/sites/default/themes/trisquel3/favicon.ico" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACRklEQVQ4jY2SXU/SYRiHL9xwUzd7s80AzRmzmiKhgCKof0X4C4FHYZtOV2nMWZvTtFyNyQwrX1gwshTzDQQN8f0gD9w6ydo6aJ201Rfoc3Sgs+wg+Z3e9/Xcv117IOWUS1F7NJSNVYMrI3UOoGAgF/PCDg0LccyLK4jRPfTeouNLao+G+rkXWCLzCLNDXBssOJoJs0Po/Q5oy0LVW0jNq3s0LEaAtIMFY7AZMfEDMZLAshDFvvYT++p3TAEXALWhYQrdpwAJ5d5OFB1KbMmP5LrOA21ZWJf3qRipo/hRPjq/GfWgBnFlF/vqPuphDTp/FaZgD8ZAE9qRdozBZqyJHXBngrxVgTXynoJbp9E976ZitA7jxGO0z4w4Nj4gxt9x+aGM4p58Sr0l6HxV2FfjCNNPDurnt5zBEtumqEt+ZNcwOoDsdh7O9U2cW2s0rixhmRvFEglyfWMXcWkeefu5PwKNk/exRKeonrxBTagDw3gLeq8W59Yaju09HOtfsCW+IsY+0TDjO/RxLBLKPSoMAZFSbwkA9bMTODd/IYSfUuK+dCQxtbilNC5/RozGkblzqPT3YXjpQe/TpsZnu85iT37DFL6DKehGNVgIrgzqpsYo61Wm0iATcXkf4XUX1YG7qB5cAdKoCd1EmO5MrYX5rR9rLInMnYNmxEZxtxIh3I8p1HISKgHSyGuSYY0lMUdnqA25EML9iJEE8lYFB1/4v0IlQDoXrl7EONZL/ZsAleN9ZAtKIP0k+O9HpMhbFeh92sPL0n/h3yJfoqCu2Os+AAAAAElFTkSuQmCC">Donate</A>
        <DT><A HREF="http://store.trisquel.info/" ADD_DATE="1245542718" LAST_MODIFIED="1245542736" ICON_URI="http://store.trisquel.info/favicon.ico" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACRklEQVQ4jY2SXU/SYRiHL9xwUzd7s80AzRmzmiKhgCKof0X4C4FHYZtOV2nMWZvTtFyNyQwrX1gwshTzDQQN8f0gD9w6ydo6aJ201Rfoc3Sgs+wg+Z3e9/Xcv117IOWUS1F7NJSNVYMrI3UOoGAgF/PCDg0LccyLK4jRPfTeouNLao+G+rkXWCLzCLNDXBssOJoJs0Po/Q5oy0LVW0jNq3s0LEaAtIMFY7AZMfEDMZLAshDFvvYT++p3TAEXALWhYQrdpwAJ5d5OFB1KbMmP5LrOA21ZWJf3qRipo/hRPjq/GfWgBnFlF/vqPuphDTp/FaZgD8ZAE9qRdozBZqyJHXBngrxVgTXynoJbp9E976ZitA7jxGO0z4w4Nj4gxt9x+aGM4p58Sr0l6HxV2FfjCNNPDurnt5zBEtumqEt+ZNcwOoDsdh7O9U2cW2s0rixhmRvFEglyfWMXcWkeefu5PwKNk/exRKeonrxBTagDw3gLeq8W59Yaju09HOtfsCW+IsY+0TDjO/RxLBLKPSoMAZFSbwkA9bMTODd/IYSfUuK+dCQxtbilNC5/RozGkblzqPT3YXjpQe/TpsZnu85iT37DFL6DKehGNVgIrgzqpsYo61Wm0iATcXkf4XUX1YG7qB5cAdKoCd1EmO5MrYX5rR9rLInMnYNmxEZxtxIh3I8p1HISKgHSyGuSYY0lMUdnqA25EML9iJEE8lYFB1/4v0IlQDoXrl7EONZL/ZsAleN9ZAtKIP0k+O9HpMhbFeh92sPL0n/h3yJfoqCu2Os+AAAAAElFTkSuQmCC">Store</A>
        <DT><A FEEDURL="http://trisquel.info/en/planet/rss" HREF="http://trisquel.info/en/planet">Planet</A>
        <DT><A HREF="http://identi.ca/group/trisquel" ADD_DATE="1262084293" ICON_URI="http://identi.ca/favicon.ico" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABEElEQVQ4jZWTsW3EMAxF3wgeQSNkBI2QETyCR1BnII7BLl2gAVyovkrXpbur3B3gwgMYmYBpYkPS2QaOABtJ/4miPiEJB1UPTmAS0CQnAWnBcBSf8C6wFMIylx7qI/GZMMsM4qAqbx6s1dF7nWPUm4gO1j5Vsj3n/83b5o9zuheXui4hHoC0YYO1u+I1ikqWFbAtPkI4BdxEsipaMBlgjvEUMMeYATqwL1Uwep8BPuCN9AcudX0KuDZNBlh74NPF0ftDwCOEFBAAaMGURrk2zdaP1Qu/06Sqql9VtZ6Lm5lKLxzltzEpQB1UG0RAXrHzk6UBOrAC9wPBfWdKw+5ktmA6sD24Dmw6xi2YHhqBIKB/yV7X1RXblbAAAAAASUVORK5CYII=">@identi.ca</A>
	<HR>
        <DT><A HREF="http://www.gnu.org/" ADD_DATE="1245542746" LAST_MODIFIED="1245542763" ICON_URI="http://www.gnu.org/graphics/gnu-head-mini.png" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgBAMAAACBVGfHAAAAGFBMVEVFRUV+fn6mpqa/v7/Ozs7Y2Njg4OD8/Pwuhn+TAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAALEQAACxEBf2RfkQAAAAd0SU1FB9MBDhQ6Gd8s57cAAAEkSURBVHicXdFNc4JADAbgoP0Bi4d6dcGBMzp2z2rrnjulcsavnKuQ9+83K37vDAN5yIZsILws0uv3i7ugLTnAwpjBOsTLOE4VmmKQTFYBioGNKkI5drcCReRItmNAyinSCjianJo6A/aGRtRjtPadpB5CRkQRUaYPGbXW4UgKMfXQxDnJPIeJ0qyOrclrLXoqou8+5p7HM9EkT/JtyEsqB2QYnRv7sT2ArRPLf0kWOp1sA3hYPq3Oh/t0EAjjVIG703II9awr3l3BhxAf5foMLaaasPEZqm5A+0RzGCmuIKJbWi284csIJbzykBQ3aIADsL2CFtBWpovhA1Td7Q6NzqZ/B+38APG3HxU+sYO4B9Akt+AnqGbp/gmwTN6eAWt+gcv6B4rivVin0bWbAAAAAElFTkSuQmCC">GNU&#39;s not UNIX!</A>
        <DT><A FEEDURL="http://planet.gnu.org/atom.xml" HREF="http://planet.gnu.org/">GNU Planet</A>
 <DT><A HREF="http://www.fsf.org/" ADD_DATE="1245542771" LAST_MODIFIED="1245542780" ICON_URI="http://www.fsf.org/favicon.ico" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAACXBIWXMAAAsTAAALEwEAmpwYAAADG0lEQVQoFQEQA+/8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQECAAAAAAAAAAAAAAAAAAAA2qOp7tTXAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAP///wAAAAAAAOCyt7pUXQcSEgcQDwAAAP///wAAAAAAAAD//x9NSDqNhQEBAQQAAAAAAAAAAAAAAAAQJiQGDQ0aPToZPjoAAQEAAAAAAAAAAAABAQEpZV4AAAAAAAAAAAAA////////////////pSIv05KZ////////////////////////////////AAAAAQAAAP///6krNwAAAAAAAPHc3ggSEQcSEQAAAAAAAAAAABY3NEGelQAAAAAAAAEBAQEAAAD///+YARAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGDg1g690CBgYAAAABAQEEAAAAAAAAS7etAAAAAAAAwGVtHklFIlJOAAAAAAAAAAAAAAAA+/X2BwYGAAAAAAAABAAAAAAAAB1IQwAAAAAAAAYNDBAmJB1IQwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAgL//v4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAQEB//7/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAECAv/+/gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD////////////////cqK3qzM////////////////////////////////8AAAABAAAA////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGuLjDf9F8oBAAAAAElFTkSuQmCC">Free Software Foundation</A>
    </DL><p>
</DL><p>
EOF

############################################################################3
############################################################################3
cat << EOF >> debian/syspref.js
// Use /etc/xul-ext/ubufox.js to set global preferences, don't edit this file.
EOF
############################################################################3

mkdir debian/search
# Add DDG to search plugins
cat << EOF > debian/search/duckduckgo.xml
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/" xmlns:os="http://a9.com/-/spec/opensearch/1.1/">
<os:ShortName>DuckDuckGo</os:ShortName>
<os:Description>Search DuckDuckGo</os:Description>
<os:InputEncoding>UTF-8</os:InputEncoding>
<os:Image width="16" height="16">data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAANcNAADXDQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJyDsJmlk8pf6+v3s/v7+++zr/fcnIOyzJyDsgCcg7CYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnIOwBJyDscCcg7PZttJ7/7Pfs//////++xO7/S5GA/ycg7P8nIOz2JyDscCcg7AEAAAAAAAAAAAAAAAAnIOwBJyDstScg7P8nIOz/Y8p5/2fHZf9Yv0z/YcF2/1rBUv8nIOz/JyDs/ycg7P8nIOy1JyDsAQAAAAAAAAAAJyDscCcg7P8nIOz/JyDs/4jQoP/p9+n//////05X3v9LkYD/JyDs/ycg7P8nIOz/JyDs/ycg7HAAAAAAJyDsJicg7PYnIOz/JyDs/zUu7f/+/v////////////89N+7/JyDs/yUo7f8nIOz/JyDs/ycg7P8nIOz2JyDsJicg7IAnIOz/JyDs/ycg7P9hXPH////////////t/P//GIr2/wfD+/8Gyfz/DKv5/yM57/8nIOz/JyDs/ycg7H8nIOyzJyDs/ycg7P8nIOz/jov1////////////Otz9/w3G/P8cWfH/JSvt/ycg7P8nIOz/JyDs/ycg7P8nIOyzJyDs5icg7P8nIOz/JyDs/7u5+f///////////27l/v8E0v3/BNL9/wTQ/f8Oofn/IT7v/ycg7P8nIOz/JyDs5icg7OYnIOz/JyDs/ycg7P/p6P3/uWsC////////////5fr//6Po/f8Thfb/DKv5/w6f+f8nIOz/JyDs/ycg7OYnIOyzJyDs/ycg7P8nIOz/9/b+/////////////////7lrAv/V1Pv/JyDs/ycg7P8nIOz/JyDs/ycg7P8nIOyzJyDsgCcg7P8nIOz/JyDs/8/N+///////////////////////iIX1/ycg7P8nIOz/JyDs/ycg7P8nIOz/JyDsfycg7CYnIOz2JyDs/ycg7P9FP+7/q6n4/+7u/f/n5v3/fXn0/yoj7P8nIOz/JyDs/ycg7P8nIOz/JyDs9icg7CYAAAAAJyDscCcg7P8nIOz/wsD6/+no/f/Y1/z/eHTz/ycg7P8nIOz/JyDs/ycg7P8nIOz/JyDs/ycg7HAAAAAAAAAAACcg7AEnIOy1JyDs/ycg7P8nIOz/JyDs/ycg7P8nIOz/JyDs/ycg7P8nIOz/JyDs/ycg7LUnIOwBAAAAAAAAAAAAAAAAJyDsAScg7HAnIOz2JyDs/ycg7P8nIOz/JyDs/ycg7P8nIOz/JyDs9icg7HAnIOwBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJyDsJicg7IAnIOyzJyDs5icg7OYnIOyzJyDsgCcg7CYAAAAAAAAAAAAAAAAAAAAA+B8AAPAPAADAAwAAwAMAAIABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAABAACAAQAAwAMAAMADAADwDwAA+B8AAA==</os:Image>
<os:Url type="text/html" method="GET" template="http://duckduckgo.com/?t=trisquel&amp;q={searchTerms}">
</os:Url>
</SearchPlugin>
EOF

cat << EOF > debian/search/duckduckgo-ssl.xml
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/" xmlns:os="http://a9.com/-/spec/opensearch/1.1/">
<os:ShortName>DuckDuckGo (SSL)</os:ShortName>
<os:Description>Search DuckDuckGo (SSL)</os:Description>
<os:InputEncoding>UTF-8</os:InputEncoding>
<os:Image width="16" height="16">data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAANcNAADXDQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJyDsJmlk8pf6+v3s/v7+++zr/fcnIOyzJyDsgCcg7CYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnIOwBJyDscCcg7PZttJ7/7Pfs//////++xO7/S5GA/ycg7P8nIOz2JyDscCcg7AEAAAAAAAAAAAAAAAAnIOwBJyDstScg7P8nIOz/Y8p5/2fHZf9Yv0z/YcF2/1rBUv8nIOz/JyDs/ycg7P8nIOy1JyDsAQAAAAAAAAAAJyDscCcg7P8nIOz/JyDs/4jQoP/p9+n//////05X3v9LkYD/JyDs/ycg7P8nIOz/JyDs/ycg7HAAAAAAJyDsJicg7PYnIOz/JyDs/zUu7f/+/v////////////89N+7/JyDs/yUo7f8nIOz/JyDs/ycg7P8nIOz2JyDsJicg7IAnIOz/JyDs/ycg7P9hXPH////////////t/P//GIr2/wfD+/8Gyfz/DKv5/yM57/8nIOz/JyDs/ycg7H8nIOyzJyDs/ycg7P8nIOz/jov1////////////Otz9/w3G/P8cWfH/JSvt/ycg7P8nIOz/JyDs/ycg7P8nIOyzJyDs5icg7P8nIOz/JyDs/7u5+f///////////27l/v8E0v3/BNL9/wTQ/f8Oofn/IT7v/ycg7P8nIOz/JyDs5icg7OYnIOz/JyDs/ycg7P/p6P3/uWsC////////////5fr//6Po/f8Thfb/DKv5/w6f+f8nIOz/JyDs/ycg7OYnIOyzJyDs/ycg7P8nIOz/9/b+/////////////////7lrAv/V1Pv/JyDs/ycg7P8nIOz/JyDs/ycg7P8nIOyzJyDsgCcg7P8nIOz/JyDs/8/N+///////////////////////iIX1/ycg7P8nIOz/JyDs/ycg7P8nIOz/JyDsfycg7CYnIOz2JyDs/ycg7P9FP+7/q6n4/+7u/f/n5v3/fXn0/yoj7P8nIOz/JyDs/ycg7P8nIOz/JyDs9icg7CYAAAAAJyDscCcg7P8nIOz/wsD6/+no/f/Y1/z/eHTz/ycg7P8nIOz/JyDs/ycg7P8nIOz/JyDs/ycg7HAAAAAAAAAAACcg7AEnIOy1JyDs/ycg7P8nIOz/JyDs/ycg7P8nIOz/JyDs/ycg7P8nIOz/JyDs/ycg7LUnIOwBAAAAAAAAAAAAAAAAJyDsAScg7HAnIOz2JyDs/ycg7P8nIOz/JyDs/ycg7P8nIOz/JyDs9icg7HAnIOwBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJyDsJicg7IAnIOyzJyDs5icg7OYnIOyzJyDsgCcg7CYAAAAAAAAAAAAAAAAAAAAA+B8AAPAPAADAAwAAwAMAAIABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAABAACAAQAAwAMAAMADAADwDwAA+B8AAA==</os:Image>
<os:Url type="text/html" method="GET" template="https://duckduckgo.com/?t=trisquel&amp;q={searchTerms}">
</os:Url>
</SearchPlugin>
EOF

cat << EOF > debian/search/trisquel-packages.xml
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/" xmlns:os="http://a9.com/-/spec/opensearch/1.1/">
<os:ShortName>Trisquel Packages</os:ShortName>
<os:Description>Search packages.trisquel.info</os:Description>
<os:InputEncoding>UTF-8</os:InputEncoding>
<os:Image width="16" height="16">data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACi0lEQVQ4jY2T3UtTARiH92/0DxR0E10EZTeBF3VhBEqF9EEXUURUpn2AmohNS60oUrRMQ1D86ItKKz+atjmd25w5S82zlXPOqfNsc27nzOPOeboQJlakL/xuXnifi+d9Xx1bLEVZxTHhxzjsRZJXkn3dVob9gQhp+d1kFhs5rv9C6s1ufnjEjQDHhJ+bNXbOlJsprHfwyxdMAgrrHbzvcxONxXF7F6l47eRUaR+qqq4BWgwCO85+5KjeyMm7Jraf62DnhU5aDZMA3KodJByR0DSNmjdDCFML7L/Wy4IYQReNxUm52oXB7sEzG6Lb5sEx7uNgXi8pOT04JuYwO308bB3mrclNfbuTFoNAWoGJmLSCzusPcij3M6GlGJUvhzDYpymuH6Tvq5cDuX0cKzHjW1jCMxtk1DWPecRLZqkFfcPwmoNgOMrhgl5m5sJJu2UNVqZnRY7oLaSXWDlRZuFGjZ3LlVYOFpg5c6+fxVB0XeLjV07OP7LwosfFs7YxGjvGsI3Nkl5iJTW/nz3Zvey+1Mm+rA7y6uyEI9LGNWqahlOY59Ogh1HXPAA51Va2ne4gv86GazqQlPhn/fMOFCXB3qxOMu+YCASXud80RNFzC7Yx/9YAYijKrotd1LZP8OTtKG6viCSvcL16AGF6cXNATFohJbubqnffefruG+M/51FVlWaDQE3b+OYAgOyqQTKKTATEZT6YXQieAOXNIzR2Tf4N0DQNVVVZXV1FURQURcHrF8m4beTsgwFaewTKm0c4qjcy5RNJJBJJoTpN04jH40QiEUKhEKIoJuOemuFBs40rFWbuN9kYFzwEg0HC4TCSJK3/QiKRQJZlZFkmHo//N7IsI0kSiqKgaRq/AbKDgxgo7zYPAAAAAElFTkSuQmCC</os:Image>
<SearchForm>http://packages.trisquel.info/</SearchForm>
<os:Url type="text/html" method="GET" template="http://packages.trisquel.info/search?suite=default&amp;section=all&amp;arch=any&amp;searchon=names&amp;keywords={searchTerms}">
</os:Url>
</SearchPlugin>
EOF

cat << EOF > debian/search/trisquel.xml
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/" xmlns:os="http://a9.com/-/spec/opensearch/1.1/">
<os:ShortName>Trisquel</os:ShortName>
<os:Description>Trisquel GNU/Linux</os:Description>
<os:InputEncoding>UTF-8</os:InputEncoding>
<os:Image width="16" height="16">data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACi0lEQVQ4jY2T3UtTARiH92/0DxR0E10EZTeBF3VhBEqF9EEXUURUpn2AmohNS60oUrRMQ1D86ItKKz+atjmd25w5S82zlXPOqfNsc27nzOPOeboQJlakL/xuXnifi+d9Xx1bLEVZxTHhxzjsRZJXkn3dVob9gQhp+d1kFhs5rv9C6s1ufnjEjQDHhJ+bNXbOlJsprHfwyxdMAgrrHbzvcxONxXF7F6l47eRUaR+qqq4BWgwCO85+5KjeyMm7Jraf62DnhU5aDZMA3KodJByR0DSNmjdDCFML7L/Wy4IYQReNxUm52oXB7sEzG6Lb5sEx7uNgXi8pOT04JuYwO308bB3mrclNfbuTFoNAWoGJmLSCzusPcij3M6GlGJUvhzDYpymuH6Tvq5cDuX0cKzHjW1jCMxtk1DWPecRLZqkFfcPwmoNgOMrhgl5m5sJJu2UNVqZnRY7oLaSXWDlRZuFGjZ3LlVYOFpg5c6+fxVB0XeLjV07OP7LwosfFs7YxGjvGsI3Nkl5iJTW/nz3Zvey+1Mm+rA7y6uyEI9LGNWqahlOY59Ogh1HXPAA51Va2ne4gv86GazqQlPhn/fMOFCXB3qxOMu+YCASXud80RNFzC7Yx/9YAYijKrotd1LZP8OTtKG6viCSvcL16AGF6cXNATFohJbubqnffefruG+M/51FVlWaDQE3b+OYAgOyqQTKKTATEZT6YXQieAOXNIzR2Tf4N0DQNVVVZXV1FURQURcHrF8m4beTsgwFaewTKm0c4qjcy5RNJJBJJoTpN04jH40QiEUKhEKIoJuOemuFBs40rFWbuN9kYFzwEg0HC4TCSJK3/QiKRQJZlZFkmHo//N7IsI0kSiqKgaRq/AbKDgxgo7zYPAAAAAElFTkSuQmCC</os:Image>
<os:Url type="text/html" method="GET" template="http://trisquel.info/search/node/{searchTerms}?page={startPage}">
</os:Url><os:Url type="application/rss+xml" method="GET" template="http://trisquel.info/opensearch/node/{searchTerms}?page={startPage}">
</os:Url>
</SearchPlugin>
EOF
echo "debian/search/* /usr/lib/abrowser-addons/searchplugins" >> debian/abrowser.install.in

# Disable search field at extensions panel
238 239
#sed  '/header-search/d; /search.placeholder/d' -i toolkit/mozapps/extensions/content/extensions.xul
cat << EOF >> toolkit/mozapps/extensions/content/extensions.css
240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259
#header-search {
  display:none;
}
EOF

find -wholename '*branding/brand.dtd' |xargs sed 's/trademarkInfo.part1.*/trademarkInfo.part1 "">/' -i

for STRING in community.end3 community.exp.end community.start2 community.mozillaLink community.middle2 community.creditsLink community.end2 contribute.start contribute.getInvolvedLink contribute.end channel.description.start channel.description.end
do
 find -name aboutDialog.dtd | xargs sed -i "s/ENTITY $STRING.*/ENTITY $STRING \"\">/"
done

for STRING in rights.intro-point3-unbranded rights.intro-point4a-unbranded rights.intro-point4b-unbranded rights.intro-point4c-unbranded
do
 find -name aboutRights.dtd | xargs sed -i "s/ENTITY $STRING.*/ENTITY $STRING \"\">/"
done

replace www.mozilla.com/abrowser/central trisquel.info/browser
replace www.mozilla.com/legal/privacy trisquel.info/legal

260
sed -i 's/<a\ href\=\"http\:\/\/www.mozilla.org\/\">Mozilla\ Project<\/a>/<a\ href\=\"http\:\/\/www.trisquel.info\/\"\>Trisquel\ Project<\/a>/g' browser/base/content/overrides/app-license.html
261 262 263 264 265 266 267 268

# We went too far...
replace "Trisquel Public" "Mozilla Public" .
replace "Trisquel Foundation" "Mozilla Foundation" .
replace "Trisquel Corporation" "Mozilla Corporation" .
sed -i 's/iceweasel, abrowser, icecat,/iceweasel, firefox, icecat,/g' debian/control*

# Restore useragent to Firefox
269
sed '/MOZ_UA_ABROWSER_VERSION/ s:Abrowser/:Firefox/:;' -i netwerk/protocol/http/nsHttpHandler.cpp
270 271

# Set migrator scripts
272 273
cp browser/components/migration/src/FirefoxProfileMigrator.js browser/components/migration/src/AbrowserProfileMigrator.js
sed 's/Abrowser/Firefox/g; s/ABROWSER/FIREFOX/g; s/abrowser/firefox/g' -i browser/components/migration/src/FirefoxProfileMigrator.js
274

275 276
#tar -cjf $TARBALL mozilla
#rm mozilla -rf
277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301
#cp $DATA/control debian/control

# Postinst script to manage profile migration and system links
echo '

if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] ; then

[ -f /usr/bin/firefox ] || ln -s /usr/bin/abrowser /usr/bin/firefox

for HOMEDIR in $(grep :/home/ /etc/passwd |grep -v usbmux |grep -v syslog|cut -d : -f 6)
do
    [ -d $HOMEDIR/.mozilla/abrowser ] && continue || true
    [ -d $HOMEDIR/.mozilla/firefox ] || continue
    echo Linking $HOMEDIR/.mozilla/firefox into $HOMEDIR/.mozilla/abrowser
    ln -s $HOMEDIR/.mozilla/firefox $HOMEDIR/.mozilla/abrowser
done 
fi
exit 0 ' >> debian/abrowser.postinst.in

rm debian/control
debian/rules debian/control

changelog  "Rebranded for Trisquel"

compile