wok-next annotate firefox/receipt @ rev 13061

Up: geany to 1.22.
author Christopher Rogers <slaxemulator@gmail.com>
date Wed Jun 20 17:19:35 2012 +0000 (2012-06-20)
parents e3a991321740
children 6b09507225ec
rev   line source
pankso@45 1 # SliTaz package receipt.
pankso@45 2
pankso@45 3 PACKAGE="firefox"
pankso@11810 4 VERSION="10.0.2"
pankso@197 5 CATEGORY="network"
pankso@45 6 SHORT_DESC="User friendly, secure and fast web browser."
pankso@45 7 MAINTAINER="pankso@slitaz.org"
pankso@4079 8 TARBALL="$PACKAGE-$VERSION.source.tar.bz2"
pankso@45 9 WEB_SITE="http://www.mozilla.org/"
slaxemulator@11324 10 #WGET_URL="http://releases.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/source/$TARBALL"
slaxemulator@11324 11 WGET_URL="ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/source/$TARBALL"
pascal@1431 12 CONFIG_FILES="/etc/firefox"
jozee@4936 13 TAGS="browser"
pankso@45 14
pankso@10737 15 DEPENDS="gtk+ sqlite dbus dbus-glib glib jpeg xorg-libX11 xorg-libXdamage \
slaxemulator@11324 16 alsa-lib xorg-libXt libfirefox libevent libvpx"
slaxemulator@11324 17 BUILD_DEPENDS="zip libIDL coreutils findutils wireless_tools-dev \
pascal@12628 18 perl python yasm alsa-lib-dev mesa-dev libevent-dev libvpx-dev dbus-dev \
pascal@12628 19 dbus-glib-dev gtk+-dev glib-dev"
pankso@10737 20
pankso@45 21 # Rules to configure and make the package.
pankso@45 22 #
pankso@45 23 # A long compile time... dont forget to build libidl before and check the
pankso@45 24 # .mozconfig file from the stuff and the stuff/README document.
pankso@45 25 #
pankso@45 26 compile_rules()
pankso@45 27 {
slaxemulator@9382 28 cp -a $stuff/firefox.mozconfig $src/.mozconfig
pankso@45 29 cd $src
slaxemulator@11324 30 patch -Np1 -i $stuff/mozilla-firefox-1.0-lang.patch
slaxemulator@11324 31 patch -Np1 -i $stuff/firefox-install-dir.patch
slaxemulator@11324 32
slaxemulator@11324 33 # Fix PRE_RELEASE_SUFFIX
slaxemulator@11324 34 sed -i '/^PRE_RELEASE_SUFFIX := ""/s/ ""//' \
slaxemulator@11324 35 browser/base/Makefile.in
slaxemulator@11324 36
slaxemulator@11324 37 # Don't generate startup cache. Unbreaks build
slaxemulator@11324 38 sed -i 's/^GENERATE_CACHE ?=.*/GENERATE_CACHE = true/' \
slaxemulator@11324 39 toolkit/mozapps/installer/packager.mk
pascal@2486 40 ./configure $CONFIGURE_ARGS &&
gokhlayeh@11573 41 make $MAKEFLAGS &&
pankso@10737 42 make DESTDIR=$DESTDIR install &&
pankso@10737 43 cp -a xpcom/typelib $DESTDIR
pankso@45 44 }
pankso@45 45
pankso@45 46 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@45 47 genpkg_rules()
pankso@45 48 {
slaxemulator@11324 49 mkdir -p $fs/usr/lib/$PACKAGE \
slaxemulator@11324 50 $fs/usr/share $fs/etc/$PACKAGE/profile/chrome
pankso@45 51 cp -a $_pkg/usr/bin $fs/usr
slaxemulator@11324 52 cp -a $_pkg/usr/lib/$PACKAGE $fs/usr/lib
pankso@45 53
pankso@2748 54 # Home page, bookmarks file and branding.
slaxemulator@11324 55 cp -a $stuff/browserconfig.properties $fs/etc/$PACKAGE
slaxemulator@9382 56 cp -a $stuff/bookmarks.html \
slaxemulator@11324 57 $fs/etc/$PACKAGE/profile
slaxemulator@11324 58 mkdir -p $fs/etc/$PACKAGE/pref
slaxemulator@9382 59 cp -a $stuff/firefox-branding.js \
slaxemulator@11324 60 $fs/etc/$PACKAGE/pref/firefox.js
pankso@45 61
pankso@45 62 # User preference.
slaxemulator@11324 63 cp -a $stuff/prefs.js $fs/etc/$PACKAGE/profile
slaxemulator@9382 64 cp -a $stuff/userChrome.css \
slaxemulator@11324 65 $fs/etc/$PACKAGE/profile/chrome
slaxemulator@9382 66
slaxemulator@9603 67 # added firefox-l10n.js to stuff to make sure its copyed for langpacks
slaxemulator@9603 68 cp -a $stuff/firefox-l10n.js \
slaxemulator@11324 69 $fs/etc/$PACKAGE/pref/firefox-l10n.js
slaxemulator@9382 70
slaxemulator@11324 71 rm -rf $fs/usr/lib/$PACKAGE/defaults
slaxemulator@11324 72
slaxemulator@11324 73 ln -sf /etc/$PACKAGE/browserconfig.properties $fs/usr/lib/$PACKAGE
slaxemulator@11324 74 ln -sf /etc/$PACKAGE $fs/usr/lib/$PACKAGE/defaults
pankso@3818 75
pankso@921 76 # EULA is accepted by SliTaz project.
pankso@921 77 sed -i s:'pref("browser.EULA.3.accepted", false);':'pref("browser.EULA.3.accepted", true);': \
pankso@921 78 $fs/etc/firefox/pref/firefox.js
pankso@840 79
pankso@629 80 # Search Plugin (by: oddball)
slaxemulator@11324 81 cp -a $stuff/searchplugins $fs/usr/lib/firefox/
pankso@629 82 chown -R root.root $fs
pankso@840 83
pankso@45 84 # Remove unnecessary files.
slaxemulator@11324 85 rm -rf $fs/usr/lib/$PACKAGE/dictionaries/*
slaxemulator@11324 86 rm -rf $fs/usr/lib/$PACKAGE/icons
jozee@5038 87 # split firefox libs
slaxemulator@11324 88 rm -rf $fs/usr/lib/$PACKAGE/*.so
jozee@5038 89 #retain big firefox libs
slaxemulator@11324 90 cp -a $_pkg/usr/lib/$PACKAGE/libxul.so \
slaxemulator@11324 91 $fs/usr/lib/$PACKAGE
slaxemulator@11324 92 #workaround for now
slaxemulator@11324 93 #https://bugzilla.mozilla.org/show_bug.cgi?id=658850
slaxemulator@11324 94 ln -sf firefox $fs/usr/lib/$PACKAGE/firefox-bin
pankso@45 95 }
pankso@45 96
pankso@45 97 # Pre - Post install command to set default locale.
pankso@45 98 pre_install()
pankso@45 99 {
pankso@45 100 local root
pankso@45 101 root=$1
pascal@1702 102 # Get old plugins
pascal@1702 103 mkdir /tmp/firefox-plugins-$$
slaxemulator@11324 104 cp -a $root/usr/lib/firefox/plugins/* /tmp/firefox-plugins-$$ 2> /dev/null
pankso@2748 105 # Remove old libs and configs
slaxemulator@11324 106 rm -rf $root/usr/lib/firefox/plugins
slaxemulator@11324 107 rm -rf $root/usr/lib/firefox/dictionaries
pankso@2748 108 rm -rf $root/etc/firefox
pankso@45 109 }
pankso@45 110 post_install()
pankso@45 111 {
pankso@45 112 local root
pankso@45 113 root=$1
pankso@1018 114 if grep -q "fr_*" $root/etc/locale.conf 2>/dev/null; then
pankso@629 115 sed -i 's/en-US/fr/' \
pankso@840 116 $root/etc/firefox/pref/firefox-l10n.js
pankso@45 117 fi
pascal@1702 118 for i in /tmp/firefox-plugins-$$/* ; do
pascal@1702 119 [ -e $i ] || continue
slaxemulator@11324 120 [ -e /usr/lib/firefox/plugins/$(basename $i) ] && continue
slaxemulator@11324 121 cp -a $i /usr/lib/firefox/plugins/
pascal@1702 122 done
pascal@1702 123 rm -rf /tmp/firefox-plugins-$$
pankso@45 124 }