wok view firefox/receipt @ rev 840

Up: firefox (3.0-rc1)
author Christophe Lincoln <pankso@slitaz.org>
date Sun May 18 13:43:07 2008 +0200 (2008-05-18)
parents 0612e7ec101d
children c2688245d108
line source
1 # SliTaz package receipt.
3 PACKAGE="firefox"
4 VERSION="3.0-rc1"
5 CATEGORY="network"
6 SHORT_DESC="User friendly, secure and fast web browser."
7 MAINTAINER="pankso@slitaz.org"
8 DEPENDS="gtk+"
9 BUILD_DEPENDS="xorg-dev gtk+-dev zip libIDL coreutils findutils"
10 TARBALL="$PACKAGE-3.0rc1-source.tar.bz2"
11 WEB_SITE="http://www.mozilla.org/"
12 WGET_URL="ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/source/$TARBALL"
14 # Rules to configure and make the package.
15 #
16 # A long compile time... dont forget to build libidl before and check the
17 # .mozconfig file from the stuff and the stuff/README document.
18 #
19 compile_rules()
20 {
21 # Move the mozilla source tree to $PACKAGE-$VERSION to keep variables
22 # and to have a nice clean.
23 #
24 mv mozilla $PACKAGE-$VERSION
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 _pkg=$WOK/firefox/firefox-3.0rc1/_pkg
36 mkdir -p $fs/usr/lib $fs/usr/share $fs/etc
37 cp -a $_pkg/usr/bin $fs/usr
38 cp -a $_pkg/usr/lib/$PACKAGE-3.0 $fs/usr/lib
40 # SliTaz Web site for the home page, bookmarks file and branding.
41 cp -a stuff/browserconfig.properties $fs/usr/lib/$PACKAGE-3.0
42 cp -a stuff/bookmarks.html $fs/usr/lib/$PACKAGE-3.0/defaults/profile
43 cp -a stuff/firefox-branding.js \
44 $fs/usr/lib/$PACKAGE-3.0/defaults/pref/
46 # User preference.
47 cp -a stuff/prefs.js $fs/usr/lib/$PACKAGE-3.0/defaults/profile
48 cp -a stuff/userChrome.css \
49 $fs/usr/lib/$PACKAGE-3.0/defaults/profile/chrome
51 # Move default config to /etc/firefox (/usr maybe read-only)
52 mv -f $fs/usr/lib/$PACKAGE-3.0/defaults $fs/etc/$PACKAGE
53 ln -s /etc/$PACKAGE $fs/usr/lib/$PACKAGE-3.0/defaults
55 # Locale fr
56 tar xjf stuff/langpack-fr@firefox.mozilla.org.tar.bz2 \
57 -C $fs/usr/lib/$PACKAGE-3.0/extensions
59 # Search Plugin (by: oddball)
60 cp -a stuff/searchplugins $fs/usr/lib/firefox-3.0/
62 # Home page
63 cp -a stuff/webhome $fs/usr/share
64 chown -R root.root $fs
66 # Remove unnecessary files.
67 #rm -f $fs/usr/lib/$PACKAGE-3.0/TestGtkEmbed
68 rm -rf $fs/usr/lib/$PACKAGE-3.0/dictionaries/*
69 rm -rf $fs/usr/lib/$PACKAGE-3.0/icons
70 rm -rf $fs/usr/lib/$PACKAGE-3.0/libsqlite3.so
71 }
73 # Pre - Post install command to set default locale.
74 pre_install()
75 {
76 local root
77 root=$1
78 # Remove old libs
79 rm -rf $root/usr/lib/firefox-*
80 }
81 post_install()
82 {
83 local root
84 root=$1
85 if grep -q "fr_*" $root/etc/locale.conf; then
86 sed -i 's/en-US/fr/' \
87 $root/etc/firefox/pref/firefox-l10n.js
88 fi
89 }