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

ayttm: updatte bdeps
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Apr 21 16:53:55 2012 +0200 (2012-04-21)
parents 6d1361c333f4
children 6aa501a7751e
line source
1 # SliTaz package receipt.
3 PACKAGE="firefox"
4 VERSION="10.0.2"
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 WGET_URL="ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/source/$TARBALL"
12 CONFIG_FILES="/etc/firefox"
13 TAGS="browser"
15 DEPENDS="gtk+ sqlite dbus dbus-glib glib jpeg xorg-libX11 xorg-libXdamage \
16 alsa-lib xorg-libXt libfirefox libevent libvpx"
17 BUILD_DEPENDS="zip libIDL coreutils findutils wireless_tools-dev \
18 perl python yasm alsa-lib-dev mesa-dev libevent-dev libvpx-dev dbus-dev dbus-glib-dev"
20 # Rules to configure and make the package.
21 #
22 # A long compile time... dont forget to build libidl before and check the
23 # .mozconfig file from the stuff and the stuff/README document.
24 #
25 compile_rules()
26 {
27 cp -a $stuff/firefox.mozconfig $src/.mozconfig
28 cd $src
29 patch -Np1 -i $stuff/mozilla-firefox-1.0-lang.patch
30 patch -Np1 -i $stuff/firefox-install-dir.patch
32 # Fix PRE_RELEASE_SUFFIX
33 sed -i '/^PRE_RELEASE_SUFFIX := ""/s/ ""//' \
34 browser/base/Makefile.in
36 # Don't generate startup cache. Unbreaks build
37 sed -i 's/^GENERATE_CACHE ?=.*/GENERATE_CACHE = true/' \
38 toolkit/mozapps/installer/packager.mk
39 ./configure $CONFIGURE_ARGS &&
40 make $MAKEFLAGS &&
41 make DESTDIR=$DESTDIR install &&
42 cp -a xpcom/typelib $DESTDIR
43 }
45 # Rules to gen a SliTaz package suitable for Tazpkg.
46 genpkg_rules()
47 {
48 mkdir -p $fs/usr/lib/$PACKAGE \
49 $fs/usr/share $fs/etc/$PACKAGE/profile/chrome
50 cp -a $_pkg/usr/bin $fs/usr
51 cp -a $_pkg/usr/lib/$PACKAGE $fs/usr/lib
53 # Home page, bookmarks file and branding.
54 cp -a $stuff/browserconfig.properties $fs/etc/$PACKAGE
55 cp -a $stuff/bookmarks.html \
56 $fs/etc/$PACKAGE/profile
57 mkdir -p $fs/etc/$PACKAGE/pref
58 cp -a $stuff/firefox-branding.js \
59 $fs/etc/$PACKAGE/pref/firefox.js
61 # User preference.
62 cp -a $stuff/prefs.js $fs/etc/$PACKAGE/profile
63 cp -a $stuff/userChrome.css \
64 $fs/etc/$PACKAGE/profile/chrome
66 # added firefox-l10n.js to stuff to make sure its copyed for langpacks
67 cp -a $stuff/firefox-l10n.js \
68 $fs/etc/$PACKAGE/pref/firefox-l10n.js
70 rm -rf $fs/usr/lib/$PACKAGE/defaults
72 ln -sf /etc/$PACKAGE/browserconfig.properties $fs/usr/lib/$PACKAGE
73 ln -sf /etc/$PACKAGE $fs/usr/lib/$PACKAGE/defaults
75 # EULA is accepted by SliTaz project.
76 sed -i s:'pref("browser.EULA.3.accepted", false);':'pref("browser.EULA.3.accepted", true);': \
77 $fs/etc/firefox/pref/firefox.js
79 # Search Plugin (by: oddball)
80 cp -a $stuff/searchplugins $fs/usr/lib/firefox/
81 chown -R root.root $fs
83 # Remove unnecessary files.
84 rm -rf $fs/usr/lib/$PACKAGE/dictionaries/*
85 rm -rf $fs/usr/lib/$PACKAGE/icons
86 # split firefox libs
87 rm -rf $fs/usr/lib/$PACKAGE/*.so
88 #retain big firefox libs
89 cp -a $_pkg/usr/lib/$PACKAGE/libxul.so \
90 $fs/usr/lib/$PACKAGE
91 #workaround for now
92 #https://bugzilla.mozilla.org/show_bug.cgi?id=658850
93 ln -sf firefox $fs/usr/lib/$PACKAGE/firefox-bin
94 }
96 # Pre - Post install command to set default locale.
97 pre_install()
98 {
99 local root
100 root=$1
101 # Get old plugins
102 mkdir /tmp/firefox-plugins-$$
103 cp -a $root/usr/lib/firefox/plugins/* /tmp/firefox-plugins-$$ 2> /dev/null
104 # Remove old libs and configs
105 rm -rf $root/usr/lib/firefox/plugins
106 rm -rf $root/usr/lib/firefox/dictionaries
107 rm -rf $root/etc/firefox
108 }
109 post_install()
110 {
111 local root
112 root=$1
113 if grep -q "fr_*" $root/etc/locale.conf 2>/dev/null; then
114 sed -i 's/en-US/fr/' \
115 $root/etc/firefox/pref/firefox-l10n.js
116 fi
117 for i in /tmp/firefox-plugins-$$/* ; do
118 [ -e $i ] || continue
119 [ -e /usr/lib/firefox/plugins/$(basename $i) ] && continue
120 cp -a $i /usr/lib/firefox/plugins/
121 done
122 rm -rf /tmp/firefox-plugins-$$
123 }