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

sslh: fix bdeps
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Aug 27 17:15:42 2012 +0200 (2012-08-27)
parents e3a991321740
children 6b09507225ec
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 \
19 dbus-glib-dev gtk+-dev glib-dev"
21 # Rules to configure and make the package.
22 #
23 # A long compile time... dont forget to build libidl before and check the
24 # .mozconfig file from the stuff and the stuff/README document.
25 #
26 compile_rules()
27 {
28 cp -a $stuff/firefox.mozconfig $src/.mozconfig
29 cd $src
30 patch -Np1 -i $stuff/mozilla-firefox-1.0-lang.patch
31 patch -Np1 -i $stuff/firefox-install-dir.patch
33 # Fix PRE_RELEASE_SUFFIX
34 sed -i '/^PRE_RELEASE_SUFFIX := ""/s/ ""//' \
35 browser/base/Makefile.in
37 # Don't generate startup cache. Unbreaks build
38 sed -i 's/^GENERATE_CACHE ?=.*/GENERATE_CACHE = true/' \
39 toolkit/mozapps/installer/packager.mk
40 ./configure $CONFIGURE_ARGS &&
41 make $MAKEFLAGS &&
42 make DESTDIR=$DESTDIR install &&
43 cp -a xpcom/typelib $DESTDIR
44 }
46 # Rules to gen a SliTaz package suitable for Tazpkg.
47 genpkg_rules()
48 {
49 mkdir -p $fs/usr/lib/$PACKAGE \
50 $fs/usr/share $fs/etc/$PACKAGE/profile/chrome
51 cp -a $_pkg/usr/bin $fs/usr
52 cp -a $_pkg/usr/lib/$PACKAGE $fs/usr/lib
54 # Home page, bookmarks file and branding.
55 cp -a $stuff/browserconfig.properties $fs/etc/$PACKAGE
56 cp -a $stuff/bookmarks.html \
57 $fs/etc/$PACKAGE/profile
58 mkdir -p $fs/etc/$PACKAGE/pref
59 cp -a $stuff/firefox-branding.js \
60 $fs/etc/$PACKAGE/pref/firefox.js
62 # User preference.
63 cp -a $stuff/prefs.js $fs/etc/$PACKAGE/profile
64 cp -a $stuff/userChrome.css \
65 $fs/etc/$PACKAGE/profile/chrome
67 # added firefox-l10n.js to stuff to make sure its copyed for langpacks
68 cp -a $stuff/firefox-l10n.js \
69 $fs/etc/$PACKAGE/pref/firefox-l10n.js
71 rm -rf $fs/usr/lib/$PACKAGE/defaults
73 ln -sf /etc/$PACKAGE/browserconfig.properties $fs/usr/lib/$PACKAGE
74 ln -sf /etc/$PACKAGE $fs/usr/lib/$PACKAGE/defaults
76 # EULA is accepted by SliTaz project.
77 sed -i s:'pref("browser.EULA.3.accepted", false);':'pref("browser.EULA.3.accepted", true);': \
78 $fs/etc/firefox/pref/firefox.js
80 # Search Plugin (by: oddball)
81 cp -a $stuff/searchplugins $fs/usr/lib/firefox/
82 chown -R root.root $fs
84 # Remove unnecessary files.
85 rm -rf $fs/usr/lib/$PACKAGE/dictionaries/*
86 rm -rf $fs/usr/lib/$PACKAGE/icons
87 # split firefox libs
88 rm -rf $fs/usr/lib/$PACKAGE/*.so
89 #retain big firefox libs
90 cp -a $_pkg/usr/lib/$PACKAGE/libxul.so \
91 $fs/usr/lib/$PACKAGE
92 #workaround for now
93 #https://bugzilla.mozilla.org/show_bug.cgi?id=658850
94 ln -sf firefox $fs/usr/lib/$PACKAGE/firefox-bin
95 }
97 # Pre - Post install command to set default locale.
98 pre_install()
99 {
100 local root
101 root=$1
102 # Get old plugins
103 mkdir /tmp/firefox-plugins-$$
104 cp -a $root/usr/lib/firefox/plugins/* /tmp/firefox-plugins-$$ 2> /dev/null
105 # Remove old libs and configs
106 rm -rf $root/usr/lib/firefox/plugins
107 rm -rf $root/usr/lib/firefox/dictionaries
108 rm -rf $root/etc/firefox
109 }
110 post_install()
111 {
112 local root
113 root=$1
114 if grep -q "fr_*" $root/etc/locale.conf 2>/dev/null; then
115 sed -i 's/en-US/fr/' \
116 $root/etc/firefox/pref/firefox-l10n.js
117 fi
118 for i in /tmp/firefox-plugins-$$/* ; do
119 [ -e $i ] || continue
120 [ -e /usr/lib/firefox/plugins/$(basename $i) ] && continue
121 cp -a $i /usr/lib/firefox/plugins/
122 done
123 rm -rf /tmp/firefox-plugins-$$
124 }