wok-6.x annotate firefox/receipt @ rev 5001

[f-g]*: update depends
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Feb 28 15:33:01 2010 +0100 (2010-02-28)
parents fb8aceda65ff
children 9b1b236344a6
rev   line source
pankso@45 1 # SliTaz package receipt.
pankso@45 2
pankso@45 3 PACKAGE="firefox"
pankso@4752 4 VERSION="3.5.7"
pankso@197 5 CATEGORY="network"
pankso@45 6 SHORT_DESC="User friendly, secure and fast web browser."
pankso@45 7 MAINTAINER="pankso@slitaz.org"
pascal@5001 8 DEPENDS="gtk+ sqlite dbus dbus-glib glib jpeg xorg-libX11 xorg-libXdamage alsa-lib xorg-libXt"
pankso@4636 9 BUILD_DEPENDS="xorg-dev gtk+-dev zip libIDL coreutils findutils xorg-libXft-dev \
pankso@4636 10 dbus-dev dbus-glib-dev alsa-lib-dev"
pankso@4079 11 TARBALL="$PACKAGE-$VERSION.source.tar.bz2"
pankso@45 12 WEB_SITE="http://www.mozilla.org/"
pankso@4079 13 WGET_URL="http://releases.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/source/$TARBALL"
pascal@1431 14 CONFIG_FILES="/etc/firefox"
jozee@4936 15 TAGS="browser"
pankso@45 16
pankso@45 17 # Rules to configure and make the package.
pankso@45 18 #
pankso@45 19 # A long compile time... dont forget to build libidl before and check the
pankso@45 20 # .mozconfig file from the stuff and the stuff/README document.
pankso@45 21 #
pankso@45 22 compile_rules()
pankso@45 23 {
pankso@45 24 # Move the mozilla source tree to $PACKAGE-$VERSION to keep variables
pankso@45 25 # and to have a nice clean.
pankso@3818 26 mv mozilla-* $PACKAGE-$VERSION 2>/dev/null
pankso@45 27 cp -a stuff/firefox.mozconfig $src/.mozconfig
pankso@45 28 cd $src
pascal@4509 29 sed -i 's/xtype/type/' toolkit/mozapps/installer/packager.mk
pascal@2486 30 ./configure $CONFIGURE_ARGS &&
pascal@2486 31 make &&
pankso@45 32 make DESTDIR=$PWD/_pkg install
pankso@45 33 }
pankso@45 34
pankso@45 35 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@45 36 genpkg_rules()
pankso@45 37 {
pankso@629 38 mkdir -p $fs/usr/lib $fs/usr/share $fs/etc
pankso@45 39 cp -a $_pkg/usr/bin $fs/usr
pankso@922 40 cp -a $_pkg/usr/lib/$PACKAGE-$VERSION $fs/usr/lib
pankso@45 41
pankso@2748 42 # Home page, bookmarks file and branding.
pankso@922 43 cp -a stuff/browserconfig.properties $fs/usr/lib/$PACKAGE-$VERSION
pankso@2748 44 cp -a stuff/bookmarks.html \
pankso@2748 45 $fs/usr/lib/$PACKAGE-$VERSION/defaults/profile
pankso@197 46 cp -a stuff/firefox-branding.js \
pankso@922 47 $fs/usr/lib/$PACKAGE-$VERSION/defaults/pref/
pankso@45 48
pankso@45 49 # User preference.
pankso@922 50 cp -a stuff/prefs.js $fs/usr/lib/$PACKAGE-$VERSION/defaults/profile
pankso@45 51 cp -a stuff/userChrome.css \
pankso@922 52 $fs/usr/lib/$PACKAGE-$VERSION/defaults/profile/chrome
pankso@45 53
pankso@45 54 # Move default config to /etc/firefox (/usr maybe read-only)
pascal@1431 55 for i in defaults browserconfig.properties ; do
pascal@1431 56 mv -f $fs/usr/lib/$PACKAGE-$VERSION/$i $fs/etc/$PACKAGE
pascal@1431 57 done
pascal@1723 58 ln -s /etc/$PACKAGE/browserconfig.properties $fs/usr/lib/$PACKAGE-$VERSION
pascal@1724 59 ln -s /etc/$PACKAGE $fs/usr/lib/$PACKAGE-$VERSION/defaults
pankso@3818 60
pankso@921 61 # EULA is accepted by SliTaz project.
pankso@921 62 sed -i s:'pref("browser.EULA.3.accepted", false);':'pref("browser.EULA.3.accepted", true);': \
pankso@921 63 $fs/etc/firefox/pref/firefox.js
pankso@840 64
pankso@45 65 # Locale fr
pankso@45 66 tar xjf stuff/langpack-fr@firefox.mozilla.org.tar.bz2 \
pascal@1709 67 -C $fs/usr/lib/$PACKAGE-$VERSION/extensions
pankso@3818 68 #sed -i "s/maxVersion>3.0../maxVersion>$VERSION/" \
pankso@3818 69 # $fs/usr/lib/$PACKAGE-$VERSION/extensions/langpack*/install.rdf
pankso@3818 70
pankso@629 71 # Search Plugin (by: oddball)
pankso@1018 72 cp -a stuff/searchplugins $fs/usr/lib/firefox-$VERSION/
pankso@629 73 chown -R root.root $fs
pankso@840 74
pankso@45 75 # Remove unnecessary files.
pankso@922 76 rm -rf $fs/usr/lib/$PACKAGE-$VERSION/dictionaries/*
pankso@922 77 rm -rf $fs/usr/lib/$PACKAGE-$VERSION/icons
pankso@922 78 rm -rf $fs/usr/lib/$PACKAGE-$VERSION/libsqlite3.so
pankso@45 79 }
pankso@45 80
pankso@45 81 # Pre - Post install command to set default locale.
pankso@45 82 pre_install()
pankso@45 83 {
pankso@45 84 local root
pankso@45 85 root=$1
pascal@1702 86 # Get old plugins
pascal@1702 87 mkdir /tmp/firefox-plugins-$$
pascal@1702 88 cp -a $root/usr/lib/firefox-*/plugins/* /tmp/firefox-plugins-$$ 2> /dev/null
pankso@2748 89 # Remove old libs and configs
pankso@45 90 rm -rf $root/usr/lib/firefox-*
pankso@2748 91 rm -rf $root/etc/firefox
pankso@45 92 }
pankso@45 93 post_install()
pankso@45 94 {
pankso@45 95 local root
pankso@45 96 root=$1
pankso@1018 97 if grep -q "fr_*" $root/etc/locale.conf 2>/dev/null; then
pankso@629 98 sed -i 's/en-US/fr/' \
pankso@840 99 $root/etc/firefox/pref/firefox-l10n.js
pankso@45 100 fi
pascal@1702 101 for i in /tmp/firefox-plugins-$$/* ; do
pascal@1702 102 [ -e $i ] || continue
pascal@1702 103 [ -e /usr/lib/firefox-*/plugins/$(basename $i) ] && continue
pascal@1702 104 cp -a $i /usr/lib/firefox-*/plugins/
pascal@1702 105 done
pascal@1702 106 rm -rf /tmp/firefox-plugins-$$
pankso@45 107 }