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