make-firefox 15.9 KB
Newer Older
1
#!/bin/bash
2
#
3
#    Copyright (C) 2008-2014  Ruben Rodriguez <ruben@trisquel.info>
Santiago Rodriguez's avatar
Santiago Rodriguez committed
4
#    Copyright (C) 2015       Santiago Rodriguez <santi@trisquel.info>
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#
#    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
#

21
VERSION=38
22 23 24

. ./config

25 26
rm debian/control

27
# revert https://bug851702.bugzilla.mozilla.org/attachment.cgi?id=733785
Ruben Rodriguez's avatar
Ruben Rodriguez committed
28
patch -p1 < $DATA/enable-js-options.patch
29

Ruben Rodriguez's avatar
Ruben Rodriguez committed
30 31 32
# js settings
cat $DATA/settings.js >> debian/vendor-firefox.js

33 34
# Replace ubufox recommendation
sed 's/xul-ext-ubufox/xul-ext-youtube-html5-video-player/' -i debian/control.in
35 36 37 38 39 40

sed '/mozilla.org\/legal/d' -i services/healthreport/healthreport-prefs.js
cat << EOF >>services/healthreport/healthreport-prefs.js
pref("datareporting.healthreport.infoURL", "https://trisquel.info/legal");
EOF

41
sed 's%https://www.mozilla.org/legal/privacy/%https://trisquel.info/legal%' -i ./modules/libpref/init/all.js ./browser/app/profile/firefox.js ./toolkit/content/aboutRights.xhtml
42 43 44

#sed 's%https://www.mozilla.org/firefox/central/%https://trisquel.info/browser%' -i browser/base/content/browser-appmenu.inc

45
# Enable gst support
46 47 48 49
[ $REVISION = "6.0" ] && apt-get install -y --force-yes libgstreamermm-0.10-dev
[ $REVISION = "6.0" ] && echo "ac_add_options --enable-gstreamer=0.10" >> debian/config/mozconfig.in
[ $REVISION = "7.0" ] && echo "ac_add_options --enable-gstreamer=1.0" >> debian/config/mozconfig.in
sed 's/1204/60/g; s/1210/65/g; s/1404/70/g' -i debian/config/mozconfig.in debian/firefox-dev.install.in debian/firefox-dev.links.in
50

51 52
sed 's/com.ubuntu/org.trisquel/' -i debian/config/mozconfig.in

53 54 55
# Locale packages should provide firefox-locale-$LANG
sed "s/Provides.*/Provides: firefox-locale-@LANGCODE@/" -i debian/control.langpacks

56
# Remove Ubuntu bookmarks
Ruben Rodriguez's avatar
Ruben Rodriguez committed
57
sed -i /ubuntu-bookmarks/d debian/patches/series
58 59 60
rm debian/patches/ubuntu-bookmarks*

#Unbrand url codes for google and amazon
61 62 63 64 65
find debian/searchplugins |grep google| xargs -i /bin/sed '/ubuntu/d; /channel/d' -i {}
find debian/searchplugins |grep duck| xargs -i /bin/sed 's/canonical/trisquel/' -i {}
find debian/searchplugins |grep amazon| xargs -i /bin/sed '/canoniccom/d;' -i {}

replace "mozilla.com/plugincheck" "trisquel.info/browser" .
66

Ruben Rodriguez's avatar
Ruben Rodriguez committed
67
# contact link
68
#sed 's_https://input.mozilla.org/feedback_https://trisquel.info/contact_' -i browser/base/content/utilityOverlay.js
Ruben Rodriguez's avatar
Ruben Rodriguez committed
69

70 71 72 73 74 75 76 77 78 79 80 81
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

Ruben Rodriguez's avatar
Ruben Rodriguez committed
82 83
sed  "s/^MOZ_APP_NAME\t.*/MOZ_APP_NAME\t\t:= abrowser/;" debian/build/config.mk -i
sed  "s/^MOZ_PKG_NAME\t.*/MOZ_PKG_NAME\t\t:= abrowser/;" debian/build/config.mk -i
84 85 86 87

############################################################################3
############################################################################3
############################################################################3
88
sed "s_^Maintainer.*_Maintainer: $DEBFULLNAME <$DEBEMAIL>_g" -i debian/control.in
89 90 91 92

