wok view firefox/receipt @ rev 1383

vim: fix all (vim72)
author Christophe Lincoln <pankso@slitaz.org>
date Mon Sep 15 15:26:29 2008 +0200 (2008-09-15)
parents 35774f63f366
children cf789d7f5389
line source
1 # SliTaz package receipt.
3 PACKAGE="firefox"
4 VERSION="3.0.1"
5 CATEGORY="network"
6 SHORT_DESC="User friendly, secure and fast web browser."
7 MAINTAINER="pankso@slitaz.org"
8 DEPENDS="gtk+ sqlite"
9 BUILD_DEPENDS="xorg-dev gtk+-dev zip libIDL coreutils findutils xorg-libXft-dev"
10 TARBALL="$PACKAGE-$VERSION-source.tar.bz2"
11 WEB_SITE="http://www.mozilla.org/"
12 WGET_URL="http://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 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 # SliTaz Web site for the home page, bookmarks file and branding.
40 cp -a stuff/browserconfig.properties $fs/usr/lib/$PACKAGE-$VERSION
41 cp -a stuff/bookmarks.html $fs/usr/lib/$PACKAGE-$VERSION/defaults/profile
42 cp -a stuff/firefox-branding.js \
43 $fs/usr/lib/$PACKAGE-$VERSION/defaults/pref/
45 # User preference.
46 cp -a stuff/prefs.js $fs/usr/lib/$PACKAGE-$VERSION/defaults/profile
47 cp -a stuff/userChrome.css \
48 $fs/usr/lib/$PACKAGE-$VERSION/defaults/profile/chrome
50 # Move default config to /etc/firefox (/usr maybe read-only)
51 mv -f $fs/usr/lib/$PACKAGE-$VERSION/defaults $fs/etc/$PACKAGE
52 ln -s /etc/$PACKAGE $fs/usr/lib/$PACKAGE-$VERSION/defaults
53 # EULA is accepted by SliTaz project.
54 sed -i s:'pref("browser.EULA.3.accepted", false);':'pref("browser.EULA.3.accepted", true);': \
55 $fs/etc/firefox/pref/firefox.js
57 # Locale fr
58 tar xjf stuff/langpack-fr@firefox.mozilla.org.tar.bz2 \
59 -C $fs/usr/lib/$PACKAGE-$VERSION/extensions
61 # Search Plugin (by: oddball)
62 cp -a stuff/searchplugins $fs/usr/lib/firefox-$VERSION/
63 chown -R root.root $fs
65 # Remove unnecessary files.
66 rm -rf $fs/usr/lib/$PACKAGE-$VERSION/dictionaries/*
67 rm -rf $fs/usr/lib/$PACKAGE-$VERSION/icons
68 rm -rf $fs/usr/lib/$PACKAGE-$VERSION/libsqlite3.so
69 }
71 # Pre - Post install command to set default locale.
72 pre_install()
73 {
74 local root
75 root=$1
76 # Remove old libs
77 rm -rf $root/usr/lib/firefox-*
78 }
79 post_install()
80 {
81 local root
82 root=$1
83 if grep -q "fr_*" $root/etc/locale.conf 2>/dev/null; then
84 sed -i 's/en-US/fr/' \
85 $root/etc/firefox/pref/firefox-l10n.js
86 fi
87 }