wok view firefox/receipt @ rev 1600
Add perl-dbd-mysql
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Oct 19 11:13:50 2008 +0000 (2008-10-19) |
parents | cf789d7f5389 |
children | 667ad83cd8e4 |
line source
1 # SliTaz package receipt.
3 PACKAGE="firefox"
4 VERSION="3.0.3"
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 dbus-glib-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"
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 #
25 mv mozilla $PACKAGE-$VERSION
26 cp -a stuff/firefox.mozconfig $src/.mozconfig
27 cd $src
28 ./configure $CONFIGURE_ARGS
29 make
30 make DESTDIR=$PWD/_pkg install
31 }
33 # Rules to gen a SliTaz package suitable for Tazpkg.
34 genpkg_rules()
35 {
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-$VERSION $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-$VERSION
42 cp -a stuff/bookmarks.html $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 ln -s /etc/$PACKAGE $fs/usr/lib/$PACKAGE-$VERSION/$i
55 done
56 # EULA is accepted by SliTaz project.
57 sed -i s:'pref("browser.EULA.3.accepted", false);':'pref("browser.EULA.3.accepted", true);': \
58 $fs/etc/firefox/pref/firefox.js
60 # Locale fr
61 tar xjf stuff/langpack-fr@firefox.mozilla.org.tar.bz2 \
62 -C $fs/usr/lib/$PACKAGE-$VERSION/extensions
64 # Search Plugin (by: oddball)
65 cp -a stuff/searchplugins $fs/usr/lib/firefox-$VERSION/
66 chown -R root.root $fs
68 # Remove unnecessary files.
69 rm -rf $fs/usr/lib/$PACKAGE-$VERSION/dictionaries/*
70 rm -rf $fs/usr/lib/$PACKAGE-$VERSION/icons
71 rm -rf $fs/usr/lib/$PACKAGE-$VERSION/libsqlite3.so
72 }
74 # Pre - Post install command to set default locale.
75 pre_install()
76 {
77 local root
78 root=$1
79 # Remove old libs
80 rm -rf $root/usr/lib/firefox-*
81 }
82 post_install()
83 {
84 local root
85 root=$1
86 if grep -q "fr_*" $root/etc/locale.conf 2>/dev/null; then
87 sed -i 's/en-US/fr/' \
88 $root/etc/firefox/pref/firefox-l10n.js
89 fi
90 }