wok-6.x annotate firefox/receipt @ rev 9603
firefox: Added firefox-l10n.js to stuff folder so its copyed into package. Update prefs.js file. Fixed bug #480.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Wed Apr 13 22:53:13 2011 +0000 (2011-04-13) |
parents | 505eee76b73b |
children | 274f1b6c60c6 |
rev | line source |
---|---|
pankso@45 | 1 # SliTaz package receipt. |
pankso@45 | 2 |
pankso@45 | 3 PACKAGE="firefox" |
slaxemulator@9382 | 4 VERSION="4.0" |
pankso@197 | 5 CATEGORY="network" |
pankso@45 | 6 SHORT_DESC="User friendly, secure and fast web browser." |
pankso@45 | 7 MAINTAINER="pankso@slitaz.org" |
slaxemulator@9383 | 8 DEPENDS="gtk+ sqlite dbus dbus-glib glib jpeg xorg-libX11 xorg-libXdamage alsa-lib xorg-libXt libfirefox libnotify" |
slaxemulator@9382 | 9 BUILD_DEPENDS="gtk+-dev zip libIDL coreutils findutils xorg-libXft-dev \ |
gokhlayeh@7979 | 10 dbus-dev dbus-glib-dev alsa-lib alsa-lib-dev libnotify-dev wireless_tools-dev perl \ |
slaxemulator@9383 | 11 python yasm mesa-dev" |
pankso@4079 | 12 TARBALL="$PACKAGE-$VERSION.source.tar.bz2" |
pankso@45 | 13 WEB_SITE="http://www.mozilla.org/" |
pankso@4079 | 14 WGET_URL="http://releases.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/source/$TARBALL" |
pascal@1431 | 15 CONFIG_FILES="/etc/firefox" |
jozee@4936 | 16 TAGS="browser" |
pankso@45 | 17 |
pankso@45 | 18 # Rules to configure and make the package. |
pankso@45 | 19 # |
pankso@45 | 20 # A long compile time... dont forget to build libidl before and check the |
pankso@45 | 21 # .mozconfig file from the stuff and the stuff/README document. |
pankso@45 | 22 # |
pankso@45 | 23 compile_rules() |
pankso@45 | 24 { |
slaxemulator@9382 | 25 cp -a $stuff/firefox.mozconfig $src/.mozconfig |
pankso@45 | 26 cd $src |
pascal@4509 | 27 sed -i 's/xtype/type/' toolkit/mozapps/installer/packager.mk |
pascal@2486 | 28 ./configure $CONFIGURE_ARGS && |
pascal@5777 | 29 make -j 4 && |
pascal@9120 | 30 make DESTDIR=$PWD/_pkg install && |
pascal@9120 | 31 cp -a xpcom/typelib $PWD/_pkg |
pankso@45 | 32 } |
pankso@45 | 33 |
pankso@45 | 34 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@45 | 35 genpkg_rules() |
pankso@45 | 36 { |
slaxemulator@9382 | 37 mkdir -p $fs/usr/lib/$PACKAGE-$VERSION/defaults/profile/chrome $fs/usr/share $fs/etc |
pankso@45 | 38 cp -a $_pkg/usr/bin $fs/usr |
pankso@922 | 39 cp -a $_pkg/usr/lib/$PACKAGE-$VERSION $fs/usr/lib |
pankso@45 | 40 |
pankso@2748 | 41 # Home page, bookmarks file and branding. |
slaxemulator@9382 | 42 cp -a $stuff/browserconfig.properties $fs/usr/lib/$PACKAGE-$VERSION |
slaxemulator@9382 | 43 cp -a $stuff/bookmarks.html \ |
pankso@2748 | 44 $fs/usr/lib/$PACKAGE-$VERSION/defaults/profile |
slaxemulator@9382 | 45 cp -a $stuff/firefox-branding.js \ |
slaxemulator@9382 | 46 $fs/usr/lib/$PACKAGE-$VERSION/defaults/pref/firefox.js |
pankso@45 | 47 |
pankso@45 | 48 # User preference. |
slaxemulator@9382 | 49 cp -a $stuff/prefs.js $fs/usr/lib/$PACKAGE-$VERSION/defaults/profile |
slaxemulator@9382 | 50 cp -a $stuff/userChrome.css \ |
pankso@922 | 51 $fs/usr/lib/$PACKAGE-$VERSION/defaults/profile/chrome |
pankso@45 | 52 |
pankso@45 | 53 # Move default config to /etc/firefox (/usr maybe read-only) |
pascal@1431 | 54 for i in defaults browserconfig.properties ; do |
pascal@1431 | 55 mv -f $fs/usr/lib/$PACKAGE-$VERSION/$i $fs/etc/$PACKAGE |
pascal@1431 | 56 done |
slaxemulator@9382 | 57 |
slaxemulator@9603 | 58 # added firefox-l10n.js to stuff to make sure its copyed for langpacks |
slaxemulator@9603 | 59 cp -a $stuff/firefox-l10n.js \ |
slaxemulator@9603 | 60 $fs/etc/firefox/pref/firefox-l10n.js |
slaxemulator@9382 | 61 |
pascal@1723 | 62 ln -s /etc/$PACKAGE/browserconfig.properties $fs/usr/lib/$PACKAGE-$VERSION |
pascal@1724 | 63 ln -s /etc/$PACKAGE $fs/usr/lib/$PACKAGE-$VERSION/defaults |
pankso@3818 | 64 |
pankso@921 | 65 # EULA is accepted by SliTaz project. |
pankso@921 | 66 sed -i s:'pref("browser.EULA.3.accepted", false);':'pref("browser.EULA.3.accepted", true);': \ |
pankso@921 | 67 $fs/etc/firefox/pref/firefox.js |
pankso@840 | 68 |
pankso@45 | 69 # Locale fr |
lufeng369@7486 | 70 # tar xjf stuff/langpack-fr@firefox.mozilla.org.tar.bz2 \ |
lufeng369@7486 | 71 # -C $fs/usr/lib/$PACKAGE-$VERSION/extensions |
pankso@3818 | 72 #sed -i "s/maxVersion>3.0../maxVersion>$VERSION/" \ |
pankso@3818 | 73 # $fs/usr/lib/$PACKAGE-$VERSION/extensions/langpack*/install.rdf |
pankso@3818 | 74 |
pankso@629 | 75 # Search Plugin (by: oddball) |
slaxemulator@9382 | 76 cp -a $stuff/searchplugins $fs/usr/lib/firefox-$VERSION/ |
pankso@629 | 77 chown -R root.root $fs |
pankso@840 | 78 |
pankso@45 | 79 # Remove unnecessary files. |
pankso@922 | 80 rm -rf $fs/usr/lib/$PACKAGE-$VERSION/dictionaries/* |
pankso@922 | 81 rm -rf $fs/usr/lib/$PACKAGE-$VERSION/icons |
jozee@5038 | 82 # split firefox libs |
jozee@5038 | 83 rm -rf $fs/usr/lib/$PACKAGE-$VERSION/*.so |
jozee@5038 | 84 #retain big firefox libs |
slaxemulator@9382 | 85 cp $_pkg/usr/lib/$PACKAGE-$VERSION/libxul.so \ |
jozee@5038 | 86 $fs/usr/lib/$PACKAGE-$VERSION |
jozee@5038 | 87 |
pankso@45 | 88 } |
pankso@45 | 89 |
pankso@45 | 90 # Pre - Post install command to set default locale. |
pankso@45 | 91 pre_install() |
pankso@45 | 92 { |
pankso@45 | 93 local root |
pankso@45 | 94 root=$1 |
pascal@1702 | 95 # Get old plugins |
pascal@1702 | 96 mkdir /tmp/firefox-plugins-$$ |
pascal@1702 | 97 cp -a $root/usr/lib/firefox-*/plugins/* /tmp/firefox-plugins-$$ 2> /dev/null |
pankso@2748 | 98 # Remove old libs and configs |
jozee@5038 | 99 rm -rf $root/usr/lib/firefox-*/plugins |
jozee@5038 | 100 rm -rf $root/usr/lib/firefox-*/dictionaries |
pankso@2748 | 101 rm -rf $root/etc/firefox |
pankso@45 | 102 } |
pankso@45 | 103 post_install() |
pankso@45 | 104 { |
pankso@45 | 105 local root |
pankso@45 | 106 root=$1 |
pankso@1018 | 107 if grep -q "fr_*" $root/etc/locale.conf 2>/dev/null; then |
pankso@629 | 108 sed -i 's/en-US/fr/' \ |
pankso@840 | 109 $root/etc/firefox/pref/firefox-l10n.js |
pankso@45 | 110 fi |
pascal@1702 | 111 for i in /tmp/firefox-plugins-$$/* ; do |
pascal@1702 | 112 [ -e $i ] || continue |
pascal@1702 | 113 [ -e /usr/lib/firefox-*/plugins/$(basename $i) ] && continue |
pascal@1702 | 114 cp -a $i /usr/lib/firefox-*/plugins/ |
pascal@1702 | 115 done |
pascal@1702 | 116 rm -rf /tmp/firefox-plugins-$$ |
pankso@45 | 117 } |
jozee@5038 | 118 |