wok-6.x view firefox/receipt @ rev 4608

Improve fswebcam.conf
author Rohit Joshi <jozee@slitaz.org>
date Tue Dec 15 16:41:18 2009 +0000 (2009-12-15)
parents 4b16c8ec84b1
children 5445284ac722
line source
1 # SliTaz package receipt.
3 PACKAGE="firefox"
4 VERSION="3.5.5"
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"
9 BUILD_DEPENDS="xorg-dev gtk+-dev zip libIDL coreutils findutils xorg-libXft-dev dbus-dev dbus-glib-dev alsa-lib-dev"
10 TARBALL="$PACKAGE-$VERSION.source.tar.bz2"
11 WEB_SITE="http://www.mozilla.org/"
12 WGET_URL="http://releases.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 mv mozilla-* $PACKAGE-$VERSION 2>/dev/null
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 &&
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 # Home page, bookmarks file and branding.
41 cp -a stuff/browserconfig.properties $fs/usr/lib/$PACKAGE-$VERSION
42 cp -a stuff/bookmarks.html \
43 $fs/usr/lib/$PACKAGE-$VERSION/defaults/profile
44 cp -a stuff/firefox-branding.js \
45 $fs/usr/lib/$PACKAGE-$VERSION/defaults/pref/
47 # User preference.
48 cp -a stuff/prefs.js $fs/usr/lib/$PACKAGE-$VERSION/defaults/profile
49 cp -a stuff/userChrome.css \
50 $fs/usr/lib/$PACKAGE-$VERSION/defaults/profile/chrome
52 # Move default config to /etc/firefox (/usr maybe read-only)
53 for i in defaults browserconfig.properties ; do
54 mv -f $fs/usr/lib/$PACKAGE-$VERSION/$i $fs/etc/$PACKAGE
55 done
56 ln -s /etc/$PACKAGE/browserconfig.properties $fs/usr/lib/$PACKAGE-$VERSION
57 ln -s /etc/$PACKAGE $fs/usr/lib/$PACKAGE-$VERSION/defaults
59 # EULA is accepted by SliTaz project.
60 sed -i s:'pref("browser.EULA.3.accepted", false);':'pref("browser.EULA.3.accepted", true);': \
61 $fs/etc/firefox/pref/firefox.js
63 # Locale fr
64 tar xjf stuff/langpack-fr@firefox.mozilla.org.tar.bz2 \
65 -C $fs/usr/lib/$PACKAGE-$VERSION/extensions
66 #sed -i "s/maxVersion>3.0../maxVersion>$VERSION/" \
67 # $fs/usr/lib/$PACKAGE-$VERSION/extensions/langpack*/install.rdf
69 # Search Plugin (by: oddball)
70 cp -a stuff/searchplugins $fs/usr/lib/firefox-$VERSION/
71 chown -R root.root $fs
73 # Remove unnecessary files.
74 rm -rf $fs/usr/lib/$PACKAGE-$VERSION/dictionaries/*
75 rm -rf $fs/usr/lib/$PACKAGE-$VERSION/icons
76 rm -rf $fs/usr/lib/$PACKAGE-$VERSION/libsqlite3.so
77 }
79 # Pre - Post install command to set default locale.
80 pre_install()
81 {
82 local root
83 root=$1
84 # Get old plugins
85 mkdir /tmp/firefox-plugins-$$
86 cp -a $root/usr/lib/firefox-*/plugins/* /tmp/firefox-plugins-$$ 2> /dev/null
87 # Remove old libs and configs
88 rm -rf $root/usr/lib/firefox-*
89 rm -rf $root/etc/firefox
90 }
91 post_install()
92 {
93 local root
94 root=$1
95 if grep -q "fr_*" $root/etc/locale.conf 2>/dev/null; then
96 sed -i 's/en-US/fr/' \
97 $root/etc/firefox/pref/firefox-l10n.js
98 fi
99 for i in /tmp/firefox-plugins-$$/* ; do
100 [ -e $i ] || continue
101 [ -e /usr/lib/firefox-*/plugins/$(basename $i) ] && continue
102 cp -a $i /usr/lib/firefox-*/plugins/
103 done
104 rm -rf /tmp/firefox-plugins-$$
105 }