wok-next rev 4855

glibc-base and locale pack: switch to UTF-8
author Christophe Lincoln <pankso@slitaz.org>
date Tue Feb 02 22:17:52 2010 +0100 (2010-02-02)
parents 6da009027189
children 7bbf30a4498b
files glibc-base/receipt glibc-base/stuff/mkdir.list glibc-base/stuff/wanted-files.list glibc-locale/receipt locale-cs/receipt locale-de/receipt locale-es/receipt locale-fr/receipt locale-hu/receipt locale-id/receipt locale-it/receipt locale-pt/receipt locale-ru/receipt locale-sl/receipt locale-zh_CN/receipt locale-zh_TW/receipt slitaz-i18n/receipt slitaz-i18n/stuff/locale-pack.conf slitaz-i18n/stuff/locale-pack.functions
line diff
     1.1 --- a/glibc-base/receipt	Tue Feb 02 15:27:48 2010 +0100
     1.2 +++ b/glibc-base/receipt	Tue Feb 02 22:17:52 2010 +0100
     1.3 @@ -3,11 +3,13 @@
     1.4  PACKAGE="glibc-base"
     1.5  VERSION="2.10.1"
     1.6  CATEGORY="base-system"
     1.7 -SHORT_DESC="GNU libc minimal libraries for SliTaz based system."
     1.8 +SHORT_DESC="GNU libc minimal libraries and UTF-8 support for SliTaz."
     1.9  WEB_SITE="http://www.gnu.org/software/libc/"
    1.10  WANTED="glibc"
    1.11  MAINTAINER="pankso@slitaz.org"
    1.12  
    1.13 +DEFAULT_LOCALE="de_DE en_US en_GB es_ES fr_FR fr_CH pt_BR ru_RU"
    1.14 +
    1.15  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.16  #
    1.17  # Full glibc is very long to compile (see package glibc for more
    1.18 @@ -27,6 +29,11 @@
    1.19      do
    1.20      	cp -a ${_pkg}$file ${fs}$file
    1.21      done
    1.22 +    # i18n
    1.23 +    for i in $DEFAULT_LOCALE
    1.24 +	do
    1.25 +		cp $_pkg/usr/share/i18n/locales/$i $fs/usr/share/i18n/locales
    1.26 +	done
    1.27  }
    1.28  
    1.29  # Call ldconfig and remove old glibc-2.3.6 (slitaz 1.0) and glibc-2.7
     2.1 --- a/glibc-base/stuff/mkdir.list	Tue Feb 02 15:27:48 2010 +0100
     2.2 +++ b/glibc-base/stuff/mkdir.list	Tue Feb 02 22:17:52 2010 +0100
     2.3 @@ -3,6 +3,8 @@
     2.4  /usr/bin
     2.5  /usr/lib/gconv
     2.6  /usr/lib/locale
     2.7 -/usr/share/locale/fr/LC_MESSAGES
     2.8  /usr/share/zoneinfo/America
     2.9  /usr/share/zoneinfo/Europe
    2.10 +/usr/share/i18n/locales
    2.11 +/usr/share/i18n/charmaps
    2.12 +/usr/share/locale
     3.1 --- a/glibc-base/stuff/wanted-files.list	Tue Feb 02 15:27:48 2010 +0100
     3.2 +++ b/glibc-base/stuff/wanted-files.list	Tue Feb 02 22:17:52 2010 +0100
     3.3 @@ -17,9 +17,26 @@
     3.4  /usr/lib/gconv/UNICODE.so
     3.5  /usr/lib/gconv/gconv-modules
     3.6  /usr/lib/gconv/ANSI_X3.110.so
     3.7 -/usr/lib/gconv/ISO8859-1.so
     3.8 -/usr/lib/gconv/ISO8859-15.so
     3.9 -/usr/lib/gconv/ISO8859-2.so
    3.10 +
    3.11 +/usr/bin/locale
    3.12 +/usr/bin/localedef
    3.13 +
    3.14 +/usr/share/locale/locale.alias
    3.15 +/usr/share/i18n/charmaps/UTF-8.gz
    3.16 +
    3.17 +/usr/share/i18n/locales/i18n
    3.18 +/usr/share/i18n/locales/iso14651_t1 
    3.19 +/usr/share/i18n/locales/iso14651_t1_common 
    3.20 +/usr/share/i18n/locales/translit_neutral 
    3.21 +/usr/share/i18n/locales/translit_combining
    3.22 +/usr/share/i18n/locales/translit_circle 
    3.23 +/usr/share/i18n/locales/translit_cjk_compat 
    3.24 +/usr/share/i18n/locales/translit_compat 
    3.25 +/usr/share/i18n/locales/translit_font 
    3.26 +/usr/share/i18n/locales/translit_fraction
    3.27 +/usr/share/i18n/locales/translit_narrow
    3.28 +/usr/share/i18n/locales/translit_small
    3.29 +/usr/share/i18n/locales/translit_wide
    3.30  
    3.31  /usr/share/zoneinfo/Europe/Madrid
    3.32  /usr/share/zoneinfo/Europe/Moscow
    3.33 @@ -34,11 +51,6 @@
    3.34  /usr/share/zoneinfo/America/Sao_Paulo
    3.35  /usr/share/zoneinfo/America/Mexico_City
    3.36  
    3.37 -/usr/share/locale/fr/LC_MESSAGES/libc.mo
    3.38 -/usr/share/locale/locale.alias
    3.39 -
    3.40 -/usr/bin/locale
    3.41 -
    3.42  /etc/rpc
    3.43  /etc/ld.so.conf
    3.44  /etc/ld.so.cache
     4.1 --- a/glibc-locale/receipt	Tue Feb 02 15:27:48 2010 +0100
     4.2 +++ b/glibc-locale/receipt	Tue Feb 02 22:17:52 2010 +0100
     4.3 @@ -5,14 +5,11 @@
     4.4  CATEGORY="system-tools"
     4.5  SHORT_DESC="The GNU C libraries locale files and utilities (see also locale-*)."
     4.6  MAINTAINER="pankso@slitaz.org"
     4.7 -DEPENDS="glibc-base glibc-extra-samba"
     4.8 +DEPENDS="glibc-base glibc-extra-samba slitaz-i18n"
     4.9  WANTED="glibc"
    4.10  WEB_SITE="http://www.gnu.org/software/libc/"
    4.11  
    4.12 -LOCALE_PACK="de cs es fr ru id it pt hu"
    4.13 -
    4.14 -# When we will switch to UTF-8 some change must be done here, localdef
    4.15 -# must be include in glibc-base as well has some files in /usr/share/i18n.
    4.16 +LOCALE_PACK="cs de es fr hu id it pt ru sl zh_CN zh_TW"
    4.17  
    4.18  # Rules to gen a SliTaz package suitable for Tazpkg.
    4.19  genpkg_rules()
    4.20 @@ -25,10 +22,18 @@
    4.21  	cp -a $_pkg/usr/share/zoneinfo $fs/usr/share
    4.22  
    4.23  	# Utilities and tools
    4.24 -	cp -a $_pkg/usr/bin/localedef $fs/usr/bin
    4.25  	cp -a $_pkg/usr/bin/iconv $fs/usr/bin
    4.26  	cp -a $_pkg/usr/bin/tzselect $fs/usr/bin
    4.27  
    4.28 +	# Rm slitaz-i18n files.
    4.29 +	ver=`grep ^VERSION $WOK/slitaz-i18n/receipt | cut -d "\"" -f 2`
    4.30 +	echo -n "Removing all slitaz-i18n files..."
    4.31 +	for file in `cat $WOK/slitaz-i18n/taz/slitaz-i18n-$ver/files.list`
    4.32 +	do
    4.33 +		rm -f ${fs}$file
    4.34 +	done
    4.35 +	status
    4.36 +	
    4.37  	# Rm base files.
    4.38  	echo -n "Removing all base files..."
    4.39  	for file in `cat $WOK/glibc-base/taz/glibc-base-$VERSION/files.list`
     5.1 --- a/locale-cs/receipt	Tue Feb 02 15:27:48 2010 +0100
     5.2 +++ b/locale-cs/receipt	Tue Feb 02 22:17:52 2010 +0100
     5.3 @@ -11,7 +11,7 @@
     5.4  
     5.5  LOCALE="cs"
     5.6  LOCALEDEF="cs_CZ"
     5.7 -CHARMAP="ISO-8859-2"
     5.8 +CHARMAP="UTF-8"
     5.9  
    5.10  # Rules to configure and make the package.
    5.11  compile_rules()
    5.12 @@ -36,7 +36,6 @@
    5.13  	get_core_messages
    5.14  	PACKAGE="$PKG_NAME"
    5.15  	VERSION="$PKG_VERS"
    5.16 -	localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF
    5.17  }
    5.18  
    5.19  # Back to C if it's the last used locale.
     6.1 --- a/locale-de/receipt	Tue Feb 02 15:27:48 2010 +0100
     6.2 +++ b/locale-de/receipt	Tue Feb 02 22:17:52 2010 +0100
     6.3 @@ -11,7 +11,7 @@
     6.4  
     6.5  LOCALE="de"
     6.6  LOCALEDEF="de_DE"
     6.7 -CHARMAP="ISO-8859-1"
     6.8 +CHARMAP="UTF-8"
     6.9  
    6.10  # Rules to configure and make the package.
    6.11  compile_rules()
    6.12 @@ -36,7 +36,6 @@
    6.13  	get_core_messages
    6.14  	PACKAGE="$PKG_NAME"
    6.15  	VERSION="$PKG_VERS"
    6.16 -	localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF
    6.17  }
    6.18  
    6.19  # Back to C if it's the last used locale.
     7.1 --- a/locale-es/receipt	Tue Feb 02 15:27:48 2010 +0100
     7.2 +++ b/locale-es/receipt	Tue Feb 02 22:17:52 2010 +0100
     7.3 @@ -11,7 +11,7 @@
     7.4  
     7.5  LOCALE="es"
     7.6  LOCALEDEF="es_ES"
     7.7 -CHARMAP="ISO-8859-1"
     7.8 +CHARMAP="UTF-8"
     7.9  
    7.10  # Rules to configure and make the package.
    7.11  compile_rules()
    7.12 @@ -36,7 +36,6 @@
    7.13  	get_core_messages
    7.14  	PACKAGE="$PKG_NAME"
    7.15  	VERSION="$PKG_VERS"
    7.16 -	localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF
    7.17  }
    7.18  
    7.19  # Back to C if it's the last used locale.
     8.1 --- a/locale-fr/receipt	Tue Feb 02 15:27:48 2010 +0100
     8.2 +++ b/locale-fr/receipt	Tue Feb 02 22:17:52 2010 +0100
     8.3 @@ -11,7 +11,7 @@
     8.4  
     8.5  LOCALE="fr"
     8.6  LOCALEDEF="fr_FR"
     8.7 -CHARMAP="ISO-8859-1"
     8.8 +CHARMAP="UTF-8"
     8.9  
    8.10  # Rules to configure and make the package.
    8.11  compile_rules()
    8.12 @@ -35,9 +35,11 @@
    8.13  	mk_locale_dir
    8.14  	get_slitaz_messages
    8.15  	get_core_messages
    8.16 +	ver=`grep ^VERSION $WOK/glibc/receipt | cut -d "\"" -f 2`
    8.17 +	cp -a $WOK/glibc/glibc-$ver/_pkg/usr/share/locale/$LOCALE/* \
    8.18 +		$fs/usr/share/locale/$LOCALE
    8.19  	PACKAGE="$PKG_NAME"
    8.20  	VERSION="$PKG_VERS"
    8.21 -	localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF
    8.22  }
    8.23  
    8.24  # Back to C if it's the last used locale.
     9.1 --- a/locale-hu/receipt	Tue Feb 02 15:27:48 2010 +0100
     9.2 +++ b/locale-hu/receipt	Tue Feb 02 22:17:52 2010 +0100
     9.3 @@ -11,7 +11,7 @@
     9.4  
     9.5  LOCALE="hu"
     9.6  LOCALEDEF="hu_HU"
     9.7 -CHARMAP="ISO-8859-2"
     9.8 +CHARMAP="UTF-8"
     9.9  
    9.10  # Rules to configure and make the package.
    9.11  compile_rules()
    9.12 @@ -36,7 +36,6 @@
    9.13  	get_core_messages
    9.14  	PACKAGE="$PKG_NAME"
    9.15  	VERSION="$PKG_VERS"
    9.16 -	localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF
    9.17  }
    9.18  
    9.19  # Back to C if it's the last used locale.
    10.1 --- a/locale-id/receipt	Tue Feb 02 15:27:48 2010 +0100
    10.2 +++ b/locale-id/receipt	Tue Feb 02 22:17:52 2010 +0100
    10.3 @@ -11,7 +11,7 @@
    10.4  
    10.5  LOCALE="id"
    10.6  LOCALEDEF="id_ID"
    10.7 -CHARMAP="ISO-8859-1"
    10.8 +CHARMAP="UTF-8"
    10.9  
   10.10  # Rules to configure and make the package.
   10.11  compile_rules()
   10.12 @@ -36,7 +36,6 @@
   10.13  	get_core_messages
   10.14  	PACKAGE="$PKG_NAME"
   10.15  	VERSION="$PKG_VERS"
   10.16 -	localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF
   10.17  }
   10.18  
   10.19  # Back to C if it's the last used locale.
    11.1 --- a/locale-it/receipt	Tue Feb 02 15:27:48 2010 +0100
    11.2 +++ b/locale-it/receipt	Tue Feb 02 22:17:52 2010 +0100
    11.3 @@ -11,7 +11,7 @@
    11.4  
    11.5  LOCALE="it"
    11.6  LOCALEDEF="it_IT"
    11.7 -CHARMAP="ISO-8859-1"
    11.8 +CHARMAP="UTF-8"
    11.9  
   11.10  # Rules to configure and make the package.
   11.11  compile_rules()
   11.12 @@ -36,7 +36,6 @@
   11.13  	get_core_messages
   11.14  	PACKAGE="$PKG_NAME"
   11.15  	VERSION="$PKG_VERS"
   11.16 -	localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF
   11.17  }
   11.18  
   11.19  # Back to C if it's the last used locale.
    12.1 --- a/locale-pt/receipt	Tue Feb 02 15:27:48 2010 +0100
    12.2 +++ b/locale-pt/receipt	Tue Feb 02 22:17:52 2010 +0100
    12.3 @@ -11,7 +11,7 @@
    12.4  
    12.5  LOCALE="pt"
    12.6  LOCALEDEF="pt_BR"
    12.7 -CHARMAP="ISO-8859-1"
    12.8 +CHARMAP="UTF-8"
    12.9  
   12.10  # Rules to configure and make the package.
   12.11  compile_rules()
   12.12 @@ -37,7 +37,6 @@
   12.13  	PACKAGE="$PKG_NAME"
   12.14  	VERSION="$PKG_VERS"
   12.15  	LOCALE="pt_BR"
   12.16 -	localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF
   12.17  }
   12.18  
   12.19  # Post install to remove old locale-pt_BR.
    13.1 --- a/locale-ru/receipt	Tue Feb 02 15:27:48 2010 +0100
    13.2 +++ b/locale-ru/receipt	Tue Feb 02 22:17:52 2010 +0100
    13.3 @@ -36,7 +36,6 @@
    13.4  	get_core_messages
    13.5  	PACKAGE="$PKG_NAME"
    13.6  	VERSION="$PKG_VERS"
    13.7 -	localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF
    13.8  }
    13.9  
   13.10  # Back to C if it's the last used locale.
    14.1 --- a/locale-sl/receipt	Tue Feb 02 15:27:48 2010 +0100
    14.2 +++ b/locale-sl/receipt	Tue Feb 02 22:17:52 2010 +0100
    14.3 @@ -36,7 +36,6 @@
    14.4  	get_core_messages
    14.5  	PACKAGE="$PKG_NAME"
    14.6  	VERSION="$PKG_VERS"
    14.7 -	localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF
    14.8  }
    14.9  
   14.10  # Back to C if it's the last used locale.
    15.1 --- a/locale-zh_CN/receipt	Tue Feb 02 15:27:48 2010 +0100
    15.2 +++ b/locale-zh_CN/receipt	Tue Feb 02 22:17:52 2010 +0100
    15.3 @@ -33,15 +33,9 @@
    15.4  	mkdir -p $fs/usr/share/locale/$LOCALE $fs/usr/lib/locale
    15.5  	PKG_NAME="$PACKAGE"
    15.6  	PKG_VERS="$VERSION"
    15.7 -	# Get the core packages messages.
    15.8 -	for pkg in $CORE_PKGS
    15.9 -	do
   15.10 -		[ -f $WOK/$pkg/receipt ] && . $WOK/$pkg/receipt
   15.11 -		if [ -d $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE ]; then
   15.12 -			cp -a $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE \
   15.13 -				$fs/usr/share/locale
   15.14 -		fi
   15.15 -	done
   15.16 +	mk_locale_dir
   15.17 +	get_slitaz_messages
   15.18 +	get_core_messages
   15.19  	PACKAGE="$PKG_NAME"
   15.20  	VERSION="$PKG_VERS"
   15.21  	localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF.UTF-8
    16.1 --- a/locale-zh_TW/receipt	Tue Feb 02 15:27:48 2010 +0100
    16.2 +++ b/locale-zh_TW/receipt	Tue Feb 02 22:17:52 2010 +0100
    16.3 @@ -9,9 +9,6 @@
    16.4  BUILD_DEPENDS="glibc glibc-locale xorg-libX11"
    16.5  WEB_SITE="http://www.slitaz.org/"
    16.6  
    16.7 -CORE_PKGS="asunder alsaplayer epdfview galculator geany gpicview gparted \
    16.8 -glib gtk+ grsync leafpad lxpanel lxtask obconf openbox pcmanfm xpad"
    16.9 -
   16.10  LOCALE="zh_TW"
   16.11  LOCALEDEF="zh_TW"
   16.12  CHARMAP="UTF-8"
   16.13 @@ -30,18 +27,11 @@
   16.14  # Genereted locale files are in /usr/lib/locale.
   16.15  genpkg_rules()
   16.16  {
   16.17 -	mkdir -p $fs/usr/share/locale/$LOCALE $fs/usr/lib/locale
   16.18  	PKG_NAME="$PACKAGE"
   16.19  	PKG_VERS="$VERSION"
   16.20 -	# Get the core packages messages.
   16.21 -	for pkg in $CORE_PKGS
   16.22 -	do
   16.23 -		[ -f $WOK/$pkg/receipt ] && . $WOK/$pkg/receipt
   16.24 -		if [ -d $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE ]; then
   16.25 -			cp -a $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE \
   16.26 -				$fs/usr/share/locale
   16.27 -		fi
   16.28 -	done
   16.29 +	mk_locale_dir
   16.30 +	get_slitaz_messages
   16.31 +	get_core_messages
   16.32  	PACKAGE="$PKG_NAME"
   16.33  	VERSION="$PKG_VERS"
   16.34  	localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF.UTF-8
    17.1 --- a/slitaz-i18n/receipt	Tue Feb 02 15:27:48 2010 +0100
    17.2 +++ b/slitaz-i18n/receipt	Tue Feb 02 22:17:52 2010 +0100
    17.3 @@ -1,9 +1,9 @@
    17.4  # SliTaz package receipt
    17.5  
    17.6  PACKAGE="slitaz-i18n"
    17.7 -VERSION="1.0"
    17.8 +VERSION="3.0"
    17.9  CATEGORY="system-tools"
   17.10 -SHORT_DESC="SliTaz internationalization meta packages to build locale pack."
   17.11 +SHORT_DESC="SliTaz internationalization meta package to buld locale pack."
   17.12  MAINTAINER="pankso@slitaz.org"
   17.13  DEPENDS="slitaz-configs slitaz-doc slitaz-tools"
   17.14  SUGGESTED="locale-de locale-es locale-fr locale-hu locale-pt"
   17.15 @@ -15,9 +15,13 @@
   17.16  	mkdir -p $fs/usr/share/doc/slitaz
   17.17  	. stuff/locale-pack.conf
   17.18  	cat > $fs/usr/share/doc/slitaz/i18n.txt << _EOT_
   17.19 -SliTaz 18n information
   17.20 +SliTaz i18n information
   17.21  ================================================================================
   17.22  
   17.23 +This package provide the necessary functions and configs for SliTaz locale pack.
   17.24 +SliTaz use UTF-8 by default and tazlocale (from the SliTaz tools) to configure
   17.25 +system language.
   17.26 +
   17.27  
   17.28  Translated packages files include in the core languages pack (from upstream):
   17.29  ----
    18.1 --- a/slitaz-i18n/stuff/locale-pack.conf	Tue Feb 02 15:27:48 2010 +0100
    18.2 +++ b/slitaz-i18n/stuff/locale-pack.conf	Tue Feb 02 22:17:52 2010 +0100
    18.3 @@ -1,4 +1,4 @@
    18.4  # Packages translation include in the language pack.
    18.5  
    18.6 -CORE_PKGS="asunder alsaplayer epdfview galculator geany gpicview gparted \
    18.7 -glib gtk+ grsync leafpad lxpanel lxtask obconf openbox pcmanfm xpad"
    18.8 +CORE_PKGS="asunder alsaplayer epdfview galculator viewnior gparted \
    18.9 +glib gtk+ leafpad lxpanel lxtask obconf openbox pcmanfm"
    19.1 --- a/slitaz-i18n/stuff/locale-pack.functions	Tue Feb 02 15:27:48 2010 +0100
    19.2 +++ b/slitaz-i18n/stuff/locale-pack.functions	Tue Feb 02 22:17:52 2010 +0100
    19.3 @@ -7,7 +7,6 @@
    19.4  		$fs/usr/share/locale/$LOCALE \
    19.5  		$fs/usr/share/slitaz/messages \
    19.6  		$fs/usr/share/doc/slitaz \
    19.7 -		$fs/usr/lib/locale \
    19.8  		$fs/etc/xdg/openbox
    19.9  }
   19.10