Skip to content
Snippets Groups Projects
Forked from trisquel / package-helpers
1892 commits behind the upstream repository.
make-icecat 2.24 KiB
#!/bin/sh
#
#    Copyright (C) 2015  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
#

VERSION=1
EXTERNAL='deb-src http://devel.trisquel.info/icecat/repo GNU main'
SIGNKEY="D7E04784"

. ./config

ICEATVERSION=$(head -n1 debian/changelog |sed 's/.*(//; s/).*//')

cat << EOF >> browser/app/profile/icecat.js
// Preferences for the Get Add-ons panel
pref ("extensions.webservice.discoverURL", "https://trisquel.info/browser-plain");
pref ("extensions.getAddons.search.url", "https://trisquel.info/browser-plain");

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

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

find . -type f |grep duckduckgo |xargs sed -i '/value/s/gnu/trisquel/'

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

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

cp $DATA/searchplugins/* debian/searchplugins
cp $DATA/aboutIceCat.xhtml extensions/gnu/abouticecat@gnu.org/chrome/content/aboutIceCat/aboutIceCat.xhtml
cp $DATA/bookmarks.html.in browser/locales/generic/profile/bookmarks.html.in
cp $DATA/aboutHome.xhtml browser/base/content/abouthome/aboutHome.xhtml

changelog "Customized for Trisquel"

compile