wok-current view firefox/receipt @ rev 4375

emacs: fix depends
author Paul Issott <paul@slitaz.org>
date Sun Oct 11 13:56:43 2009 +0000 (2009-10-11)
parents d5af93bdf051
children 4b16c8ec84b1
line source
1 # SliTaz package receipt.
3 PACKAGE="firefox"
4 VERSION="3.5.3"
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"
9 BUILD_DEPENDS="xorg-dev gtk+-dev zip libIDL coreutils findutils xorg-libXft-dev dbus-dev dbus-glib-dev alsa-lib-dev"
10 TARBALL="$PACKAGE-$VERSION.source.tar.bz2"
11 WEB_SITE="http://www.mozilla.org/"
12 WGET_URL="http://releases.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/source/$TARBALL"
13 CONFIG_FILES="/etc/firefox"
15 # Rules to configure and make the package.
16 #
17 # A long compile time... dont forget to build libidl before and check the
18 # .mozconfig file from the stuff and the stuff/README document.
19 #
20 compile_rules()
21 {
22 # Move the mozilla source tree to $PACKAGE-$VERSION to keep variables
23 # and to have a nice clean.
24 mv mozilla-* $PACKAGE-$VERSION 2>/dev/null
25 cp -a stuff/firefox.mozconfig $src/.mozconfig
26 cd $src
27 ./configure $CONFIGURE_ARGS &&
28 make &&
29 make DESTDIR=$PWD/_pkg install
30 }
32 # Rules to gen a SliTaz package suitable for Tazpkg.
33 genpkg_rules()
34 {
35 mkdir -p $fs/usr/lib $fs/usr/share $fs/etc
36 cp -a $_pkg/usr/bin $fs/usr
37 cp -a $_pkg/usr/lib/$PACKAGE-$VERSION $fs/usr/lib
39 # Home page, bookmarks file and branding.
40 cp -a stuff/browserconfig.properties $fs/usr/lib/$PACKAGE-$VERSION
41 cp -a stuff/bookmarks.html \
42 $fs/usr/lib/$PACKAGE-$VERSION/defaults/profile
43 cp -a stuff/firefox-branding.js \
44 $fs/usr/lib/$PACKAGE-$VERSION/defaults/pref/
46 # User preference.
47 cp -a stuff/prefs.js $fs/usr/lib/$PACKAGE-$VERSION/defaults/profile
48 cp -a stuff/userChrome.css \
49 $fs/usr/lib/$PACKAGE-$VERSION/defaults/profile/chrome
51 # Move default config to /etc/firefox (/usr maybe read-only)
52 for i in defaults browserconfig.properties ; do
53 mv -f $fs/usr/lib/$PACKAGE-$VERSION/$i $fs/etc/$PACKAGE
54 done
55 ln -s /etc/$PACKAGE/browserconfig.properties $fs/usr/lib/$PACKAGE-$VERSION
56 ln -s /etc/$PACKAGE $fs/usr/lib/$PACKAGE-$VERSION/defaults
58 # EULA is accepted by SliTaz project.
59 sed -i s:'pref("browser.EULA.3.accepted", false);':'pref("browser.EULA.3.accepted", true);': \
60 $fs/etc/firefox/pref/firefox.js
62 # Locale fr
63 tar xjf stuff/langpack-fr@firefox.mozilla.org.tar.bz2 \
64 -C $fs/usr/lib/$PACKAGE-$VERSION/extensions
65 #sed -i "s/maxVersion>3.0../maxVersion>$VERSION/" \
66 # $fs/usr/lib/$PACKAGE-$VERSION/extensions/langpack*/install.rdf
68 # Search Plugin (by: oddball)
69 cp -a stuff/searchplugins $fs/usr/lib/firefox-$VERSION/
70 chown -R root.root $fs
72 # Remove unnecessary files.
73 rm -rf $fs/usr/lib/$PACKAGE-$VERSION/dictionaries/*
74 rm -rf $fs/usr/lib/$PACKAGE-$VERSION/icons
75 rm -rf $fs/usr/lib/$PACKAGE-$VERSION/libsqlite3.so
76 }
78 # Pre - Post install command to set default locale.
79 pre_install()
80 {
81 local root
82 root=$1
83 # Get old plugins
84 mkdir /tmp/firefox-plugins-$$
85 cp -a $root/usr/lib/firefox-*/plugins/* /tmp/firefox-plugins-$$ 2> /dev/null
86 # Remove old libs and configs
87 rm -rf $root/usr/lib/firefox-*
88 rm -rf $root/etc/firefox
89 }
90 post_install()
91 {
92 local root
93 root=$1
94 if grep -q "fr_*" $root/etc/locale.conf 2>/dev/null; then
95 sed -i 's/en-US/fr/' \
96 $root/etc/firefox/pref/firefox-l10n.js
97 fi
98 for i in /tmp/firefox-plugins-$$/* ; do
99 [ -e $i ] || continue
100 [ -e /usr/lib/firefox-*/plugins/$(basename $i) ] && continue
101 cp -a $i /usr/lib/firefox-*/plugins/
102 done
103 rm -rf /tmp/firefox-plugins-$$
104 }