wok-6.x diff firefox-langpack-zh_CN/receipt @ rev 7559

Made sure that /usr/share folder is made in gnome-doc-utils-dev. Otherwise /usr/share/aclocal folder becomes /usr/share folder.
author Christopher Rogers <slaxemulator@gmail.com>
date Wed Dec 08 11:04:39 2010 +0000 (2010-12-08)
parents 4fe0fd2676eb
children b78f62881ef0
line diff
     1.1 --- a/firefox-langpack-zh_CN/receipt	Sat Dec 04 00:03:00 2010 +0000
     1.2 +++ b/firefox-langpack-zh_CN/receipt	Wed Dec 08 11:04:39 2010 +0000
     1.3 @@ -6,35 +6,45 @@
     1.4  SHORT_DESC="Chinese Language Package for firefox"
     1.5  MAINTAINER="lufeng369@gmail.com"
     1.6  DEPENDS="firefox"
     1.7 -BUILD_DEPENDS="unzip"
     1.8  WEB_SITE="http://www.mozilla.com"
     1.9 -TARBALL="zh-CN.xpi"
    1.10 -Path=langpack-zh-CN@firefox.mozilla.org
    1.11 +SOURCE="firefox"
    1.12 +LANG=`echo $PACKAGE | cut -d'-' -f3 | tr '_' '-'`
    1.13 +LANG_DIR="langpack-$LANG@thunderbird.mozilla.org"
    1.14 +TARBALL="$LANG.xpi"
    1.15  URL="http://releases.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/linux-i686/xpi/$TARBALL"
    1.16 +
    1.17 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.18 +compile_rules()
    1.19 +{
    1.20 +	cd $WOK/$PACKAGE
    1.21 +        mkdir -p $LANG_DIR
    1.22 +
    1.23 +	# Get xpi
    1.24 +	if [ -f $SOURCES_REPOSITORY/$PACKAGE-$VERSION.xpi ]; then
    1.25 +		echo "Using current langpack ($PACKAGE-$VERSION.xpi)"
    1.26 +	else
    1.27 +		echo "Downloading langpack ($PACKAGE-$VERSION.xpi)"
    1.28 +	        wget -O $SOURCES_REPOSITORY/$PACKAGE-$VERSION.xpi $URL
    1.29 +	fi
    1.30 +	# Uncompress
    1.31 +	echo -n "Uncompressing langpack ($PACKAGE-$VERSION.xpi)"
    1.32 +	mkdir -p $LANG_DIR && unzip $SOURCES_REPOSITORY/$PACKAGE-$VERSION.xpi -d $LANG_DIR
    1.33 +	status
    1.34 +        
    1.35 +}
    1.36 +
    1.37  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.38  genpkg_rules()
    1.39  {
    1.40 -
    1.41 -        mkdir -p $fs/var/$Path
    1.42 -	if [ -f $SOURCES_REPOSITORY/$PACKAGE-$VERSION.xpi ]; then
    1.43 -		unzip $SOURCES_REPOSITORY/$PACKAGE-$VERSION.xpi -d $fs/var/$Path
    1.44 -	else
    1.45 -		[ -L /usr/bin/wget ] && tazpkg get-install wget --forced
    1.46 -	        wget -O $SOURCES_REPOSITORY/$PACKAGE-$VERSION.xpi $URL
    1.47 -		unzip $SOURCES_REPOSITORY/$PACKAGE-$VERSION.xpi -d $fs/var/$Path
    1.48 -	fi
    1.49 +	EXTDIR="$fs/usr/lib/$SOURCE-$VERSION/extensions"
    1.50 +	mkdir -p $EXTDIR
    1.51 +	cp -a $LANG_DIR $EXTDIR
    1.52  }
    1.53  
    1.54  post_install()
    1.55  {
    1.56 -	sed -i '/pref/s/en-US/zh-CN/' /etc/firefox/pref/firefox-l10n.js
    1.57 -	RealPath=/usr/lib/firefox-*/extensions/    
    1.58 -	cp -af /var/$Path $RealPath
    1.59 -	rm -rf /var/$Path
    1.60 -}
    1.61 -
    1.62 -post_remove()
    1.63 -{
    1.64 -	sed -i '/pref/s/zh-CN/en-US/' /etc/firefox/pref/firefox-l10n.js
    1.65 -	rm -rf "/usr/lib/firefox-*/extensions/$Path"
    1.66 +	echo ""
    1.67 +	echo "Use the code below to change locale of firefox in shell:"
    1.68 +	echo "sed -i '/pref/s/en-US/$LANG/' /etc/firefox/pref/firefox-l10n.js"
    1.69 +	echo ""
    1.70  }
    1.71 \ No newline at end of file