wok-stable view firefox/receipt @ rev 9931
dega: fix bdeps
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Tue May 17 23:46:33 2011 +0200 (2011-05-17) |
parents | 2e0f0123456b |
children | 634770170170 |
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 DEPENDS="gtk+ sqlite dbus dbus-glib glib jpeg xorg-libX11 xorg-libXdamage alsa-lib xorg-libXt libfirefox libnotify"
9 BUILD_DEPENDS="zip libIDL coreutils findutils libnotify-dev wireless_tools-dev perl \
10 python yasm mesa-dev"
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 cp -a $stuff/firefox.mozconfig $src/.mozconfig
25 cd $src
26 sed -i 's/xtype/type/' toolkit/mozapps/installer/packager.mk
27 ./configure $CONFIGURE_ARGS &&
28 make -j 4 &&
29 make DESTDIR=$PWD/_pkg install &&
30 cp -a xpcom/typelib $PWD/_pkg
31 }
33 # Rules to gen a SliTaz package suitable for Tazpkg.
34 genpkg_rules()
35 {
36 mkdir -p $fs/usr/lib/$PACKAGE-$VERSION/defaults/profile/chrome $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/firefox.js
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
57 # added firefox-l10n.js to stuff to make sure its copyed for langpacks
58 cp -a $stuff/firefox-l10n.js \
59 $fs/etc/firefox/pref/firefox-l10n.js
61 ln -s /etc/$PACKAGE/browserconfig.properties $fs/usr/lib/$PACKAGE-$VERSION
62 ln -s /etc/$PACKAGE $fs/usr/lib/$PACKAGE-$VERSION/defaults
64 # EULA is accepted by SliTaz project.
65 sed -i s:'pref("browser.EULA.3.accepted", false);':'pref("browser.EULA.3.accepted", true);': \
66 $fs/etc/firefox/pref/firefox.js
68 # Locale fr
69 # tar xjf stuff/langpack-fr@firefox.mozilla.org.tar.bz2 \
70 # -C $fs/usr/lib/$PACKAGE-$VERSION/extensions
71 #sed -i "s/maxVersion>3.0../maxVersion>$VERSION/" \
72 # $fs/usr/lib/$PACKAGE-$VERSION/extensions/langpack*/install.rdf
74 # Search Plugin (by: oddball)
75 cp -a $stuff/searchplugins $fs/usr/lib/firefox-$VERSION/
76 chown -R root.root $fs
78 # Remove unnecessary files.
79 rm -rf $fs/usr/lib/$PACKAGE-$VERSION/dictionaries/*
80 rm -rf $fs/usr/lib/$PACKAGE-$VERSION/icons
81 # split firefox libs
82 rm -rf $fs/usr/lib/$PACKAGE-$VERSION/*.so
83 #retain big firefox libs
84 cp $_pkg/usr/lib/$PACKAGE-$VERSION/libxul.so \
85 $fs/usr/lib/$PACKAGE-$VERSION
87 }
89 # Pre - Post install command to set default locale.
90 pre_install()
91 {
92 local root
93 root=$1
94 # Get old plugins
95 mkdir /tmp/firefox-plugins-$$
96 cp -a $root/usr/lib/firefox-*/plugins/* /tmp/firefox-plugins-$$ 2> /dev/null
97 # Remove old libs and configs
98 rm -rf $root/usr/lib/firefox-*/plugins
99 rm -rf $root/usr/lib/firefox-*/dictionaries
100 rm -rf $root/etc/firefox
101 }
102 post_install()
103 {
104 local root
105 root=$1
106 if grep -q "fr_*" $root/etc/locale.conf 2>/dev/null; then
107 sed -i 's/en-US/fr/' \
108 $root/etc/firefox/pref/firefox-l10n.js
109 fi
110 for i in /tmp/firefox-plugins-$$/* ; do
111 [ -e $i ] || continue
112 [ -e /usr/lib/firefox-*/plugins/$(basename $i) ] && continue
113 cp -a $i /usr/lib/firefox-*/plugins/
114 done
115 rm -rf /tmp/firefox-plugins-$$
116 }