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