wok-next rev 7527

Changed all firefox-langpack to not force change locale. This so you can more then one installed on say a livecd.
author Christopher Rogers <slaxemulator@gmail.com>
date Sun Dec 05 21:45:02 2010 +0000 (2010-12-05)
parents eaba2125c423
children 73919ebf2a75
files firefox-langpack-fr/receipt firefox-langpack-zh_CN/receipt firefox-langpack-zh_TW/receipt
line diff
     1.1 --- a/firefox-langpack-fr/receipt	Sun Dec 05 21:42:41 2010 +0000
     1.2 +++ b/firefox-langpack-fr/receipt	Sun Dec 05 21:45:02 2010 +0000
     1.3 @@ -6,37 +6,46 @@
     1.4  SHORT_DESC="France 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="fr.xpi"
    1.10 -Path=langpack-fr@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 -        
    1.50 +	EXTDIR="$fs/usr/lib/$SOURCE-$VERSION/extensions"
    1.51 +	mkdir -p $EXTDIR
    1.52 +	cp -a $LANG_DIR $EXTDIR
    1.53  }
    1.54  
    1.55  post_install()
    1.56  {
    1.57 -	sed -i '/pref/s/en-US/fr/' /etc/firefox/pref/firefox-l10n.js
    1.58 -	RealPath=/usr/lib/firefox-*/extensions/    
    1.59 -	cp -af /var/$Path $RealPath
    1.60 -	rm -rf /var/$Path
    1.61 +	echo ""
    1.62 +	echo "Use the code below to change locale of firefox in shell:"
    1.63 +	echo "sed -i '/pref/s/en-US/$LANG/' /etc/firefox/pref/firefox-l10n.js"
    1.64 +	echo ""
    1.65  }
    1.66  
    1.67 -post_remove()
    1.68 -{
    1.69 -	sed -i '/pref/s/fr/en-US/' /etc/firefox/pref/firefox-l10n.js
    1.70 -	rm -rf "/usr/lib/firefox-*/extensions/$Path"
    1.71 -}
     2.1 --- a/firefox-langpack-zh_CN/receipt	Sun Dec 05 21:42:41 2010 +0000
     2.2 +++ b/firefox-langpack-zh_CN/receipt	Sun Dec 05 21:45:02 2010 +0000
     2.3 @@ -6,35 +6,45 @@
     2.4  SHORT_DESC="Chinese Language Package for firefox"
     2.5  MAINTAINER="lufeng369@gmail.com"
     2.6  DEPENDS="firefox"
     2.7 -BUILD_DEPENDS="unzip"
     2.8  WEB_SITE="http://www.mozilla.com"
     2.9 -TARBALL="zh-CN.xpi"
    2.10 -Path=langpack-zh-CN@firefox.mozilla.org
    2.11 +SOURCE="firefox"
    2.12 +LANG=`echo $PACKAGE | cut -d'-' -f3 | tr '_' '-'`
    2.13 +LANG_DIR="langpack-$LANG@thunderbird.mozilla.org"
    2.14 +TARBALL="$LANG.xpi"
    2.15  URL="http://releases.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/linux-i686/xpi/$TARBALL"
    2.16 +
    2.17 +# Rules to gen a SliTaz package suitable for Tazpkg.
    2.18 +compile_rules()
    2.19 +{
    2.20 +	cd $WOK/$PACKAGE
    2.21 +        mkdir -p $LANG_DIR
    2.22 +
    2.23 +	# Get xpi
    2.24 +	if [ -f $SOURCES_REPOSITORY/$PACKAGE-$VERSION.xpi ]; then
    2.25 +		echo "Using current langpack ($PACKAGE-$VERSION.xpi)"
    2.26 +	else
    2.27 +		echo "Downloading langpack ($PACKAGE-$VERSION.xpi)"
    2.28 +	        wget -O $SOURCES_REPOSITORY/$PACKAGE-$VERSION.xpi $URL
    2.29 +	fi
    2.30 +	# Uncompress
    2.31 +	echo -n "Uncompressing langpack ($PACKAGE-$VERSION.xpi)"
    2.32 +	mkdir -p $LANG_DIR && unzip $SOURCES_REPOSITORY/$PACKAGE-$VERSION.xpi -d $LANG_DIR
    2.33 +	status
    2.34 +        
    2.35 +}
    2.36 +
    2.37  # Rules to gen a SliTaz package suitable for Tazpkg.
    2.38  genpkg_rules()
    2.39  {
    2.40 -
    2.41 -        mkdir -p $fs/var/$Path
    2.42 -	if [ -f $SOURCES_REPOSITORY/$PACKAGE-$VERSION.xpi ]; then
    2.43 -		unzip $SOURCES_REPOSITORY/$PACKAGE-$VERSION.xpi -d $fs/var/$Path
    2.44 -	else
    2.45 -		[ -L /usr/bin/wget ] && tazpkg get-install wget --forced
    2.46 -	        wget -O $SOURCES_REPOSITORY/$PACKAGE-$VERSION.xpi $URL
    2.47 -		unzip $SOURCES_REPOSITORY/$PACKAGE-$VERSION.xpi -d $fs/var/$Path
    2.48 -	fi
    2.49 +	EXTDIR="$fs/usr/lib/$SOURCE-$VERSION/extensions"
    2.50 +	mkdir -p $EXTDIR
    2.51 +	cp -a $LANG_DIR $EXTDIR
    2.52  }
    2.53  
    2.54  post_install()
    2.55  {
    2.56 -	sed -i '/pref/s/en-US/zh-CN/' /etc/firefox/pref/firefox-l10n.js
    2.57 -	RealPath=/usr/lib/firefox-*/extensions/    
    2.58 -	cp -af /var/$Path $RealPath
    2.59 -	rm -rf /var/$Path
    2.60 -}
    2.61 -
    2.62 -post_remove()
    2.63 -{
    2.64 -	sed -i '/pref/s/zh-CN/en-US/' /etc/firefox/pref/firefox-l10n.js
    2.65 -	rm -rf "/usr/lib/firefox-*/extensions/$Path"
    2.66 +	echo ""
    2.67 +	echo "Use the code below to change locale of firefox in shell:"
    2.68 +	echo "sed -i '/pref/s/en-US/$LANG/' /etc/firefox/pref/firefox-l10n.js"
    2.69 +	echo ""
    2.70  }
    2.71 \ No newline at end of file
     3.1 --- a/firefox-langpack-zh_TW/receipt	Sun Dec 05 21:42:41 2010 +0000
     3.2 +++ b/firefox-langpack-zh_TW/receipt	Sun Dec 05 21:45:02 2010 +0000
     3.3 @@ -6,36 +6,45 @@
     3.4  SHORT_DESC="Chinese Language Package for firefox"
     3.5  MAINTAINER="lufeng369@gmail.com"
     3.6  DEPENDS="firefox"
     3.7 -BUILD_DEPENDS="unzip"
     3.8  WEB_SITE="http://www.mozilla.com"
     3.9 -TARBALL="zh-TW.xpi"
    3.10 -Path="langpack-${TARBALL%.xpi}@firefox.mozilla.org"
    3.11 +SOURCE="firefox"
    3.12 +LANG=`echo $PACKAGE | cut -d'-' -f3 | tr '_' '-'`
    3.13 +LANG_DIR="langpack-$LANG@thunderbird.mozilla.org"
    3.14 +TARBALL="$LANG.xpi"
    3.15  URL="http://releases.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/linux-i686/xpi/$TARBALL"
    3.16  
    3.17  # Rules to gen a SliTaz package suitable for Tazpkg.
    3.18 +compile_rules()
    3.19 +{
    3.20 +	cd $WOK/$PACKAGE
    3.21 +        mkdir -p $LANG_DIR
    3.22 +
    3.23 +	# Get xpi
    3.24 +	if [ -f $SOURCES_REPOSITORY/$PACKAGE-$VERSION.xpi ]; then
    3.25 +		echo "Using current langpack ($PACKAGE-$VERSION.xpi)"
    3.26 +	else
    3.27 +		echo "Downloading langpack ($PACKAGE-$VERSION.xpi)"
    3.28 +	        wget -O $SOURCES_REPOSITORY/$PACKAGE-$VERSION.xpi $URL
    3.29 +	fi
    3.30 +	# Uncompress
    3.31 +	echo -n "Uncompressing langpack ($PACKAGE-$VERSION.xpi)"
    3.32 +	mkdir -p $LANG_DIR && unzip $SOURCES_REPOSITORY/$PACKAGE-$VERSION.xpi -d $LANG_DIR
    3.33 +	status
    3.34 +        
    3.35 +}
    3.36 +
    3.37 +# Rules to gen a SliTaz package suitable for Tazpkg.
    3.38  genpkg_rules()
    3.39  {
    3.40 -
    3.41 -        mkdir -p $fs/var/$Path
    3.42 -	if [ -f $SOURCES_REPOSITORY/$PACKAGE-$VERSION.xpi ]; then
    3.43 -		unzip $SOURCES_REPOSITORY/$PACKAGE-$VERSION.xpi -d $fs/var/$Path
    3.44 -	else
    3.45 -		[ -L /usr/bin/wget ] && tazpkg get-install wget --forced
    3.46 -	        wget -O $SOURCES_REPOSITORY/$PACKAGE-$VERSION.xpi $URL
    3.47 -		unzip $SOURCES_REPOSITORY/$PACKAGE-$VERSION.xpi -d $fs/var/$Path
    3.48 -	fi
    3.49 +	EXTDIR="$fs/usr/lib/$SOURCE-$VERSION/extensions"
    3.50 +	mkdir -p $EXTDIR
    3.51 +	cp -a $LANG_DIR $EXTDIR
    3.52  }
    3.53  
    3.54  post_install()
    3.55  {
    3.56 -	sed -i "/pref/s/en-US/${TARBALL%.xpi}/" /etc/firefox/pref/firefox-l10n.js
    3.57 -	RealPath=/usr/lib/firefox-*/extensions/    
    3.58 -	cp -af /var/$Path $RealPath
    3.59 -	rm -rf /var/$Path
    3.60 +	echo ""
    3.61 +	echo "Use the code below to change locale of firefox in shell:"
    3.62 +	echo "sed -i '/pref/s/en-US/$LANG/' /etc/firefox/pref/firefox-l10n.js"
    3.63 +	echo ""
    3.64  }
    3.65 -
    3.66 -post_remove()
    3.67 -{
    3.68 -	sed -i "/pref/s/${TARBALL%.xpi}/en-US/" /etc/firefox/pref/firefox-l10n.js
    3.69 -	rm -rf "/usr/lib/firefox-*/extensions/$Path"
    3.70 -}