wok-6.x annotate firefox/receipt @ rev 122
Chandeg category for dev pkgs
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sat Jan 05 23:00:53 2008 +0100 (2008-01-05) |
parents | 6f15c92f2cb1 |
children | 4959e5789caa |
rev | line source |
---|---|
pankso@45 | 1 # SliTaz package receipt. |
pankso@45 | 2 |
pankso@45 | 3 PACKAGE="firefox" |
pankso@45 | 4 VERSION="2.0.0.11" |
pankso@45 | 5 CATEGORY="extra" |
pankso@45 | 6 SHORT_DESC="User friendly, secure and fast web browser." |
pankso@45 | 7 MAINTAINER="pankso@slitaz.org" |
pankso@45 | 8 DEPENDS="gtk+" |
pankso@122 | 9 BUILD_DEPENDS="xorg-dev gtk+-dev zip libIDL coreutils" |
pankso@45 | 10 TARBALL="$PACKAGE-$VERSION-source.tar.bz2" |
pankso@45 | 11 WEB_SITE="http://www.mozilla.org/" |
pankso@45 | 12 WGET_URL="ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/source/$TARBALL" |
pankso@45 | 13 |
pankso@45 | 14 # Rules to configure and make the package. |
pankso@45 | 15 # |
pankso@45 | 16 # A long compile time... dont forget to build libidl before and check the |
pankso@45 | 17 # .mozconfig file from the stuff and the stuff/README document. |
pankso@45 | 18 # |
pankso@45 | 19 compile_rules() |
pankso@45 | 20 { |
pankso@45 | 21 # Move the mozilla source tree to $PACKAGE-$VERSION to keep variables |
pankso@45 | 22 # and to have a nice clean. |
pankso@45 | 23 # |
pankso@45 | 24 mv mozilla $PACKAGE-$VERSION |
pankso@45 | 25 cp -a stuff/firefox.mozconfig $src/.mozconfig |
pankso@45 | 26 cd $src |
pankso@45 | 27 ./configure $CONFIGURE_ARGS |
pankso@45 | 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@45 | 35 mkdir -p $fs/usr/lib $fs/usr/share/pixmaps $fs/etc |
pankso@45 | 36 cp -a $_pkg/usr/bin $fs/usr |
pankso@45 | 37 cp -a $_pkg/usr/lib/$PACKAGE-$VERSION $fs/usr/lib |
pankso@45 | 38 |
pankso@45 | 39 # SliTaz Web site for the home page and bookmarks file. |
pankso@45 | 40 cp -a stuff/browserconfig.properties $fs/usr/lib/$PACKAGE-$VERSION |
pankso@45 | 41 cp -a stuff/bookmarks.html $fs/usr/lib/$PACKAGE-$VERSION/defaults/profile |
pankso@45 | 42 |
pankso@45 | 43 # User preference. |
pankso@45 | 44 cp -a stuff/prefs.js $fs/usr/lib/$PACKAGE-$VERSION/defaults/profile |
pankso@45 | 45 cp -a stuff/userChrome.css \ |
pankso@45 | 46 $fs/usr/lib/$PACKAGE-$VERSION/defaults/profile/chrome |
pankso@45 | 47 |
pankso@45 | 48 # Mozilla default pixmaps and Firefox icon from the stuff. |
pankso@45 | 49 cp -a stuff/mozicon.png $fs/usr/share/pixmaps |
pankso@45 | 50 rm -rf $fs/usr/lib/$PACKAGE-$VERSION/icons |
pankso@45 | 51 |
pankso@45 | 52 # Move default config to /etc/firefox (/usr maybe read-only) |
pankso@45 | 53 mv -f $fs/usr/lib/$PACKAGE-$VERSION/defaults $fs/etc/$PACKAGE |
pankso@45 | 54 ln -s /etc/$PACKAGE $fs/usr/lib/$PACKAGE-$VERSION/defaults |
pankso@45 | 55 |
pankso@45 | 56 # Strip |
pankso@45 | 57 strip -s $fs/usr/lib/$PACKAGE-$VERSION/* 2>/dev/null |
pankso@45 | 58 |
pankso@45 | 59 # Locale fr |
pankso@45 | 60 tar xjf stuff/langpack-fr@firefox.mozilla.org.tar.bz2 \ |
pankso@45 | 61 -C $fs/usr/lib/$PACKAGE-$VERSION/extensions |
pankso@45 | 62 |
pankso@45 | 63 # Remove unnecessary files. |
pankso@45 | 64 rm -f $fs/usr/lib/$PACKAGE-$VERSION/TestGtkEmbed |
pankso@45 | 65 } |
pankso@45 | 66 |
pankso@45 | 67 # Pre - Post install command to set default locale. |
pankso@45 | 68 pre_install() |
pankso@45 | 69 { |
pankso@45 | 70 local root |
pankso@45 | 71 root=$1 |
pankso@45 | 72 # Remove old libs |
pankso@45 | 73 rm -rf $root/usr/lib/firefox-* |
pankso@45 | 74 } |
pankso@45 | 75 post_install() |
pankso@45 | 76 { |
pankso@45 | 77 local root |
pankso@45 | 78 root=$1 |
pankso@45 | 79 if grep -q "fr_*" $root/etc/locale.conf; then |
pankso@45 | 80 sed -i 's/en-US/fr/' \ |
pankso@45 | 81 $root/usr/lib/$PACKAGE-$VERSION/defaults/pref/firefox-l10n.js |
pankso@45 | 82 fi |
pankso@45 | 83 } |