wok view firefox/receipt @ rev 10880
vnc2flv: Fixed WGET_URL.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Sat Jun 25 09:39:04 2011 +0000 (2011-06-25) |
parents | 634770170170 |
children | 4d5a84939dfc |
line source
1 # SliTaz package receipt.
3 PACKAGE="firefox"
4 VERSION="4.0.1"
5 CATEGORY="network"
6 SHORT_DESC="User friendly, secure and fast web browser."
7 MAINTAINER="pankso@slitaz.org"
8 TARBALL="$PACKAGE-$VERSION.source.tar.bz2"
9 WEB_SITE="http://www.mozilla.org/"
10 WGET_URL="http://releases.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/source/$TARBALL"
11 CONFIG_FILES="/etc/firefox"
12 TAGS="browser"
14 DEPENDS="gtk+ sqlite dbus dbus-glib glib jpeg xorg-libX11 xorg-libXdamage \
15 alsa-lib xorg-libXt libfirefox libnotify"
16 BUILD_DEPENDS="zip libIDL coreutils findutils libnotify-dev wireless_tools-dev \
17 perl python yasm alsa-lib-dev mesa-dev"
19 # Rules to configure and make the package.
20 #
21 # A long compile time... dont forget to build libidl before and check the
22 # .mozconfig file from the stuff and the stuff/README document.
23 #
24 compile_rules()
25 {
26 cp -a $stuff/firefox.mozconfig $src/.mozconfig
27 cd $src
28 sed -i 's/xtype/type/' toolkit/mozapps/installer/packager.mk
29 ./configure $CONFIGURE_ARGS &&
30 make -j 4 &&
31 make DESTDIR=$DESTDIR install &&
32 cp -a xpcom/typelib $DESTDIR
33 }
35 # Rules to gen a SliTaz package suitable for Tazpkg.
36 genpkg_rules()
37 {
38 mkdir -p $fs/usr/lib/$PACKAGE-$VERSION/defaults/profile/chrome \
39 $fs/usr/share $fs/etc
40 cp -a $_pkg/usr/bin $fs/usr
41 cp -a $_pkg/usr/lib/$PACKAGE-$VERSION $fs/usr/lib
43 # Home page, bookmarks file and branding.
44 cp -a $stuff/browserconfig.properties $fs/usr/lib/$PACKAGE-$VERSION
45 cp -a $stuff/bookmarks.html \
46 $fs/usr/lib/$PACKAGE-$VERSION/defaults/profile
47 cp -a $stuff/firefox-branding.js \
48 $fs/usr/lib/$PACKAGE-$VERSION/defaults/pref/firefox.js
50 # User preference.
51 cp -a $stuff/prefs.js $fs/usr/lib/$PACKAGE-$VERSION/defaults/profile
52 cp -a $stuff/userChrome.css \
53 $fs/usr/lib/$PACKAGE-$VERSION/defaults/profile/chrome
55 # Move default config to /etc/firefox (/usr maybe read-only)
56 for i in defaults browserconfig.properties ; do
57 mv -f $fs/usr/lib/$PACKAGE-$VERSION/$i $fs/etc/$PACKAGE
58 done
60 # added firefox-l10n.js to stuff to make sure its copyed for langpacks
61 cp -a $stuff/firefox-l10n.js \
62 $fs/etc/firefox/pref/firefox-l10n.js
64 ln -s /etc/$PACKAGE/browserconfig.properties $fs/usr/lib/$PACKAGE-$VERSION
65 ln -s /etc/$PACKAGE $fs/usr/lib/$PACKAGE-$VERSION/defaults
67 # EULA is accepted by SliTaz project.
68 sed -i s:'pref("browser.EULA.3.accepted", false);':'pref("browser.EULA.3.accepted", true);': \
69 $fs/etc/firefox/pref/firefox.js
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 $fs/usr/lib/$PACKAGE-$VERSION
83 }
85 # Pre - Post install command to set default locale.
86 pre_install()
87 {
88 local root
89 root=$1
90 # Get old plugins
91 mkdir /tmp/firefox-plugins-$$
92 cp -a $root/usr/lib/firefox-*/plugins/* /tmp/firefox-plugins-$$ 2> /dev/null
93 # Remove old libs and configs
94 rm -rf $root/usr/lib/firefox-*/plugins
95 rm -rf $root/usr/lib/firefox-*/dictionaries
96 rm -rf $root/etc/firefox
97 }
98 post_install()
99 {
100 local root
101 root=$1
102 if grep -q "fr_*" $root/etc/locale.conf 2>/dev/null; then
103 sed -i 's/en-US/fr/' \
104 $root/etc/firefox/pref/firefox-l10n.js
105 fi
106 for i in /tmp/firefox-plugins-$$/* ; do
107 [ -e $i ] || continue
108 [ -e /usr/lib/firefox-*/plugins/$(basename $i) ] && continue
109 cp -a $i /usr/lib/firefox-*/plugins/
110 done
111 rm -rf /tmp/firefox-plugins-$$
112 }