wok-next view firefox/receipt @ rev 6592

remove hard coded python2.5
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Oct 09 15:31:15 2010 +0200 (2010-10-09)
parents bfb27d9c9fb8
children 35ddf8972025
line source
1 # SliTaz package receipt.
3 PACKAGE="firefox"
4 VERSION="3.6.10"
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="xorg-dev 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 TARBALL="$PACKAGE-$VERSION.source.tar.bz2"
12 WEB_SITE="http://www.mozilla.org/"
13 WGET_URL="http://releases.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/source/$TARBALL"
14 CONFIG_FILES="/etc/firefox"
15 TAGS="browser"
17 # Rules to configure and make the package.
18 #
19 # A long compile time... dont forget to build libidl before and check the
20 # .mozconfig file from the stuff and the stuff/README document.
21 #
22 compile_rules()
23 {
24 # Move the mozilla source tree to $PACKAGE-$VERSION to keep variables
25 # and to have a nice clean.
26 mv mozilla-* $PACKAGE-$VERSION 2>/dev/null
27 cp -a stuff/firefox.mozconfig $src/.mozconfig
28 cd $src
29 sed -i 's/xtype/type/' toolkit/mozapps/installer/packager.mk
30 ./configure $CONFIGURE_ARGS &&
31 make -j 4 &&
32 make DESTDIR=$PWD/_pkg install
33 }
35 # Rules to gen a SliTaz package suitable for Tazpkg.
36 genpkg_rules()
37 {
38 mkdir -p $fs/usr/lib/$PACKAGE-$VERSION $fs/usr/share $fs/etc
39 cp -a $_pkg/usr/bin $fs/usr
40 cp -a $_pkg/usr/lib/$PACKAGE-$VERSION $fs/usr/lib
42 # Home page, bookmarks file and branding.
43 cp -a stuff/browserconfig.properties $fs/usr/lib/$PACKAGE-$VERSION
44 cp -a stuff/bookmarks.html \
45 $fs/usr/lib/$PACKAGE-$VERSION/defaults/profile
46 cp -a stuff/firefox-branding.js \
47 $fs/usr/lib/$PACKAGE-$VERSION/defaults/pref/
49 # User preference.
50 cp -a stuff/prefs.js $fs/usr/lib/$PACKAGE-$VERSION/defaults/profile
51 cp -a stuff/userChrome.css \
52 $fs/usr/lib/$PACKAGE-$VERSION/defaults/profile/chrome
54 # Move default config to /etc/firefox (/usr maybe read-only)
55 for i in defaults browserconfig.properties ; do
56 mv -f $fs/usr/lib/$PACKAGE-$VERSION/$i $fs/etc/$PACKAGE
57 done
58 ln -s /etc/$PACKAGE/browserconfig.properties $fs/usr/lib/$PACKAGE-$VERSION
59 ln -s /etc/$PACKAGE $fs/usr/lib/$PACKAGE-$VERSION/defaults
61 # EULA is accepted by SliTaz project.
62 sed -i s:'pref("browser.EULA.3.accepted", false);':'pref("browser.EULA.3.accepted", true);': \
63 $fs/etc/firefox/pref/firefox.js
65 # Locale fr
66 tar xjf stuff/langpack-fr@firefox.mozilla.org.tar.bz2 \
67 -C $fs/usr/lib/$PACKAGE-$VERSION/extensions
68 #sed -i "s/maxVersion>3.0../maxVersion>$VERSION/" \
69 # $fs/usr/lib/$PACKAGE-$VERSION/extensions/langpack*/install.rdf
71 # Search Plugin (by: oddball)
72 cp -a stuff/searchplugins $fs/usr/lib/firefox-$VERSION/
73 chown -R root.root $fs
75 # Remove unnecessary files.
76 rm -rf $fs/usr/lib/$PACKAGE-$VERSION/dictionaries/*
77 rm -rf $fs/usr/lib/$PACKAGE-$VERSION/icons
78 # split firefox libs
79 rm -rf $fs/usr/lib/$PACKAGE-$VERSION/*.so
80 #retain big firefox libs
81 cp $_pkg/usr/lib/$PACKAGE-$VERSION/libxul.so \
82 $_pkg/usr/lib/$PACKAGE-$VERSION/libmozjs.so \
83 $fs/usr/lib/$PACKAGE-$VERSION
85 }
87 # Pre - Post install command to set default locale.
88 pre_install()
89 {
90 local root
91 root=$1
92 # Get old plugins
93 mkdir /tmp/firefox-plugins-$$
94 cp -a $root/usr/lib/firefox-*/plugins/* /tmp/firefox-plugins-$$ 2> /dev/null
95 # Remove old libs and configs
96 rm -rf $root/usr/lib/firefox-*/plugins
97 rm -rf $root/usr/lib/firefox-*/dictionaries
98 rm -rf $root/etc/firefox
99 }
100 post_install()
101 {
102 local root
103 root=$1
104 if grep -q "fr_*" $root/etc/locale.conf 2>/dev/null; then
105 sed -i 's/en-US/fr/' \
106 $root/etc/firefox/pref/firefox-l10n.js
107 fi
108 for i in /tmp/firefox-plugins-$$/* ; do
109 [ -e $i ] || continue
110 [ -e /usr/lib/firefox-*/plugins/$(basename $i) ] && continue
111 cp -a $i /usr/lib/firefox-*/plugins/
112 done
113 rm -rf /tmp/firefox-plugins-$$
114 }