wok diff firefox-langpack-zh_TW/receipt @ rev 7493

Fixed all firefox-langpack to support downloading source to SOURCES_REPOSITORY. Also updated VERSION of all firefox-langpack to 3.6.12 so it can be updated with every new version of firefox.
author Christopher Rogers <slaxemulator@gmail.com>
date Fri Dec 03 02:41:55 2010 +0000 (2010-12-03)
parents 9b77fe220ab2
children eae5abfd796b
line diff
     1.1 --- a/firefox-langpack-zh_TW/receipt	Fri Dec 03 21:07:24 2010 +0800
     1.2 +++ b/firefox-langpack-zh_TW/receipt	Fri Dec 03 02:41:55 2010 +0000
     1.3 @@ -10,23 +10,31 @@
     1.4  WEB_SITE="http://www.mozilla.com"
     1.5  TARBALL="zh-TW.xpi"
     1.6  Path="langpack-${TARBALL%.xpi}@firefox.mozilla.org"
     1.7 -URL="http://releases.mozilla.org/pub/mozilla.org/firefox/releases/latest-$VERSION/linux-i686/xpi/$TARBALL"
     1.8 +URL="http://releases.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/linux-i686/xpi/$TARBALL"
     1.9 +
    1.10  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.11  genpkg_rules()
    1.12  {
    1.13  
    1.14          mkdir -p $fs/var/$Path
    1.15 -        wget $URL -P /tmp
    1.16 -        unzip /tmp/$TARBALL -d $fs/var/$Path
    1.17 +	if [ -f $SOURCES_REPOSITORY/$PACKAGE-$VERSION.xpi ]; then
    1.18 +		unzip $SOURCES_REPOSITORY/$PACKAGE-$VERSION.xpi -d $fs/var/$Path
    1.19 +	else
    1.20 +		[ -L /usr/bin/wget ] && tazpkg get-install wget --forced
    1.21 +	        wget -O $SOURCES_REPOSITORY/$PACKAGE-$VERSION.xpi $URL
    1.22 +		unzip $SOURCES_REPOSITORY/$PACKAGE-$VERSION.xpi -d $fs/var/$Path
    1.23 +	fi
    1.24  }
    1.25 +
    1.26  post_install()
    1.27  {
    1.28 -sed -i "/pref/s/en-US/${TARBALL%.xpi}/" /etc/firefox/pref/firefox-l10n.js
    1.29 -RealPath=/usr/lib/firefox-*/extensions/    
    1.30 -mv -f /var/$Path $RealPath
    1.31 +	sed -i "/pref/s/en-US/${TARBALL%.xpi}/" /etc/firefox/pref/firefox-l10n.js
    1.32 +	RealPath=/usr/lib/firefox-*/extensions/    
    1.33 +	mv -f /var/$Path $RealPath
    1.34  }
    1.35 +
    1.36  post_remove()
    1.37  {
    1.38 -sed -i "/pref/s/${TARBALL%.xpi}/en-US/" /etc/firefox/pref/firefox-l10n.js
    1.39 -rm -rf "/usr/lib/firefox-*/extensions/$Path"
    1.40 +	sed -i "/pref/s/${TARBALL%.xpi}/en-US/" /etc/firefox/pref/firefox-l10n.js
    1.41 +	rm -rf "/usr/lib/firefox-*/extensions/$Path"
    1.42  }