wok-6.x annotate firefox/receipt @ rev 4008
Up: libxcb (1.4) xcb-util (0.3.6) awesome (3.3.3)
author | Mallory Mollo <mallory@sweetpeople.org> |
---|---|
date | Tue Sep 01 20:54:14 2009 +0200 (2009-09-01) |
parents | 9113d7263ba6 |
children | a47f6ee157b9 |
rev | line source |
---|---|
pankso@45 | 1 # SliTaz package receipt. |
pankso@45 | 2 |
pankso@45 | 3 PACKAGE="firefox" |
pankso@3818 | 4 VERSION="3.5.2" |
pankso@197 | 5 CATEGORY="network" |
pankso@45 | 6 SHORT_DESC="User friendly, secure and fast web browser." |
pankso@45 | 7 MAINTAINER="pankso@slitaz.org" |
pascal@2611 | 8 DEPENDS="gtk+ sqlite dbus dbus-glib glib jpeg xorg-libX11 xorg-libXdamage" |
rcx@3977 | 9 BUILD_DEPENDS="xorg-dev gtk+-dev zip libIDL coreutils findutils xorg-libXft-dev dbus-dev dbus-glib-dev alsa-lib-dev" |
pankso@922 | 10 TARBALL="$PACKAGE-$VERSION-source.tar.bz2" |
pankso@45 | 11 WEB_SITE="http://www.mozilla.org/" |
pankso@922 | 12 WGET_URL="http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/source/$TARBALL" |
pascal@1431 | 13 CONFIG_FILES="/etc/firefox" |
pankso@45 | 14 |
pankso@45 | 15 # Rules to configure and make the package. |
pankso@45 | 16 # |
pankso@45 | 17 # A long compile time... dont forget to build libidl before and check the |
pankso@45 | 18 # .mozconfig file from the stuff and the stuff/README document. |
pankso@45 | 19 # |
pankso@45 | 20 compile_rules() |
pankso@45 | 21 { |
pankso@45 | 22 # Move the mozilla source tree to $PACKAGE-$VERSION to keep variables |
pankso@45 | 23 # and to have a nice clean. |
pankso@3818 | 24 mv mozilla-* $PACKAGE-$VERSION 2>/dev/null |
pankso@45 | 25 cp -a stuff/firefox.mozconfig $src/.mozconfig |
pankso@45 | 26 cd $src |
pascal@2486 | 27 ./configure $CONFIGURE_ARGS && |
pascal@2486 | 28 make && |
pankso@45 | 29 make DESTDIR=$PWD/_pkg install |
pankso@45 | 30 } |
pankso@45 | 31 |
pankso@45 | 32 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@45 | 33 genpkg_rules() |
pankso@45 | 34 { |
pankso@629 | 35 mkdir -p $fs/usr/lib $fs/usr/share $fs/etc |
pankso@45 | 36 cp -a $_pkg/usr/bin $fs/usr |
pankso@922 | 37 cp -a $_pkg/usr/lib/$PACKAGE-$VERSION $fs/usr/lib |
pankso@45 | 38 |
pankso@2748 | 39 # Home page, bookmarks file and branding. |
pankso@922 | 40 cp -a stuff/browserconfig.properties $fs/usr/lib/$PACKAGE-$VERSION |
pankso@2748 | 41 cp -a stuff/bookmarks.html \ |
pankso@2748 | 42 $fs/usr/lib/$PACKAGE-$VERSION/defaults/profile |
pankso@197 | 43 cp -a stuff/firefox-branding.js \ |
pankso@922 | 44 $fs/usr/lib/$PACKAGE-$VERSION/defaults/pref/ |
pankso@45 | 45 |
pankso@45 | 46 # User preference. |
pankso@922 | 47 cp -a stuff/prefs.js $fs/usr/lib/$PACKAGE-$VERSION/defaults/profile |
pankso@45 | 48 cp -a stuff/userChrome.css \ |
pankso@922 | 49 $fs/usr/lib/$PACKAGE-$VERSION/defaults/profile/chrome |
pankso@45 | 50 |
pankso@45 | 51 # Move default config to /etc/firefox (/usr maybe read-only) |
pascal@1431 | 52 for i in defaults browserconfig.properties ; do |
pascal@1431 | 53 mv -f $fs/usr/lib/$PACKAGE-$VERSION/$i $fs/etc/$PACKAGE |
pascal@1431 | 54 done |
pascal@1723 | 55 ln -s /etc/$PACKAGE/browserconfig.properties $fs/usr/lib/$PACKAGE-$VERSION |
pascal@1724 | 56 ln -s /etc/$PACKAGE $fs/usr/lib/$PACKAGE-$VERSION/defaults |
pankso@3818 | 57 |
pankso@921 | 58 # EULA is accepted by SliTaz project. |
pankso@921 | 59 sed -i s:'pref("browser.EULA.3.accepted", false);':'pref("browser.EULA.3.accepted", true);': \ |
pankso@921 | 60 $fs/etc/firefox/pref/firefox.js |
pankso@840 | 61 |
pankso@45 | 62 # Locale fr |
pankso@45 | 63 tar xjf stuff/langpack-fr@firefox.mozilla.org.tar.bz2 \ |
pascal@1709 | 64 -C $fs/usr/lib/$PACKAGE-$VERSION/extensions |
pankso@3818 | 65 #sed -i "s/maxVersion>3.0../maxVersion>$VERSION/" \ |
pankso@3818 | 66 # $fs/usr/lib/$PACKAGE-$VERSION/extensions/langpack*/install.rdf |
pankso@3818 | 67 |
pankso@629 | 68 # Search Plugin (by: oddball) |
pankso@1018 | 69 cp -a stuff/searchplugins $fs/usr/lib/firefox-$VERSION/ |
pankso@629 | 70 chown -R root.root $fs |
pankso@840 | 71 |
pankso@45 | 72 # Remove unnecessary files. |
pankso@922 | 73 rm -rf $fs/usr/lib/$PACKAGE-$VERSION/dictionaries/* |
pankso@922 | 74 rm -rf $fs/usr/lib/$PACKAGE-$VERSION/icons |
pankso@922 | 75 rm -rf $fs/usr/lib/$PACKAGE-$VERSION/libsqlite3.so |
pankso@45 | 76 } |
pankso@45 | 77 |
pankso@45 | 78 # Pre - Post install command to set default locale. |
pankso@45 | 79 pre_install() |
pankso@45 | 80 { |
pankso@45 | 81 local root |
pankso@45 | 82 root=$1 |
pascal@1702 | 83 # Get old plugins |
pascal@1702 | 84 mkdir /tmp/firefox-plugins-$$ |
pascal@1702 | 85 cp -a $root/usr/lib/firefox-*/plugins/* /tmp/firefox-plugins-$$ 2> /dev/null |
pankso@2748 | 86 # Remove old libs and configs |
pankso@45 | 87 rm -rf $root/usr/lib/firefox-* |
pankso@2748 | 88 rm -rf $root/etc/firefox |
pankso@45 | 89 } |
pankso@45 | 90 post_install() |
pankso@45 | 91 { |
pankso@45 | 92 local root |
pankso@45 | 93 root=$1 |
pankso@1018 | 94 if grep -q "fr_*" $root/etc/locale.conf 2>/dev/null; then |
pankso@629 | 95 sed -i 's/en-US/fr/' \ |
pankso@840 | 96 $root/etc/firefox/pref/firefox-l10n.js |
pankso@45 | 97 fi |
pascal@1702 | 98 for i in /tmp/firefox-plugins-$$/* ; do |
pascal@1702 | 99 [ -e $i ] || continue |
pascal@1702 | 100 [ -e /usr/lib/firefox-*/plugins/$(basename $i) ] && continue |
pascal@1702 | 101 cp -a $i /usr/lib/firefox-*/plugins/ |
pascal@1702 | 102 done |
pascal@1702 | 103 rm -rf /tmp/firefox-plugins-$$ |
pankso@45 | 104 } |