wok-6.x annotate firefox-langpack-zh_TW/receipt @ rev 7580
Up: all firefox-langpack to 3.6.13.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Thu Dec 09 14:43:44 2010 +0000 (2010-12-09) |
parents | 0192b7b7169c |
children | cddbcd5b6530 |
rev | line source |
---|---|
lufeng369@7491 | 1 # SliTaz package receipt. |
lufeng369@7491 | 2 |
lufeng369@7491 | 3 PACKAGE="firefox-langpack-zh_TW" |
slaxemulator@7580 | 4 VERSION="3.6.13" |
lufeng369@7491 | 5 CATEGORY="network" |
lufeng369@7491 | 6 SHORT_DESC="Chinese Language Package for firefox" |
lufeng369@7491 | 7 MAINTAINER="lufeng369@gmail.com" |
lufeng369@7491 | 8 DEPENDS="firefox" |
lufeng369@7491 | 9 WEB_SITE="http://www.mozilla.com" |
slaxemulator@7527 | 10 SOURCE="firefox" |
slaxemulator@7527 | 11 LANG=`echo $PACKAGE | cut -d'-' -f3 | tr '_' '-'` |
slaxemulator@7527 | 12 LANG_DIR="langpack-$LANG@thunderbird.mozilla.org" |
slaxemulator@7527 | 13 TARBALL="$LANG.xpi" |
slaxemulator@7493 | 14 URL="http://releases.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/linux-i686/xpi/$TARBALL" |
slaxemulator@7493 | 15 |
lufeng369@7491 | 16 # Rules to gen a SliTaz package suitable for Tazpkg. |
slaxemulator@7527 | 17 compile_rules() |
slaxemulator@7527 | 18 { |
slaxemulator@7527 | 19 cd $WOK/$PACKAGE |
slaxemulator@7527 | 20 mkdir -p $LANG_DIR |
slaxemulator@7527 | 21 |
slaxemulator@7527 | 22 # Get xpi |
slaxemulator@7527 | 23 if [ -f $SOURCES_REPOSITORY/$PACKAGE-$VERSION.xpi ]; then |
slaxemulator@7527 | 24 echo "Using current langpack ($PACKAGE-$VERSION.xpi)" |
slaxemulator@7527 | 25 else |
slaxemulator@7527 | 26 echo "Downloading langpack ($PACKAGE-$VERSION.xpi)" |
slaxemulator@7527 | 27 wget -O $SOURCES_REPOSITORY/$PACKAGE-$VERSION.xpi $URL |
slaxemulator@7527 | 28 fi |
slaxemulator@7527 | 29 # Uncompress |
slaxemulator@7527 | 30 echo -n "Uncompressing langpack ($PACKAGE-$VERSION.xpi)" |
slaxemulator@7527 | 31 mkdir -p $LANG_DIR && unzip $SOURCES_REPOSITORY/$PACKAGE-$VERSION.xpi -d $LANG_DIR |
slaxemulator@7527 | 32 status |
slaxemulator@7527 | 33 |
slaxemulator@7527 | 34 } |
slaxemulator@7527 | 35 |
slaxemulator@7527 | 36 # Rules to gen a SliTaz package suitable for Tazpkg. |
lufeng369@7491 | 37 genpkg_rules() |
lufeng369@7491 | 38 { |
slaxemulator@7527 | 39 EXTDIR="$fs/usr/lib/$SOURCE-$VERSION/extensions" |
slaxemulator@7527 | 40 mkdir -p $EXTDIR |
slaxemulator@7527 | 41 cp -a $LANG_DIR $EXTDIR |
lufeng369@7491 | 42 } |
slaxemulator@7493 | 43 |
lufeng369@7491 | 44 post_install() |
lufeng369@7491 | 45 { |
slaxemulator@7527 | 46 echo "" |
slaxemulator@7527 | 47 echo "Use the code below to change locale of firefox in shell:" |
slaxemulator@7527 | 48 echo "sed -i '/pref/s/en-US/$LANG/' /etc/firefox/pref/firefox-l10n.js" |
slaxemulator@7527 | 49 echo "" |
lufeng369@7491 | 50 } |