wok view firefox/receipt @ rev 45

Add : firefox with default files
author Christophe Lincoln <pankso@slitaz.org>
date Tue Dec 18 14:20:16 2007 +0100 (2007-12-18)
parents
children 1b129a8fd309
line source
1 # SliTaz package receipt.
3 PACKAGE="firefox"
4 VERSION="2.0.0.11"
5 CATEGORY="extra"
6 SHORT_DESC="User friendly, secure and fast web browser."
7 MAINTAINER="pankso@slitaz.org"
8 DEPENDS="gtk+"
9 TARBALL="$PACKAGE-$VERSION-source.tar.bz2"
10 WEB_SITE="http://www.mozilla.org/"
11 WGET_URL="ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/source/$TARBALL"
13 # Rules to configure and make the package.
14 #
15 # A long compile time... dont forget to build libidl before and check the
16 # .mozconfig file from the stuff and the stuff/README document.
17 #
18 compile_rules()
19 {
20 # Move the mozilla source tree to $PACKAGE-$VERSION to keep variables
21 # and to have a nice clean.
22 #
23 mv mozilla $PACKAGE-$VERSION
24 cp -a stuff/firefox.mozconfig $src/.mozconfig
25 cd $src
26 ./configure $CONFIGURE_ARGS
27 make
28 make DESTDIR=$PWD/_pkg install
29 }
31 # Rules to gen a SliTaz package suitable for Tazpkg.
32 genpkg_rules()
33 {
34 mkdir -p $fs/usr/lib $fs/usr/share/pixmaps $fs/etc
35 cp -a $_pkg/usr/bin $fs/usr
36 cp -a $_pkg/usr/lib/$PACKAGE-$VERSION $fs/usr/lib
38 # SliTaz Web site for the home page and bookmarks file.
39 cp -a stuff/browserconfig.properties $fs/usr/lib/$PACKAGE-$VERSION
40 cp -a stuff/bookmarks.html $fs/usr/lib/$PACKAGE-$VERSION/defaults/profile
42 # User preference.
43 cp -a stuff/prefs.js $fs/usr/lib/$PACKAGE-$VERSION/defaults/profile
44 cp -a stuff/userChrome.css \
45 $fs/usr/lib/$PACKAGE-$VERSION/defaults/profile/chrome
47 # Mozilla default pixmaps and Firefox icon from the stuff.
48 cp -a stuff/mozicon.png $fs/usr/share/pixmaps
49 rm -rf $fs/usr/lib/$PACKAGE-$VERSION/icons
51 # Move default config to /etc/firefox (/usr maybe read-only)
52 mv -f $fs/usr/lib/$PACKAGE-$VERSION/defaults $fs/etc/$PACKAGE
53 ln -s /etc/$PACKAGE $fs/usr/lib/$PACKAGE-$VERSION/defaults
55 # Strip
56 strip -s $fs/usr/lib/$PACKAGE-$VERSION/* 2>/dev/null
58 # Locale fr
59 tar xjf stuff/langpack-fr@firefox.mozilla.org.tar.bz2 \
60 -C $fs/usr/lib/$PACKAGE-$VERSION/extensions
62 # Remove unnecessary files.
63 rm -f $fs/usr/lib/$PACKAGE-$VERSION/TestGtkEmbed
64 }
66 # Pre - Post install command to set default locale.
67 pre_install()
68 {
69 local root
70 root=$1
71 # Remove old libs
72 rm -rf $root/usr/lib/firefox-*
73 }
74 post_install()
75 {
76 local root
77 root=$1
78 if grep -q "fr_*" $root/etc/locale.conf; then
79 sed -i 's/en-US/fr/' \
80 $root/usr/lib/$PACKAGE-$VERSION/defaults/pref/firefox-l10n.js
81 fi
82 }