# Replace Firefox branding
find -type d | grep firefox | xargs rename s/firefox/abrowser/
find -type f | grep firefox | xargs rename s/firefox/abrowser/
93
find -type f | grep Firefox | xargs rename s/Firefox/Abrowser/
94
replace(){
95
find $3 -type f |grep -v changelog |grep -v copyright | xargs -i sed -i s^"$1"^"$2"^g "{}"
96
}
97
replace "Mozilla Firefox" "Abrowser" .
98 99 100 101
replace firefox abrowser .
replace Firefox Abrowser .
replace FIREFOX ABROWSER .
replace " Mozilla " " Trisquel " .
102
sed -i '2s/^Source:.*/Source: firefox/' debian/control.in
103
replace PACKAGES/abrowser PACKAGES/firefox .
104 105
sed s/Trisquel/Mozilla/ python/compare-locales/scripts/compare-locales -i
sed s/Trisquel/Mozilla/ python/compare-locales/setup.py -i
106 107
replace "iceweasel, abrowser" "iceweasel, firefox" .
replace "Replaces: abrowser" "Replaces: firefox" .
108
#sed s/Ubuntu/Trisquel/g debian/rules -i
109
sed s/ubuntu/trisquel/g debian/distribution.ini -i
110
sed 's/ubuntu_version/trisquel_version/; s/Ubuntu 10.10/Trisquel 4.0/; s/1010/40/' -i debian/abrowser.postinst.in
111
replace "Adobe Flash" "Flash" .
112

113 114 115
# abrowser-dev should provide firefox-dev
sed '/Package: @MOZ_PKG_NAME@-dev/,/Description:/ s/Provides:/Provides:firefox-dev, /' debian/control.in -i

116
# Branding files
117
rm browser/branding/* -rf
118
cp -a $DATA/branding/ browser/branding/official
119
cat << EOF > debian/config/branch.mk
120
CHANNEL                 = release
121
MOZ_WANT_UNIT_TESTS     = 0
122
# MOZ_BUILD_OFFICIAL    = 1
123 124 125 126 127 128
MOZ_ENABLE_BREAKPAD     = 0

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

129 130 131 132 133 134
# Replace about:home
rm browser/base/content/abouthome -rf
cp $DATA/abouthome -a browser/base/content
sed '/mozilla.*png/d' -i ./browser/base/jar.mn

# Delete stuff we don't use and that may contain trademaked logos
Ruben Rodriguez's avatar
Ruben Rodriguez committed
135
rm -rf ./browser/metro ./addon-sdk/source/doc/static-files/media ./browser/themes/windows ./browser/themes/osx ./b2g
136 137

#Trisquel custom bookmarks
Ruben Rodriguez's avatar
Ruben Rodriguez committed
138
cp $DATA/bookmarks.html.in browser/locales/generic/profile/bookmarks.html.in
139 140 141 142 143 144 145 146 147

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>
148
<os:Url type="text/html" method="GET" template="http://duckduckgo.com/?t=trisquel&amp;q={searchTerms}">
149 150 151 152 153 154 155 156 157 158
</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>
159
<os:Url type="text/html" method="GET" template="https://duckduckgo.com/?t=trisquel&amp;q={searchTerms}">
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
</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

189 190 191 192
# install aboutabrowser extension
cp $DATA/aboutabrowser@trisquel.info -r debian
echo "debian/aboutabrowser@trisquel.info @MOZ_ADDONDIR@/extensions/" >> debian/abrowser.install.in

193 194 195 196 197 198 199
# Disable newtab "What is this" popup and config button
cat << EOF >> ./browser/base/content/newtab/newTab.css
#newtab.customize.what, #newtab.customize.button {
display:none;
}
EOF

200
# Disable search field at extensions panel
201 202
#sed  '/header-search/d; /search.placeholder/d' -i toolkit/mozapps/extensions/content/extensions.xul
cat << EOF >> toolkit/mozapps/extensions/content/extensions.css
203 204 205 206 207
#header-search {
  display:none;
}
EOF

208
find -wholename '*/brand.dtd' |xargs /bin/sed 's/trademarkInfo.part1.*/trademarkInfo.part1 "">/' -i
209 210 211 212 213 214 215 216 217 218 219 220 221 222

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

223
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
224 225 226 227 228

# We went too far...
replace "Trisquel Public" "Mozilla Public" .
replace "Trisquel Foundation" "Mozilla Foundation" .
replace "Trisquel Corporation" "Mozilla Corporation" .
Ruben Rodriguez's avatar
Ruben Rodriguez committed
229
replace "abrowser.com" "firefox.com" .
230
#sed -i 's/iceweasel, abrowser, icecat,/iceweasel, firefox, icecat,/g' debian/control.in
231
sed '/Provides/s/abrowser-locale/firefox-locale/' -i debian/control.langpacks
232 233

# Restore useragent to Firefox
234
sed '/MOZILLA_UAVERSION/ s:Abrowser/:Firefox/:' -i netwerk/protocol/http/nsHttpHandler.cpp
235 236

# Set migrator scripts
237
sed 's/Abrowser/Firefox/g; s/abrowser/firefox/g' -i browser/components/migration/AbrowserProfileMigrator.js
238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255

# 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

256 257
debian/rules debian/control
touch -d "yesterday" debian/control
258 259
debian/rules debian/control

260 261 262
# Regenerate addon-sdk/moz.build
./mach generate-addon-sdk-moz-build

263 264 265
#https://bugzilla.mozilla.org/show_bug.cgi?id=1047803
sed 's/--enable-optimize$/--enable-optimize="-O2"/' -i debian/config/mozconfig.in

266 267 268
changelog  "Rebranded for Trisquel"

compile