#Maintainer: Pedro Pinto (pnboy~AT~pinguix.com) #Anything commented out is optional and can be deleted. pkgname=iceweasel pkgver=2.0.0.14 pkgrel=1 zenver=52 arch=i486 source=(http://releases.mozilla.org/pub/mozilla.org/firefox/releases/$pkgver/source/firefox-$pkgver-source.tar.bz2 classic_firefox.jar mimeTypes.rdf.gz prefs.js.gz zenwalk.png zenwalk.src.gz iceweasel.desktop branding.tar.gz firefox-2.0-add-ldflags.patch remove.nonfree iceweasel firefox2iceweasel.patch) #docs=("readme" "install" "copying" "changelog" "authors" "news" "todo") slackdesc=\ ( #|-----handy-ruler------------------------------------------------------| "$pkgname (Iceweasel web browser)" "IceWeasel is the GNU version of the Firefox browser. Its main" "advantage is an ethical one: it is entirely free software. While the" "source code from the Mozilla project is free software, the binaries" "that they release include additional non-free software. Also, they" "distribute non-free software as plug-ins. (IceWeasel does keep the" "triple licensing used by Firefox to facilitate the reuse of code.)" ) build() { cd $startdir/src/mozilla sh $startdir/src/remove.nonfree patch -Np0 -i ${startdir}/src/firefox-2.0-add-ldflags.patch patch -Np1 -i ${startdir}/src/firefox2iceweasel.patch patch -Np0 -i ${startdir}/src/accelerators.patch cat <<'EOF' >>.mozconfig ac_add_options --prefix=/usr ac_add_options --mandir=/usr/man ac_add_options --infodir=/usr/info ac_add_options --enable-optimize="${CFLAGS} -freorder-blocks -fno-reorder-functions -gstabs+" ac_add_options --with-distribution-id=Zenwalk ac_add_options --disable-accessibility ac_add_options --disable-calendar ac_add_options --disable-chatzilla ac_add_options --disable-debug ac_add_options --disable-debug-modules ac_add_options --disable-gnomevfs ac_add_options --disable-gnomeui ac_add_options --disable-composer ac_add_options --disable-dtd-debug ac_add_options --disable-freetype2 ac_add_options --disable-installer ac_add_options --disable-ldap ac_add_options --disable-mailnews ac_add_options --disable-negotiateauth ac_add_options --disable-profilesharing ac_add_options --disable-shared ac_add_options --disable-tests ac_add_options --disable-toolkit-qt ac_add_options --disable-xprint ac_add_options --enable-application=browser ac_add_options --enable-canvas ac_add_options --enable-cookies ac_add_options --enable-crypto ac_add_options --enable-default-toolkit=gtk2 ac_add_options --enable-extensions="default,spellcheck" ac_add_options --enable-image-encoder=all ac_add_options --enable-image-decoder=all ac_add_options --enable-mathml ac_add_options --enable-pango ac_add_options --enable-postscript ac_add_options --enable-reorder ac_add_options --enable-safe-browsing ac_add_options --enable-single-profile ac_add_options --enable-static ac_add_options --enable-storage ac_add_options --enable-svg ac_add_options --enable-system-cairo ac_add_options --enable-toolkit-gtk2 ac_add_options --enable-url-classifier ac_add_options --enable-view-source ac_add_options --enable-xft ac_add_options --enable-xinerama ac_add_options --enable-xpctools ac_add_options --with-pthreads ac_add_options --with-system-jpeg ac_add_options --with-system-nspr ac_add_options --with-system-nss ac_add_options --with-system-png ac_add_options --with-system-zlib ac_add_options --with-user-appdir=.mozilla ac_cv_visibility_pragma=no EOF export MOZ_PROJECT=browser export MOZILLA_OFFICIAL=1 export BUILD_OFFICIAL=1 # make -f client.mk build || return 1 export MAKEFLAGS="-j1" ./configure make || return 1 (cd embedding/config make ) make DESTDIR=$startdir/pkg install MOZ_PKG_APPNAME="iceweasel" EXCLUDE_NSPR_LIBS=1 # build a iceweasel-devel package package2=$pkgname-devel-$pkgver-$arch-$zenver.$pkgrel [ -d $startdir/pkg2 ] && rm -rf $startdir/pkg2 mkdir -p $startdir/pkg2/usr/{share,lib} mv $startdir/pkg/usr/share/idl $startdir/pkg2/usr/share mv $startdir/pkg/usr/include $startdir/pkg2/usr/ mv $startdir/pkg/usr/lib/pkgconfig $startdir/pkg2/usr/lib/ cd $startdir/pkg2 mkdir -p $startdir/pkg2/install/ cat << EOF > $startdir/pkg2/install/slack-desc $pkgname-devel: $pkgname-devel (Development files for iceweasel) $pkgname-devel: $pkgname-devel: Development files for iceweasel. EOF /sbin/makepkg -l y -c n $startdir/$package2.tgz cd $startdir md5sum $package2.tgz > $startdir/$package2.md5 #empty dep file echo "">$startdir/$package2.dep rm -rvf $startdir/pkg2 unset package2 mkdir -p $startdir/pkg/usr/lib/mozilla/plugins mkdir -p $startdir/pkg/usr/bin cp $startdir/src/iceweasel $startdir/pkg/usr/bin chmod +x $startdir/pkg/usr/bin/iceweasel # compability link ( cd $startdir/pkg/usr/bin ; ln -sf iceweasel firefox ) # add symlink to fix plugin-dirs # and move /usr/lib so we don't break plugins with version updates ( cd $startdir/pkg/usr/lib/; ln -s $pkgname firefox ; ln -s $pkgname $pkgname-$pkgver ) #for java plugin ( cd $startdir/pkg/usr/lib/$pkgname ; rm -rf plugins ) ( cd $startdir/pkg/usr/lib/$pkgname ; ln -sf ../mozilla/plugins plugins ) # Replace included dictionaries with a link to zenwalk's dictionaries ( cd $startdir/pkg/usr/lib/$pkgname ln -s firefox-bin iceweasel-bin rm -rf dictionaries ln -s ../../share/myspell dictionaries # compability link for run-mozilla.sh ln -s run-mozilla.sh run-iceweasel.sh # default icons for application mkdir -p chrome/icons/default/ cp $startdir/src/*.xpm chrome/icons/default/ cp $startdir/src/*.xpm icons/ cp $startdir/src/document.png icons/ ) mkdir -p $startdir/pkg/usr/share/icons/hicolor/{16x16,32x32,48x48,64x64,128x128}/apps/ size="16x16 32x32 48x48 64x64 128x128" for i in $size; do cp $startdir/src/iceweasel_${i%x*}.png $startdir/pkg/usr/share/icons/hicolor/$i/apps/iceweasel.png done # fix browser.jar (cd $startdir/src/ mkdir -p browser cd browser jar xf $startdir/pkg/usr/lib/$pkgname/chrome/browser.jar cp $startdir/src/about.png $startdir/src/aboutCredits.png $startdir/src/aboutFooter.png $startdir/src/icon48.png $startdir/src/icon64.png $startdir/src/browser/content/branding jar cfM $startdir/pkg/usr/lib/$pkgname/chrome/browser.jar . ) # remove inspector extension rm -rf $startdir/pkg/usr/lib/$pkgname/extensions/inspector* if [ -f $startdir/src/prefs.js.gz ]; then zcat $startdir/src/prefs.js.gz > $startdir/pkg/usr/lib/$pkgname/defaults/profile/prefs.js fi if [ -f $startdir/src/mimeTypes.rdf.gz ]; then zcat $startdir/src/mimeTypes.rdf.gz > $startdir/pkg/usr/lib/$pkgname/defaults/profile/mimeTypes.rdf fi # add zenwalk plugins for searchbox if [ -f $startdir/src/zenwalk.src.gz ]; then if [ -d $startdir/pkg/usr/lib/$pkgname/searchplugins/ ]; then zcat $startdir/src/zenwalk.src.gz > $startdir/pkg/usr/lib/$pkgname/searchplugins/zenwalk.src cp $startdir/src/zenwalk.png $startdir/pkg/usr/lib/$pkgname/searchplugins fi fi if [ -f $startdir/src/classic_firefox.jar ]; then cp $startdir/src/classic_firefox.jar $startdir/pkg/usr/lib/$pkgname/chrome/classic.jar fi # patches for locales cd $startdir/pkg/usr/lib/$pkgname/ sed -i -e 's|pref("startup.homepage_override_url","http://gnuzilla.gnu.org");|// pref("startup.homepage_override_url","http://gnuzilla.gnu.org");|g' defaults/pref/firefox-branding.js sed -i -e 's|pref("startup.homepage_welcome_url","http://gnuzilla.gnu.org");|// pref("startup.homepage_welcome_url","http://gnuzilla.gnu.org");|g' defaults/pref/firefox-branding.js sed -i -e 's|pref("app.update.url.manual", "http://gnuzilla.gnu.org");|// pref("app.update.url.manual", "http://gnuzilla.gnu.org");|g' defaults/pref/firefox-branding.js sed -i -e 's|pref("app.update.url.details", "http://gnuzilla.gnu.org");|// pref("app.update.url.details", "http://gnuzilla.gnu.org");|g' defaults/pref/firefox-branding.js sed -i -e 's|pref("app.releaseNotesURL", "http://gnuzilla.gnu.org");|// pref("app.releaseNotesURL", "http://gnuzilla.gnu.org");|g' defaults/pref/firefox-branding.js sed -i -e 's|browser.startup.homepage=http://gnuzilla.gnu.org/|browser.startup.homepage=http://www.zenwalk.org/|g' browserconfig.properties sed -i -e '/pref("general.useragent.locale", "en-US");/d' defaults/pref/firefox-l10n.js sed -i -e '/pref("general.useragent.locale", "en-US");/d' defaults/pref/firefox.js sed -i -e "s|pref(\"general.useragent.extra.firefox\", \"BonEcho/$pkgver\");|pref(\"general.useragent.extra.firefox\", \"IceWeasel/$pkgver\");|g" defaults/pref/firefox.js sed -i -e 's|pref("general.useragent.locale", "chrome://navigator/locale/navigator.properties");|pref("general.useragent.locale", "chrome://global/locale/intl.properties");|g' greprefs/all.js sed -i -e 's|pref("general.useragent.contentlocale", "chrome://navigator-region/locale/region.properties");|pref("general.useragent.contentlocale", "chrome://browser-region/locale/region.properties");|g' greprefs/all.js sed -i -e 's/pref("intl.locale.matchOS", false);/pref("intl.locale.matchOS", true);/g' greprefs/all.js echo "// Zenwalk package version" > defaults/pref/vendor.js echo "pref(\"general.useragent.extra.firefoxComment\",\"(Zenwalk GNU Linux)\");" >> defaults/pref/vendor.js mkdir -p $startdir/pkg/etc/ld.so.conf.d/ echo "/usr/lib/iceweasel" > $startdir/pkg/etc/ld.so.conf.d/iceweasel.conf echo 'pref("network.protocol-handler.app.mailto", "icedove");' >> $startdir/pkg/usr/lib/firefox/greprefs/all.js mkdir -p $startdir/pkg/usr/man/man1 cp $startdir/src/mozilla/iceweasel.1 $startdir/pkg/usr/man/man1 }