#Maintainer: Pedro Pinto (pnboy~AT~pinguix.com) #Anything commented out is optional and can be deleted. pkgname=iceweasel pkgver=3.5.2 pkgrel=1 zenver=62 arch=i486 source=(http://releases.mozilla.org/pub/mozilla.org/firefox/releases/$pkgver/source/firefox-$pkgver-source.tar.bz2 http://pnboy.pinguix.com/my_packages/zenwalk/$pkgname/$pkgver/mimeTypes.rdf.gz http://pnboy.pinguix.com/my_packages/zenwalk/$pkgname/$pkgver/prefs.js.gz http://pnboy.pinguix.com/my_packages/zenwalk/$pkgname/$pkgver/zenwalk.png http://pnboy.pinguix.com/my_packages/zenwalk/$pkgname/$pkgver/zenwalk.src.gz http://pnboy.pinguix.com/my_packages/zenwalk/$pkgname/$pkgver/iceweasel.desktop http://pnboy.pinguix.com/my_packages/zenwalk/$pkgname/$pkgver/branding.tar.bz2 http://pnboy.pinguix.com/my_packages/zenwalk/$pkgname/$pkgver/iceweasel http://pnboy.pinguix.com/my_packages/zenwalk/$pkgname/$pkgver/iceweasel.1 http://pnboy.pinguix.com/my_packages/zenwalk/$pkgname/$pkgver/remove.nonfree http://pnboy.pinguix.com/my_packages/zenwalk/$pkgname/$pkgver/iceweasel-branding.patch) sourcetemplate=http://pnboy.pinguix.com/my_packages/zenwalk/$pkgname/$pkgver/ #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() { mv $startdir/src/mozilla-1.9.1/* $startdir/src/mozilla mv $startdir/src/mozilla-1.9.1/.* $startdir/src/mozilla cd $startdir/src/mozilla sh $startdir/src/remove.nonfree # patch -Np1 -i ${startdir}/src/iceweasel-branding.patch cp $startdir/src/*.png zenwalk/branding cp $startdir/src/*.png zenwalk/branding/content cp $startdir/src/*.xpm zenwalk/branding #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-composer #ac_add_options --disable-crashreporter #ac_add_options --disable-debug #ac_add_options --disable-freetype2 #ac_add_options --disable-installer #ac_add_options --disable-jsd #ac_add_options --disable-ldap #ac_add_options --disable-logging #ac_add_options --disable-mailnews #ac_add_options --disable-mathml #ac_add_options --disable-negotiateauth #ac_add_options --disable-profilesharing #ac_add_options --disable-tests #ac_add_options --disable-toolkit-qt #ac_add_options --disable-updater #ac_add_options --disable-xinerama #ac_add_options --disable-xprint #ac_add_options --enable-application=browser #ac_add_options --enable-crypto #ac_add_options --enable-default-toolkit=cairo-gtk2 #ac_add_options --enable-extensions="default,spellcheck,cookie,xml-rpc,xmlextras,pref,universalchardet,webservices" #ac_add_options --enable-gnomevfs #ac_add_options --enable-single-profile #ac_add_options --enable-static #ac_add_options --enable-strip #ac_add_options --enable-system-cairo #ac_add_options --enable-xft #ac_add_options --with-branding=zenwalk/branding #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 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-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=cairo-gtk2 ac_add_options --enable-extensions="default,spellcheck,cookie,pref,universalchardet" ac_add_options --enable-gnomevfs 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-cairo-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 --enable-xpfe-components ac_add_options --with-branding=zenwalk/branding 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 # remove devel stuff, already provided by xulrunner rm -rf $startdir/pkg/usr/share/idl rm -rf $startdir/pkg/usr/include rm -rf $startdir/pkg/usr/lib/pkgconfig rm -rf $startdir/pkg/usr/lib/firefox-devel-$pkgver mkdir -p $startdir/pkg/usr/lib/mozilla/plugins mkdir -p $startdir/pkg/usr/bin rm $startdir/pkg/usr/bin{iceweasel,firefox} 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/; mv firefox-$pkgver $pkgname ; ln -s $pkgname firefox ; ln -s $pkgname $pkgname-$pkgver ) #( cd $startdir/pkg/usr/lib/; mv $pkgname-$pkgver $pkgname ; 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 iceweasel-bin firefox-bin 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 # hide set as desktop background echo '#context-setDesktopBackground{ display: none !important; }' >> content/browser/browser.css 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 ]; then cp $startdir/src/prefs.js $startdir/pkg/usr/lib/$pkgname/defaults/profile/prefs.js fi if [ -f $startdir/src/mimeTypes.rdf ]; then cp $startdir/src/mimeTypes.rdf $startdir/pkg/usr/lib/$pkgname/defaults/profile/mimeTypes.rdf fi # add zenwalk plugins for searchbox if [ -f $startdir/src/zenwalk.src ]; then if [ -d $startdir/pkg/usr/lib/$pkgname/searchplugins/ ]; then cp $startdir/src/zenwalk.src $startdir/pkg/usr/lib/$pkgname/searchplugins/zenwalk.src cp $startdir/src/zenwalk.png $startdir/pkg/usr/lib/$pkgname/searchplugins fi fi # disable for now #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/ rm defaults/pref/firefox-branding.js echo 'browser.startup.homepage=http://www.zenwalk.org/' > 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 echo 'pref("browser.EULA.override", true);' >> 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");' >> greprefs/all.js mkdir -p $startdir/pkg/usr/man/man1 cp $startdir/src/iceweasel.1 $startdir/pkg/usr/man/man1 cp $startdir/pkg/usr/lib/iceweasel/chrome/icons/default/mozicon50.xpm $startdir/pkg/usr/lib/iceweasel/chrome/icons/default/main-window.xpm }