wok-stable view firefox/receipt @ rev 9603
firefox: Added firefox-l10n.js to stuff folder so its copyed into package. Update prefs.js file. Fixed bug #480.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Wed Apr 13 22:53:13 2011 +0000 (2011-04-13) |
parents | 505eee76b73b |
children | 274f1b6c60c6 |
line source
1 # SliTaz package receipt.
3 PACKAGE="firefox"
4 VERSION="4.0"
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 alsa-lib xorg-libXt libfirefox libnotify"
9 BUILD_DEPENDS="gtk+-dev zip libIDL coreutils findutils xorg-libXft-dev \
10 dbus-dev dbus-glib-dev alsa-lib alsa-lib-dev libnotify-dev wireless_tools-dev perl \
11 python yasm mesa-dev"
12 TARBALL="$PACKAGE-$VERSION.source.tar.bz2"
13 WEB_SITE="http://www.mozilla.org/"
14 WGET_URL="http://releases.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/source/$TARBALL"
15 CONFIG_FILES="/etc/firefox"
16 TAGS="browser"
18 # Rules to configure and make the package.
19 #
20 # A long compile time... dont forget to build libidl before and check the
21 # .mozconfig file from the stuff and the stuff/README document.
22 #
23 compile_rules()
24 {
25 cp -a $stuff/firefox.mozconfig $src/.mozconfig
26 cd $src
27 sed -i 's/xtype/type/' toolkit/mozapps/installer/packager.mk
28 ./configure $CONFIGURE_ARGS &&
29 make -j 4 &&
30 make DESTDIR=$PWD/_pkg install &&
31 cp -a xpcom/typelib $PWD/_pkg
32 }
34 # Rules to gen a SliTaz package suitable for Tazpkg.
35 genpkg_rules()
36 {
37 mkdir -p $fs/usr/lib/$PACKAGE-$VERSION/defaults/profile/chrome $fs/usr/share $fs/etc
38 cp -a $_pkg/usr/bin $fs/usr
39 cp -a $_pkg/usr/lib/$PACKAGE-$VERSION $fs/usr/lib
41 # Home page, bookmarks file and branding.
42 cp -a $stuff/browserconfig.properties $fs/usr/lib/$PACKAGE-$VERSION
43 cp -a $stuff/bookmarks.html \
44 $fs/usr/lib/$PACKAGE-$VERSION/defaults/profile
45 cp -a $stuff/firefox-branding.js \
46 $fs/usr/lib/$PACKAGE-$VERSION/defaults/pref/firefox.js
48 # User preference.
49 cp -a $stuff/prefs.js $fs/usr/lib/$PACKAGE-$VERSION/defaults/profile
50 cp -a $stuff/userChrome.css \
51 $fs/usr/lib/$PACKAGE-$VERSION/defaults/profile/chrome
53 # Move default config to /etc/firefox (/usr maybe read-only)
54 for i in defaults browserconfig.properties ; do
55 mv -f $fs/usr/lib/$PACKAGE-$VERSION/$i $fs/etc/$PACKAGE
56 done
58 # added firefox-l10n.js to stuff to make sure its copyed for langpacks
59 cp -a $stuff/firefox-l10n.js \
60 $fs/etc/firefox/pref/firefox-l10n.js
62 ln -s /etc/$PACKAGE/browserconfig.properties $fs/usr/lib/$PACKAGE-$VERSION
63 ln -s /etc/$PACKAGE $fs/usr/lib/$PACKAGE-$VERSION/defaults
65 # EULA is accepted by SliTaz project.
66 sed -i s:'pref("browser.EULA.3.accepted", false);':'pref("browser.EULA.3.accepted", true);': \
67 $fs/etc/firefox/pref/firefox.js
69 # Locale fr
70 # tar xjf stuff/langpack-fr@firefox.mozilla.org.tar.bz2 \
71 # -C $fs/usr/lib/$PACKAGE-$VERSION/extensions
72 #sed -i "s/maxVersion>3.0../maxVersion>$VERSION/" \
73 # $fs/usr/lib/$PACKAGE-$VERSION/extensions/langpack*/install.rdf
75 # Search Plugin (by: oddball)
76 cp -a $stuff/searchplugins $fs/usr/lib/firefox-$VERSION/
77 chown -R root.root $fs
79 # Remove unnecessary files.
80 rm -rf $fs/usr/lib/$PACKAGE-$VERSION/dictionaries/*
81 rm -rf $fs/usr/lib/$PACKAGE-$VERSION/icons
82 # split firefox libs
83 rm -rf $fs/usr/lib/$PACKAGE-$VERSION/*.so
84 #retain big firefox libs
85 cp $_pkg/usr/lib/$PACKAGE-$VERSION/libxul.so \
86 $fs/usr/lib/$PACKAGE-$VERSION
88 }
90 # Pre - Post install command to set default locale.
91 pre_install()
92 {
93 local root
94 root=$1
95 # Get old plugins
96 mkdir /tmp/firefox-plugins-$$
97 cp -a $root/usr/lib/firefox-*/plugins/* /tmp/firefox-plugins-$$ 2> /dev/null
98 # Remove old libs and configs
99 rm -rf $root/usr/lib/firefox-*/plugins
100 rm -rf $root/usr/lib/firefox-*/dictionaries
101 rm -rf $root/etc/firefox
102 }
103 post_install()
104 {
105 local root
106 root=$1
107 if grep -q "fr_*" $root/etc/locale.conf 2>/dev/null; then
108 sed -i 's/en-US/fr/' \
109 $root/etc/firefox/pref/firefox-l10n.js
110 fi
111 for i in /tmp/firefox-plugins-$$/* ; do
112 [ -e $i ] || continue
113 [ -e /usr/lib/firefox-*/plugins/$(basename $i) ] && continue
114 cp -a $i /usr/lib/firefox-*/plugins/
115 done
116 rm -rf /tmp/firefox-plugins-$$
117 }