wok rev 14908

slitaz-i18n: rewrite locale-pack.functions; slitaz-configs: now generate openbox desktop menu using po files; locale-*: update using new locale-pack.functions (FIXME: post_remove)
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sat Aug 03 17:37:48 2013 +0300 (2013-08-03)
parents 4434891fab1c
children b042fcb86c79
files locale-cs/receipt locale-da/receipt locale-de/receipt locale-el/receipt locale-es/receipt locale-fr/receipt locale-hu/receipt locale-id/receipt locale-it/receipt locale-pl/receipt locale-pt/receipt locale-pt_BR/receipt locale-ru/receipt locale-sl/receipt locale-sv/receipt locale-zh_CN/receipt locale-zh_TW/receipt slitaz-configs-base/receipt slitaz-configs/receipt slitaz-i18n/receipt slitaz-i18n/stuff/locale-pack.functions
line diff
     1.1 --- a/locale-cs/receipt	Fri Aug 02 15:13:41 2013 +0300
     1.2 +++ b/locale-cs/receipt	Sat Aug 03 17:37:48 2013 +0300
     1.3 @@ -1,39 +1,27 @@
     1.4  # SliTaz package receipt
     1.5  
     1.6  PACKAGE="locale-cs"
     1.7 -VERSION="4.0"
     1.8 +VERSION="4.1"
     1.9  CATEGORY="system-tools"
    1.10  SHORT_DESC="Czech locale pack."
    1.11  MAINTAINER="pankso@slitaz.org"
    1.12  WEB_SITE="http://www.slitaz.org/"
    1.13  
    1.14 -WANTED="slitaz-i18n"
    1.15 +WANTED="glibc slitaz-i18n xorg-libX11"
    1.16  DEPENDS="glibc-base"
    1.17 -BUILD_DEPENDS="glibc glibc-locale slitaz-i18n"
    1.18  
    1.19  LOCALE="cs"
    1.20 -LOCALEDEF="cs_CZ"
    1.21 -CHARMAP="UTF-8"
    1.22  
    1.23  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.24  genpkg_rules()
    1.25  {
    1.26  	. $WOK/slitaz-i18n/stuff/locale-pack.functions
    1.27  	. $WOK/slitaz-i18n/stuff/locale-pack.conf
    1.28 -	mk_locale_dir
    1.29 -	get_slitaz_messages
    1.30 -	get_core_messages
    1.31 -	# Pregenerate locale file so we dont need glibc-locale as dep.
    1.32 -	mkdir -p $fs/usr/lib/locale
    1.33 -	localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF
    1.34 +	get_locale
    1.35  }
    1.36  
    1.37  # Back to C if it's the last used locale.
    1.38  post_remove()
    1.39  {
    1.40 -	if grep -q $LOCALEDEF /etc/locale.conf; then
    1.41 -		echo "LANG=C" > /etc/locale.conf
    1.42 -		echo "LC_ALL=C" >> /etc/locale.conf
    1.43 -	fi
    1.44 -	rm -rf /usr/lib/locale/$LOCALEDEF
    1.45 +	echo -e "LANG=C\nLC_ALL=C" > /etc/locale.conf
    1.46  }
     2.1 --- a/locale-da/receipt	Fri Aug 02 15:13:41 2013 +0300
     2.2 +++ b/locale-da/receipt	Sat Aug 03 17:37:48 2013 +0300
     2.3 @@ -1,38 +1,27 @@
     2.4  # SliTaz package receipt
     2.5  
     2.6  PACKAGE="locale-da"
     2.7 -VERSION="4.0"
     2.8 +VERSION="4.1"
     2.9  CATEGORY="system-tools"
    2.10  SHORT_DESC="Danish locale pack."
    2.11  MAINTAINER="pankso@slitaz.org"
    2.12 +WEB_SITE="http://www.slitaz.org/"
    2.13 +
    2.14 +WANTED="glibc slitaz-i18n xorg-libX11"
    2.15  DEPENDS="glibc-base"
    2.16 -BUILD_DEPENDS="glibc glibc-locale slitaz-i18n"
    2.17 -WEB_SITE="http://www.slitaz.org/"
    2.18 -WANTED="slitaz-i18n"
    2.19  
    2.20  LOCALE="da"
    2.21 -LOCALEDEF="da_DK"
    2.22 -CHARMAP="UTF-8"
    2.23  
    2.24  # Rules to gen a SliTaz package suitable for Tazpkg.
    2.25  genpkg_rules()
    2.26  {
    2.27  	. $WOK/slitaz-i18n/stuff/locale-pack.functions
    2.28  	. $WOK/slitaz-i18n/stuff/locale-pack.conf
    2.29 -	mk_locale_dir
    2.30 -	get_slitaz_messages
    2.31 -	get_core_messages
    2.32 -	# Pregenerate locale file so we dont need glibc-locale as dep.
    2.33 -	mkdir -p $fs/usr/lib/locale
    2.34 -	localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF
    2.35 +	get_locale
    2.36  }
    2.37  
    2.38  # Back to C if it's the last used locale.
    2.39  post_remove()
    2.40  {
    2.41 -	if grep -q $LOCALEDEF /etc/locale.conf; then
    2.42 -		echo "LANG=C" > /etc/locale.conf
    2.43 -		echo "LC_ALL=C" >> /etc/locale.conf
    2.44 -	fi
    2.45 -	rm -rf /usr/lib/locale/$LOCALEDEF
    2.46 +	echo -e "LANG=C\nLC_ALL=C" > /etc/locale.conf
    2.47  }
     3.1 --- a/locale-de/receipt	Fri Aug 02 15:13:41 2013 +0300
     3.2 +++ b/locale-de/receipt	Sat Aug 03 17:37:48 2013 +0300
     3.3 @@ -1,34 +1,27 @@
     3.4  # SliTaz package receipt
     3.5  
     3.6  PACKAGE="locale-de"
     3.7 -VERSION="4.0"
     3.8 +VERSION="4.1"
     3.9  CATEGORY="system-tools"
    3.10  SHORT_DESC="German locale pack."
    3.11  MAINTAINER="pankso@slitaz.org"
    3.12 +WEB_SITE="http://www.slitaz.org/"
    3.13 +
    3.14 +WANTED="glibc slitaz-i18n xorg-libX11"
    3.15  DEPENDS="glibc-base"
    3.16 -BUILD_DEPENDS="glibc glibc-locale slitaz-i18n"
    3.17 -WEB_SITE="http://www.slitaz.org/"
    3.18 -WANTED="slitaz-i18n"
    3.19  
    3.20  LOCALE="de"
    3.21 -LOCALEDEF="de_DE"
    3.22 -CHARMAP="UTF-8"
    3.23  
    3.24  # Rules to gen a SliTaz package suitable for Tazpkg.
    3.25  genpkg_rules()
    3.26  {
    3.27  	. $WOK/slitaz-i18n/stuff/locale-pack.functions
    3.28  	. $WOK/slitaz-i18n/stuff/locale-pack.conf
    3.29 -	mk_locale_dir
    3.30 -	get_slitaz_messages
    3.31 -	get_core_messages
    3.32 +	get_locale
    3.33  }
    3.34  
    3.35  # Back to C if it's the last used locale.
    3.36  post_remove()
    3.37  {
    3.38 -	if grep -q $LOCALEDEF /etc/locale.conf; then
    3.39 -		echo "LANG=C" > /etc/locale.conf
    3.40 -		echo "LC_ALL=C" >> /etc/locale.conf
    3.41 -	fi
    3.42 +	echo -e "LANG=C\nLC_ALL=C" > /etc/locale.conf
    3.43  }
     4.1 --- a/locale-el/receipt	Fri Aug 02 15:13:41 2013 +0300
     4.2 +++ b/locale-el/receipt	Sat Aug 03 17:37:48 2013 +0300
     4.3 @@ -1,36 +1,27 @@
     4.4  # SliTaz package receipt
     4.5  
     4.6  PACKAGE="locale-el"
     4.7 -VERSION="4.0"
     4.8 +VERSION="4.1"
     4.9  CATEGORY="system-tools"
    4.10  SHORT_DESC="Greek locale pack"
    4.11  MAINTAINER="al.bobylev@gmail.com"
    4.12  WEB_SITE="http://www.slitaz.org/"
    4.13  
    4.14 -WANTED="slitaz-i18n xorg-libX11"
    4.15 +WANTED="glibc slitaz-i18n xorg-libX11"
    4.16  DEPENDS="glibc-base"
    4.17 -BUILD_DEPENDS="glibc glibc-locale slitaz-i18n"
    4.18  
    4.19  LOCALE="el"
    4.20 -LOCALEDEF="el_GR"
    4.21 -CHARMAP="UTF-8"
    4.22  
    4.23  # Rules to gen a SliTaz package suitable for Tazpkg.
    4.24  genpkg_rules()
    4.25  {
    4.26  	. $WOK/slitaz-i18n/stuff/locale-pack.functions
    4.27  	. $WOK/slitaz-i18n/stuff/locale-pack.conf
    4.28 -	mk_locale_dir
    4.29 -	get_slitaz_messages
    4.30 -	get_core_messages
    4.31 -	get_x11_locale
    4.32 +	get_locale
    4.33  }
    4.34  
    4.35  # Back to C if it's the last used locale.
    4.36  post_remove()
    4.37  {
    4.38 -	if grep -q $LOCALEDEF /etc/locale.conf; then
    4.39 -		echo "LANG=C" > /etc/locale.conf
    4.40 -		echo "LC_ALL=C" >> /etc/locale.conf
    4.41 -	fi
    4.42 +	echo -e "LANG=C\nLC_ALL=C" > /etc/locale.conf
    4.43  }
     5.1 --- a/locale-es/receipt	Fri Aug 02 15:13:41 2013 +0300
     5.2 +++ b/locale-es/receipt	Sat Aug 03 17:37:48 2013 +0300
     5.3 @@ -1,34 +1,27 @@
     5.4  # SliTaz package receipt
     5.5  
     5.6  PACKAGE="locale-es"
     5.7 -VERSION="4.0"
     5.8 +VERSION="4.1"
     5.9  CATEGORY="system-tools"
    5.10  SHORT_DESC="Spanish locale pack."
    5.11  MAINTAINER="pankso@slitaz.org"
    5.12 +WEB_SITE="http://www.slitaz.org/"
    5.13 +
    5.14 +WANTED="glibc slitaz-i18n xorg-libX11"
    5.15  DEPENDS="glibc-base"
    5.16 -BUILD_DEPENDS="glibc glibc-locale slitaz-i18n"
    5.17 -WEB_SITE="http://www.slitaz.org/"
    5.18 -WANTED="slitaz-i18n"
    5.19  
    5.20  LOCALE="es"
    5.21 -LOCALEDEF="es_ES"
    5.22 -CHARMAP="UTF-8"
    5.23  
    5.24  # Rules to gen a SliTaz package suitable for Tazpkg.
    5.25  genpkg_rules()
    5.26  {
    5.27  	. $WOK/slitaz-i18n/stuff/locale-pack.functions
    5.28  	. $WOK/slitaz-i18n/stuff/locale-pack.conf
    5.29 -	mk_locale_dir
    5.30 -	get_slitaz_messages
    5.31 -	get_core_messages
    5.32 +	get_locale
    5.33  }
    5.34  
    5.35  # Back to C if it's the last used locale.
    5.36  post_remove()
    5.37  {
    5.38 -	if grep -q $LOCALEDEF /etc/locale.conf; then
    5.39 -		echo "LANG=C" > /etc/locale.conf
    5.40 -		echo "LC_ALL=C" >> /etc/locale.conf
    5.41 -	fi
    5.42 +	echo -e "LANG=C\nLC_ALL=C" > /etc/locale.conf
    5.43  }
     6.1 --- a/locale-fr/receipt	Fri Aug 02 15:13:41 2013 +0300
     6.2 +++ b/locale-fr/receipt	Sat Aug 03 17:37:48 2013 +0300
     6.3 @@ -1,34 +1,27 @@
     6.4  # SliTaz package receipt
     6.5  
     6.6  PACKAGE="locale-fr"
     6.7 -VERSION="4.0"
     6.8 +VERSION="4.1"
     6.9  CATEGORY="system-tools"
    6.10  SHORT_DESC="French locale pack."
    6.11  MAINTAINER="pankso@slitaz.org"
    6.12 +WEB_SITE="http://www.slitaz.org/"
    6.13 +
    6.14 +WANTED="glibc slitaz-i18n xorg-libX11"
    6.15  DEPENDS="glibc-base"
    6.16 -BUILD_DEPENDS="glibc glibc-locale slitaz-i18n"
    6.17 -WEB_SITE="http://www.slitaz.org/"
    6.18 -WANTED="slitaz-i18n"
    6.19  
    6.20  LOCALE="fr"
    6.21 -LOCALEDEF="fr_FR"
    6.22 -CHARMAP="UTF-8"
    6.23  
    6.24  # Rules to gen a SliTaz package suitable for Tazpkg.
    6.25  genpkg_rules()
    6.26  {
    6.27  	. $WOK/slitaz-i18n/stuff/locale-pack.functions
    6.28  	. $WOK/slitaz-i18n/stuff/locale-pack.conf
    6.29 -	mk_locale_dir
    6.30 -	get_slitaz_messages
    6.31 -	get_core_messages
    6.32 +	get_locale
    6.33  }
    6.34  
    6.35  # Back to C if it's the last used locale.
    6.36  post_remove()
    6.37  {
    6.38 -	if grep -q $LOCALEDEF /etc/locale.conf; then
    6.39 -		echo "LANG=C" > /etc/locale.conf
    6.40 -		echo "LC_ALL=C" >> /etc/locale.conf
    6.41 -	fi
    6.42 +	echo -e "LANG=C\nLC_ALL=C" > /etc/locale.conf
    6.43  }
     7.1 --- a/locale-hu/receipt	Fri Aug 02 15:13:41 2013 +0300
     7.2 +++ b/locale-hu/receipt	Sat Aug 03 17:37:48 2013 +0300
     7.3 @@ -1,38 +1,27 @@
     7.4  # SliTaz package receipt
     7.5  
     7.6  PACKAGE="locale-hu"
     7.7 -VERSION="4.0"
     7.8 +VERSION="4.1"
     7.9  CATEGORY="system-tools"
    7.10  SHORT_DESC="Hungarian locale pack."
    7.11  MAINTAINER="pankso@slitaz.org"
    7.12 +WEB_SITE="http://www.slitaz.org/"
    7.13 +
    7.14 +WANTED="glibc slitaz-i18n xorg-libX11"
    7.15  DEPENDS="glibc-base"
    7.16 -BUILD_DEPENDS="glibc glibc-locale slitaz-i18n"
    7.17 -WEB_SITE="http://www.slitaz.org/"
    7.18 -WANTED="slitaz-i18n"
    7.19  
    7.20  LOCALE="hu"
    7.21 -LOCALEDEF="hu_HU"
    7.22 -CHARMAP="UTF-8"
    7.23  
    7.24  # Rules to gen a SliTaz package suitable for Tazpkg.
    7.25  genpkg_rules()
    7.26  {
    7.27  	. $WOK/slitaz-i18n/stuff/locale-pack.functions
    7.28  	. $WOK/slitaz-i18n/stuff/locale-pack.conf
    7.29 -	mk_locale_dir
    7.30 -	get_slitaz_messages
    7.31 -	get_core_messages
    7.32 -	# Pregenerate locale file so we dont need glibc-locale as dep.
    7.33 -	mkdir -p $fs/usr/lib/locale
    7.34 -	localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF
    7.35 +	get_locale
    7.36  }
    7.37  
    7.38  # Back to C if it's the last used locale.
    7.39  post_remove()
    7.40  {
    7.41 -	if grep -q $LOCALEDEF /etc/locale.conf; then
    7.42 -		echo "LANG=C" > /etc/locale.conf
    7.43 -		echo "LC_ALL=C" >> /etc/locale.conf
    7.44 -	fi
    7.45 -	rm -rf /usr/lib/locale/$LOCALEDEF
    7.46 +	echo -e "LANG=C\nLC_ALL=C" > /etc/locale.conf
    7.47  }
     8.1 --- a/locale-id/receipt	Fri Aug 02 15:13:41 2013 +0300
     8.2 +++ b/locale-id/receipt	Sat Aug 03 17:37:48 2013 +0300
     8.3 @@ -1,38 +1,27 @@
     8.4  # SliTaz package receipt
     8.5  
     8.6  PACKAGE="locale-id"
     8.7 -VERSION="4.0"
     8.8 +VERSION="4.1"
     8.9  CATEGORY="system-tools"
    8.10  SHORT_DESC="Indonesian locale pack."
    8.11  MAINTAINER="pankso@slitaz.org"
    8.12 +WEB_SITE="http://www.slitaz.org/"
    8.13 +
    8.14 +WANTED="glibc slitaz-i18n xorg-libX11"
    8.15  DEPENDS="glibc-base"
    8.16 -BUILD_DEPENDS="glibc glibc-locale slitaz-i18n"
    8.17 -WEB_SITE="http://www.slitaz.org/"
    8.18 -WANTED="slitaz-i18n"
    8.19  
    8.20  LOCALE="id"
    8.21 -LOCALEDEF="id_ID"
    8.22 -CHARMAP="UTF-8"
    8.23  
    8.24  # Rules to gen a SliTaz package suitable for Tazpkg.
    8.25  genpkg_rules()
    8.26 -{	
    8.27 +{
    8.28  	. $WOK/slitaz-i18n/stuff/locale-pack.functions
    8.29  	. $WOK/slitaz-i18n/stuff/locale-pack.conf
    8.30 -	mk_locale_dir
    8.31 -	get_slitaz_messages
    8.32 -	get_core_messages
    8.33 -	# Pregenerate locale file so we dont need glibc-locale as dep.
    8.34 -	mkdir -p $fs/usr/lib/locale
    8.35 -	localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF
    8.36 +	get_locale
    8.37  }
    8.38  
    8.39  # Back to C if it's the last used locale.
    8.40  post_remove()
    8.41  {
    8.42 -	if grep -q $LOCALEDEF /etc/locale.conf; then
    8.43 -		echo "LANG=C" > /etc/locale.conf
    8.44 -		echo "LC_ALL=C" >> /etc/locale.conf
    8.45 -	fi
    8.46 -	rm -rf /usr/lib/locale/$LOCALEDEF
    8.47 +	echo -e "LANG=C\nLC_ALL=C" > /etc/locale.conf
    8.48  }
     9.1 --- a/locale-it/receipt	Fri Aug 02 15:13:41 2013 +0300
     9.2 +++ b/locale-it/receipt	Sat Aug 03 17:37:48 2013 +0300
     9.3 @@ -1,34 +1,27 @@
     9.4  # SliTaz package receipt
     9.5  
     9.6  PACKAGE="locale-it"
     9.7 -VERSION="4.0"
     9.8 +VERSION="4.1"
     9.9  CATEGORY="system-tools"
    9.10  SHORT_DESC="Italian locale pack."
    9.11  MAINTAINER="pankso@slitaz.org"
    9.12 +WEB_SITE="http://www.slitaz.org/"
    9.13 +
    9.14 +WANTED="glibc slitaz-i18n xorg-libX11"
    9.15  DEPENDS="glibc-base"
    9.16 -BUILD_DEPENDS="glibc glibc-locale slitaz-i18n"
    9.17 -WEB_SITE="http://www.slitaz.org/"
    9.18 -WANTED="slitaz-i18n"
    9.19  
    9.20  LOCALE="it"
    9.21 -LOCALEDEF="it_IT"
    9.22 -CHARMAP="UTF-8"
    9.23  
    9.24  # Rules to gen a SliTaz package suitable for Tazpkg.
    9.25  genpkg_rules()
    9.26  {
    9.27  	. $WOK/slitaz-i18n/stuff/locale-pack.functions
    9.28  	. $WOK/slitaz-i18n/stuff/locale-pack.conf
    9.29 -	mk_locale_dir
    9.30 -	get_slitaz_messages
    9.31 -	get_core_messages
    9.32 +	get_locale
    9.33  }
    9.34  
    9.35  # Back to C if it's the last used locale.
    9.36  post_remove()
    9.37  {
    9.38 -	if grep -q $LOCALEDEF /etc/locale.conf; then
    9.39 -		echo "LANG=C" > /etc/locale.conf
    9.40 -		echo "LC_ALL=C" >> /etc/locale.conf
    9.41 -	fi
    9.42 +	echo -e "LANG=C\nLC_ALL=C" > /etc/locale.conf
    9.43  }
    10.1 --- a/locale-pl/receipt	Fri Aug 02 15:13:41 2013 +0300
    10.2 +++ b/locale-pl/receipt	Sat Aug 03 17:37:48 2013 +0300
    10.3 @@ -1,36 +1,27 @@
    10.4  # SliTaz package receipt
    10.5  
    10.6  PACKAGE="locale-pl"
    10.7 -VERSION="4.0"
    10.8 +VERSION="4.1"
    10.9  CATEGORY="system-tools"
   10.10  SHORT_DESC="Polish locale pack"
   10.11  MAINTAINER="al.bobylev@gmail.com"
   10.12  WEB_SITE="http://www.slitaz.org/"
   10.13  
   10.14 -WANTED="slitaz-i18n xorg-libX11"
   10.15 +WANTED="glibc slitaz-i18n xorg-libX11"
   10.16  DEPENDS="glibc-base"
   10.17 -BUILD_DEPENDS="glibc glibc-locale slitaz-i18n"
   10.18  
   10.19  LOCALE="pl"
   10.20 -LOCALEDEF="pl_PL"
   10.21 -CHARMAP="UTF-8"
   10.22  
   10.23  # Rules to gen a SliTaz package suitable for Tazpkg.
   10.24  genpkg_rules()
   10.25  {
   10.26  	. $WOK/slitaz-i18n/stuff/locale-pack.functions
   10.27  	. $WOK/slitaz-i18n/stuff/locale-pack.conf
   10.28 -	mk_locale_dir
   10.29 -	get_slitaz_messages
   10.30 -	get_core_messages
   10.31 -	#get_x11_locale
   10.32 +	get_locale
   10.33  }
   10.34  
   10.35  # Back to C if it's the last used locale.
   10.36  post_remove()
   10.37  {
   10.38 -	if grep -q $LOCALEDEF /etc/locale.conf; then
   10.39 -		echo "LANG=C" > /etc/locale.conf
   10.40 -		echo "LC_ALL=C" >> /etc/locale.conf
   10.41 -	fi
   10.42 +	echo -e "LANG=C\nLC_ALL=C" > /etc/locale.conf
   10.43  }
    11.1 --- a/locale-pt/receipt	Fri Aug 02 15:13:41 2013 +0300
    11.2 +++ b/locale-pt/receipt	Sat Aug 03 17:37:48 2013 +0300
    11.3 @@ -1,34 +1,28 @@
    11.4  # SliTaz package receipt
    11.5  
    11.6  PACKAGE="locale-pt"
    11.7 -VERSION="4.0"
    11.8 +VERSION="4.1"
    11.9  CATEGORY="system-tools"
   11.10  SHORT_DESC="Portuguese locale pack."
   11.11  MAINTAINER="pankso@slitaz.org"
   11.12 +WEB_SITE="http://www.slitaz.org/"
   11.13 +
   11.14 +WANTED="glibc slitaz-i18n xorg-libX11"
   11.15  DEPENDS="glibc-base"
   11.16 -BUILD_DEPENDS="glibc glibc-locale slitaz-i18n"
   11.17 -WEB_SITE="http://www.slitaz.org/"
   11.18 -WANTED="slitaz-i18n"
   11.19  
   11.20  LOCALE="pt"
   11.21 -LOCALEDEF="pt_PT"
   11.22 -CHARMAP="UTF-8"
   11.23 +LOCALEDEF="pt_PT pt_PT@euro"
   11.24  
   11.25  # Rules to gen a SliTaz package suitable for Tazpkg.
   11.26  genpkg_rules()
   11.27  {
   11.28  	. $WOK/slitaz-i18n/stuff/locale-pack.functions
   11.29  	. $WOK/slitaz-i18n/stuff/locale-pack.conf
   11.30 -	mk_locale_dir
   11.31 -	get_slitaz_messages
   11.32 -	get_core_messages
   11.33 +	get_locale
   11.34  }
   11.35  
   11.36  # Back to C if it's the last used locale.
   11.37  post_remove()
   11.38  {
   11.39 -	if grep -q $LOCALEDEF /etc/locale.conf; then
   11.40 -		echo "LANG=C" > /etc/locale.conf
   11.41 -		echo "LC_ALL=C" >> /etc/locale.conf
   11.42 -	fi
   11.43 +	echo -e "LANG=C\nLC_ALL=C" > /etc/locale.conf
   11.44  }
    12.1 --- a/locale-pt_BR/receipt	Fri Aug 02 15:13:41 2013 +0300
    12.2 +++ b/locale-pt_BR/receipt	Sat Aug 03 17:37:48 2013 +0300
    12.3 @@ -1,36 +1,27 @@
    12.4  # SliTaz package receipt
    12.5  
    12.6  PACKAGE="locale-pt_BR"
    12.7 -VERSION="4.0"
    12.8 +VERSION="4.1"
    12.9  CATEGORY="system-tools"
   12.10  SHORT_DESC="Portuguese/Brazilian locale pack."
   12.11  MAINTAINER="pankso@slitaz.org"
   12.12  WEB_SITE="http://www.slitaz.org/"
   12.13  
   12.14 -WANTED="slitaz-i18n xorg-libX11"
   12.15 +WANTED="glibc slitaz-i18n xorg-libX11"
   12.16  DEPENDS="glibc-base"
   12.17 -BUILD_DEPENDS="glibc glibc-locale slitaz-i18n"
   12.18  
   12.19  LOCALE="pt_BR"
   12.20 -LOCALEDEF="pt_BR"
   12.21 -CHARMAP="UTF-8"
   12.22  
   12.23  # Rules to gen a SliTaz package suitable for Tazpkg.
   12.24  genpkg_rules()
   12.25  {
   12.26  	. $WOK/slitaz-i18n/stuff/locale-pack.functions
   12.27  	. $WOK/slitaz-i18n/stuff/locale-pack.conf
   12.28 -	mk_locale_dir
   12.29 -	get_slitaz_messages
   12.30 -	get_core_messages
   12.31 -	get_x11_locale
   12.32 +	get_locale
   12.33  }
   12.34  
   12.35  # Back to C if it's the last used locale.
   12.36  post_remove()
   12.37  {
   12.38 -	if grep -q $LOCALEDEF /etc/locale.conf; then
   12.39 -		echo "LANG=C" > /etc/locale.conf
   12.40 -		echo "LC_ALL=C" >> /etc/locale.conf
   12.41 -	fi
   12.42 +	echo -e "LANG=C\nLC_ALL=C" > /etc/locale.conf
   12.43  }
    13.1 --- a/locale-ru/receipt	Fri Aug 02 15:13:41 2013 +0300
    13.2 +++ b/locale-ru/receipt	Sat Aug 03 17:37:48 2013 +0300
    13.3 @@ -1,36 +1,27 @@
    13.4  # SliTaz package receipt
    13.5  
    13.6  PACKAGE="locale-ru"
    13.7 -VERSION="4.0"
    13.8 +VERSION="4.1"
    13.9  CATEGORY="system-tools"
   13.10  SHORT_DESC="Russian locale pack."
   13.11  MAINTAINER="pankso@slitaz.org"
   13.12  WEB_SITE="http://www.slitaz.org/"
   13.13  
   13.14 -WANTED="slitaz-i18n xorg-libX11"
   13.15 +WANTED="glibc slitaz-i18n xorg-libX11"
   13.16  DEPENDS="glibc-base"
   13.17 -BUILD_DEPENDS="glibc glibc-locale slitaz-i18n"
   13.18  
   13.19  LOCALE="ru"
   13.20 -LOCALEDEF="ru_RU"
   13.21 -CHARMAP="UTF-8"
   13.22  
   13.23  # Rules to gen a SliTaz package suitable for Tazpkg.
   13.24  genpkg_rules()
   13.25  {
   13.26  	. $WOK/slitaz-i18n/stuff/locale-pack.functions
   13.27  	. $WOK/slitaz-i18n/stuff/locale-pack.conf
   13.28 -	mk_locale_dir
   13.29 -	get_slitaz_messages
   13.30 -	get_core_messages
   13.31 -	get_x11_locale
   13.32 +	get_locale
   13.33  }
   13.34  
   13.35  # Back to C if it's the last used locale.
   13.36  post_remove()
   13.37  {
   13.38 -	if grep -q $LOCALEDEF /etc/locale.conf; then
   13.39 -		echo "LANG=C" > /etc/locale.conf
   13.40 -		echo "LC_ALL=C" >> /etc/locale.conf
   13.41 -	fi
   13.42 +	echo -e "LANG=C\nLC_ALL=C" > /etc/locale.conf
   13.43  }
    14.1 --- a/locale-sl/receipt	Fri Aug 02 15:13:41 2013 +0300
    14.2 +++ b/locale-sl/receipt	Sat Aug 03 17:37:48 2013 +0300
    14.3 @@ -1,34 +1,27 @@
    14.4  # SliTaz package receipt
    14.5  
    14.6  PACKAGE="locale-sl"
    14.7 -VERSION="4.0"
    14.8 +VERSION="4.1"
    14.9  CATEGORY="system-tools"
   14.10  SHORT_DESC="Slovenian locale pack."
   14.11  MAINTAINER="pankso@slitaz.org"
   14.12 +WEB_SITE="http://www.slitaz.org/"
   14.13 +
   14.14 +WANTED="glibc slitaz-i18n xorg-libX11"
   14.15  DEPENDS="glibc-base"
   14.16 -BUILD_DEPENDS="glibc glibc-locale slitaz-i18n"
   14.17 -WEB_SITE="http://www.slitaz.org/"
   14.18 -WANTED="slitaz-i18n"
   14.19  
   14.20  LOCALE="sl"
   14.21 -LOCALEDEF="sl_SI"
   14.22 -CHARMAP="UTF-8"
   14.23  
   14.24  # Rules to gen a SliTaz package suitable for Tazpkg.
   14.25  genpkg_rules()
   14.26  {
   14.27  	. $WOK/slitaz-i18n/stuff/locale-pack.functions
   14.28  	. $WOK/slitaz-i18n/stuff/locale-pack.conf
   14.29 -	mk_locale_dir
   14.30 -	get_slitaz_messages
   14.31 -	get_core_messages
   14.32 +	get_locale
   14.33  }
   14.34  
   14.35  # Back to C if it's the last used locale.
   14.36  post_remove()
   14.37  {
   14.38 -	if grep -q $LOCALEDEF /etc/locale.conf; then
   14.39 -		echo "LANG=C" > /etc/locale.conf
   14.40 -		echo "LC_ALL=C" >> /etc/locale.conf
   14.41 -	fi
   14.42 +	echo -e "LANG=C\nLC_ALL=C" > /etc/locale.conf
   14.43  }
    15.1 --- a/locale-sv/receipt	Fri Aug 02 15:13:41 2013 +0300
    15.2 +++ b/locale-sv/receipt	Sat Aug 03 17:37:48 2013 +0300
    15.3 @@ -1,38 +1,27 @@
    15.4  # SliTaz package receipt
    15.5  
    15.6  PACKAGE="locale-sv"
    15.7 -VERSION="4.0"
    15.8 +VERSION="4.1"
    15.9  CATEGORY="system-tools"
   15.10  SHORT_DESC="Swedish locale pack."
   15.11  MAINTAINER="pankso@slitaz.org"
   15.12 +WEB_SITE="http://www.slitaz.org/"
   15.13 +
   15.14 +WANTED="glibc slitaz-i18n xorg-libX11"
   15.15  DEPENDS="glibc-base"
   15.16 -BUILD_DEPENDS="glibc glibc-locale slitaz-i18n"
   15.17 -WEB_SITE="http://www.slitaz.org/"
   15.18 -WANTED="slitaz-i18n"
   15.19  
   15.20  LOCALE="sv"
   15.21 -LOCALEDEF="sv_SE"
   15.22 -CHARMAP="UTF-8"
   15.23  
   15.24  # Rules to gen a SliTaz package suitable for Tazpkg.
   15.25  genpkg_rules()
   15.26  {
   15.27  	. $WOK/slitaz-i18n/stuff/locale-pack.functions
   15.28  	. $WOK/slitaz-i18n/stuff/locale-pack.conf
   15.29 -	mk_locale_dir
   15.30 -	get_slitaz_messages
   15.31 -	get_core_messages
   15.32 -	# Pregenerate locale file so we dont need glibc-locale as dep.
   15.33 -	mkdir -p $fs/usr/lib/locale
   15.34 -	localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF
   15.35 +	get_locale
   15.36  }
   15.37  
   15.38  # Back to C if it's the last used locale.
   15.39  post_remove()
   15.40  {
   15.41 -	if grep -q $LOCALEDEF /etc/locale.conf; then
   15.42 -		echo "LANG=C" > /etc/locale.conf
   15.43 -		echo "LC_ALL=C" >> /etc/locale.conf
   15.44 -	fi
   15.45 -	rm -rf /usr/lib/locale/$LOCALEDEF
   15.46 +	echo -e "LANG=C\nLC_ALL=C" > /etc/locale.conf
   15.47  }
    16.1 --- a/locale-zh_CN/receipt	Fri Aug 02 15:13:41 2013 +0300
    16.2 +++ b/locale-zh_CN/receipt	Sat Aug 03 17:37:48 2013 +0300
    16.3 @@ -1,50 +1,35 @@
    16.4  # SliTaz package receipt
    16.5  
    16.6  PACKAGE="locale-zh_CN"
    16.7 -VERSION="4.0"
    16.8 +VERSION="4.1"
    16.9  CATEGORY="system-tools"
   16.10  SHORT_DESC="Chinese Simplified locale pack."
   16.11  MAINTAINER="lufeng369@slitaz.org"
   16.12  WEB_SITE="http://www.slitaz.org/"
   16.13  
   16.14 -WANTED="slitaz-i18n xorg-libX11"
   16.15 +WANTED="glibc slitaz-i18n xorg-libX11"
   16.16  DEPENDS="glibc-base wqy-microhei"
   16.17 -BUILD_DEPENDS="glibc-locale xorg-libX11 slitaz-i18n"
   16.18  
   16.19  LOCALE="zh_CN"
   16.20 -LOCALEDEF="zh_CN"
   16.21 -CHARMAP="UTF-8"
   16.22  
   16.23  # Rules to gen a SliTaz package suitable for Tazpkg.
   16.24 -# Genereted locale files are in /usr/lib/locale.
   16.25  genpkg_rules()
   16.26  {
   16.27  	. $WOK/slitaz-i18n/stuff/locale-pack.functions
   16.28  	. $WOK/slitaz-i18n/stuff/locale-pack.conf
   16.29 -
   16.30 -	mkdir -p $fs/usr/share/locale/$LOCALE $fs/usr/lib/locale
   16.31 -	localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF.UTF-8
   16.32 +	get_locale
   16.33  
   16.34  	GCONV_MODULES="
   16.35 -		BIG5.so             GBBIG5.so   GBGBK.so
   16.36 -		UTF-32.so           GB18030.so	EUC-CN.so
   16.37 -		GBK.so              UTF-7.so	libGB.so"
   16.38 +		BIG5.so    GBBIG5.so   GBGBK.so
   16.39 +		UTF-32.so  GB18030.so  EUC-CN.so
   16.40 +		GBK.so     UTF-7.so    libGB.so"
   16.41  	mkdir -p $fs/usr/bin
   16.42  	mkdir -p $fs/usr/lib/gconv
   16.43  
   16.44  	cp /usr/bin/iconv $fs/usr/bin
   16.45  	for i in $GCONV_MODULES; do
   16.46 -		cp /usr/lib/gconv/$i $fs/usr/lib/gconv
   16.47 +		cp $WOK/glibc/install/usr/lib/gconv/$i $fs/usr/lib/gconv
   16.48  	done
   16.49 -	
   16.50 -	install  -D /usr/share/zoneinfo/Asia/Shanghai \
   16.51 -		$fs/usr/share/zoneinfo/Asia/Shanghai -m 644
   16.52 -	install  -D /usr/share/zoneinfo/posix/Asia/Shanghai \
   16.53 -		$fs/usr/share/posix/zoneinfo/Asia/Shanghai -m 644
   16.54 -	install  -D /usr/share/zoneinfo/right/Asia/Shanghai \
   16.55 -		$fs/usr/share/right/zoneinfo/Asia/Shanghai -m 644
   16.56 -
   16.57 -	get_x11_locale
   16.58  }
   16.59  
   16.60  post_install()
   16.61 @@ -60,9 +45,5 @@
   16.62  # Back to C if it's the last used locale.
   16.63  post_remove()
   16.64  {
   16.65 -	if [ -z "$1" ]; then
   16.66 -		if [ $(grep -q $LOCALEDEF /etc/locale.conf) ]; then
   16.67 -			echo "LANG=C" > /etc/locale.conf
   16.68 -		fi
   16.69 -	fi
   16.70 +	echo -e "LANG=C\nLC_ALL=C" > /etc/locale.conf
   16.71  }
    17.1 --- a/locale-zh_TW/receipt	Fri Aug 02 15:13:41 2013 +0300
    17.2 +++ b/locale-zh_TW/receipt	Sat Aug 03 17:37:48 2013 +0300
    17.3 @@ -1,41 +1,27 @@
    17.4  # SliTaz package receipt
    17.5  
    17.6  PACKAGE="locale-zh_TW"
    17.7 -VERSION="4.0"
    17.8 +VERSION="4.1"
    17.9  CATEGORY="system-tools"
   17.10  SHORT_DESC="Chinese Traditional locale pack."
   17.11  MAINTAINER="pankso@slitaz.org"
   17.12  WEB_SITE="http://www.slitaz.org/"
   17.13  
   17.14 -WANTED="slitaz-i18n xorg-libX11"
   17.15 +WANTED="glibc slitaz-i18n xorg-libX11"
   17.16  DEPENDS="glibc-base pcf-uming"
   17.17 -BUILD_DEPENDS="glibc glibc-locale xorg-libX11"
   17.18  
   17.19  LOCALE="zh_TW"
   17.20 -LOCALEDEF="zh_TW"
   17.21 -CHARMAP="UTF-8"
   17.22  
   17.23  # Rules to gen a SliTaz package suitable for Tazpkg.
   17.24 -# Genereted locale files are in /usr/lib/locale.
   17.25  genpkg_rules()
   17.26  {
   17.27  	. $WOK/slitaz-i18n/stuff/locale-pack.functions
   17.28  	. $WOK/slitaz-i18n/stuff/locale-pack.conf
   17.29 -	mk_locale_dir
   17.30 -	get_slitaz_messages
   17.31 -	get_core_messages
   17.32 -	get_x11_locale
   17.33 -	# Pregenerate locale file so we dont need glibc-locale as dep.
   17.34 -	mkdir -p $fs/usr/lib/locale
   17.35 -	localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF
   17.36 +	get_locale
   17.37  }
   17.38  
   17.39  # Back to C if it's the last used locale.
   17.40  post_remove()
   17.41  {
   17.42 -	if grep -q $LOCALEDEF /etc/locale.conf; then
   17.43 -		echo "LANG=C" > /etc/locale.conf
   17.44 -		echo "LC_ALL=C" >> /etc/locale.conf
   17.45 -	fi
   17.46 -	rm -rf /usr/lib/locale/$LOCALEDEF
   17.47 +	echo -e "LANG=C\nLC_ALL=C" > /etc/locale.conf
   17.48  }
    18.1 --- a/slitaz-configs-base/receipt	Fri Aug 02 15:13:41 2013 +0300
    18.2 +++ b/slitaz-configs-base/receipt	Sat Aug 03 17:37:48 2013 +0300
    18.3 @@ -1,32 +1,36 @@
    18.4  # SliTaz package receipt.
    18.5  
    18.6  PACKAGE="slitaz-configs-base"
    18.7 -VERSION="5.1.3"
    18.8 +VERSION="5.1.6"
    18.9  CATEGORY="base-system"
   18.10  SHORT_DESC="SliTaz config files for text based systems."
   18.11  MAINTAINER="pankso@slitaz.org"
   18.12 +LICENSE="GPL"
   18.13 +WEB_SITE="http://www.slitaz.org/"
   18.14  SOURCE="slitaz-configs"
   18.15  TARBALL="$SOURCE-$VERSION.tar.gz"
   18.16 -WEB_SITE="http://www.slitaz.org/"
   18.17  WGET_URL="http://hg.slitaz.org/slitaz-configs/archive/$VERSION.tar.gz"
   18.18  
   18.19  DEPENDS="tazlito tazpkg"
   18.20  
   18.21  # Rules to gen a SliTaz package suitable for Tazpkg.
   18.22  genpkg_rules()
   18.23 -{	
   18.24 +{
   18.25  	# Copy rootfs files from the stuff and set permissions.
   18.26 -	mkdir -p $fs/etc $fs/boot $fs/usr/share
   18.27 +	mkdir -p \
   18.28 +		$fs/etc \
   18.29 +		$fs/boot \
   18.30 +		$fs/usr/share \
   18.31 +		$fs/etc/skel/Music \
   18.32 +		$fs/etc/skel/Documents
   18.33  	cp -a $src/rootfs/boot $fs
   18.34  	cp -a $src/rootfs/etc/skel $fs/etc
   18.35  	cp -a $src/rootfs/etc/X11 $fs/etc
   18.36 -	mkdir -p \
   18.37 -		$fs/etc/skel/Music \
   18.38 -		$fs/etc/skel/Documents
   18.39 -	for i in images pixmaps themes webhome
   18.40 -	do
   18.41 +
   18.42 +	for i in images pixmaps themes webhome; do
   18.43  		cp -r $src/rootfs/usr/share/$i $fs/usr/share
   18.44  	done
   18.45 +
   18.46  	cp -a $src/rootfs/root $fs
   18.47  	chown -R root.root $fs
   18.48  	chmod 0750 $fs/root
    19.1 --- a/slitaz-configs/receipt	Fri Aug 02 15:13:41 2013 +0300
    19.2 +++ b/slitaz-configs/receipt	Sat Aug 03 17:37:48 2013 +0300
    19.3 @@ -1,7 +1,7 @@
    19.4  # SliTaz package receipt.
    19.5  
    19.6  PACKAGE="slitaz-configs"
    19.7 -VERSION="5.1.5"
    19.8 +VERSION="5.1.6"
    19.9  CATEGORY="base-system"
   19.10  SHORT_DESC="SliTaz config files and artwork."
   19.11  MAINTAINER="pankso@slitaz.org"
   19.12 @@ -14,23 +14,30 @@
   19.13  DEPENDS="slitaz-configs-base xorg-libXcomposite xorg-libXdamage xorg-xcompmgr \
   19.14  transset-df ttf-dejavu slitaz-tools-boxes clearlooks slim"
   19.15  
   19.16 +# Rules to configure and make the package.
   19.17 +compile_rules()
   19.18 +{
   19.19 +	make DESTDIR=$DESTDIR menu
   19.20 +	ln -s menu.en.xml $install/etc/xdg/openbox/menu.xml
   19.21 +}
   19.22 +
   19.23  # Rules to gen a SliTaz package suitable for Tazpkg.
   19.24  genpkg_rules()
   19.25  {
   19.26  	# Copy rootfs files from the stuff and set permissions.
   19.27  	mkdir -p $fs/etc/xdg/openbox $fs/usr/share
   19.28 -	for f in menu.en.xml menu.xml autostart environment rc.xml
   19.29 -	do
   19.30 -		cp -a $src/rootfs/etc/xdg/openbox/$f $fs/etc/xdg/openbox
   19.31 -	done
   19.32 +	cp -a $src/rootfs/etc/xdg/openbox $fs/etc/xdg
   19.33 +
   19.34  	# /usr/share
   19.35  	for i in applications lxdm slim slitaz
   19.36  	do
   19.37  		cp -r $src/rootfs/usr/share/$i $fs/usr/share
   19.38  	done
   19.39 +
   19.40  	cp -a $src/rootfs/usr/bin $fs/usr
   19.41  	cp -a $src/rootfs/etc/lxpanel $fs/etc
   19.42  	cp -a $src/rootfs/etc/slitaz $fs/etc
   19.43 +
   19.44  	chown -R root.root $fs
   19.45  }
   19.46  
    20.1 --- a/slitaz-i18n/receipt	Fri Aug 02 15:13:41 2013 +0300
    20.2 +++ b/slitaz-i18n/receipt	Sat Aug 03 17:37:48 2013 +0300
    20.3 @@ -1,7 +1,7 @@
    20.4  # SliTaz package receipt
    20.5  
    20.6  PACKAGE="slitaz-i18n"
    20.7 -VERSION="4.0"
    20.8 +VERSION="4.1"
    20.9  CATEGORY="meta"
   20.10  SHORT_DESC="SliTaz internationalization meta package to build locale pack."
   20.11  MAINTAINER="pankso@slitaz.org"
   20.12 @@ -9,10 +9,11 @@
   20.13  
   20.14  # Bdeps ensure packages are built so we can get generated po files.
   20.15  BUILD_DEPENDS="acl alsaplayer alsa-utils asunder atk attr dialog e2fsprogs \
   20.16 -epdfview galculator gcc-lib-base gcolor2 gdk-pixbuf gettext-base glib glibc-base \
   20.17 -gparted gtk+ isomaster kbd-base leafpad libwebkit lostirc lxappearance lxpanel \
   20.18 +epdfview galculator gcc-lib-base gcolor2 gdk-pixbuf glib glibc-base \
   20.19 +gparted gtk+ isomaster kbd leafpad libwebkit lostirc lxappearance lxpanel \
   20.20  lxrandr lxtask mhwaveedit midori mtpaint nano obconf openbox parcellite parted \
   20.21 -pcmanfm popt retawq sakura transmission viewnior yad"
   20.22 +spacefm popt retawq sakura transmission viewnior yad lxsession lxsession-edit \
   20.23 +lxinput"
   20.24  
   20.25  # Rules to gen a SliTaz package suitable for Tazpkg.
   20.26  genpkg_rules()
    21.1 --- a/slitaz-i18n/stuff/locale-pack.functions	Fri Aug 02 15:13:41 2013 +0300
    21.2 +++ b/slitaz-i18n/stuff/locale-pack.functions	Sat Aug 03 17:37:48 2013 +0300
    21.3 @@ -1,71 +1,61 @@
    21.4 -#!/bin/sh
    21.5 +get_locale()
    21.6 +{
    21.7 +	[ "x$CHARMAP" == x ] && CHARMAP=UTF-8
    21.8  
    21.9 -# Standard directories having translated files.
   21.10 -mk_locale_dir()
   21.11 -{
   21.12 -	mkdir -p \
   21.13 -		$fs/usr/share/locale/$LOCALE \
   21.14 -		$fs/etc/xdg/openbox
   21.15 -}
   21.16 -
   21.17 -# Get translated files from SliTaz sub projects: configs & tools.
   21.18 -get_slitaz_messages()
   21.19 -{
   21.20 -	configs=$WOK/slitaz-configs/source
   21.21 -	openbox=$configs/slitaz-configs-*/rootfs/etc/xdg/openbox
   21.22 -	#tools=$WOK/slitaz-tools/source
   21.23 -
   21.24 -	# Make tazwok compatible with this.
   21.25 -	if [ ! -x /usr/bin/cook ]; then
   21.26 -		[ -d $configs ] || tazwok get-src slitaz-configs --target=$configs
   21.27 -		#[ -d $tools ] || tazwok get-src slitaz-tools --target=$tools
   21.28 +	# Get translated Openbox menu from SliTaz sub project slitaz-configs
   21.29 +	obmenu=$WOK/slitaz-configs/install/etc/xdg/openbox/menu.$LOCALE.xml
   21.30 +	if [ -f $obmenu ]; then
   21.31 +		mkdir -p $fs/etc/xdg/openbox
   21.32 +		echo "* Found $LOCALE translations for: openbox menu"
   21.33 +		cp $obmenu $fs/etc/xdg/openbox
   21.34  	fi
   21.35  
   21.36 -	[ ! -d $configs ] && echo "ERROR: missing source slitaz-configs" && exit 1
   21.37 -	#[ ! -d $tools ] && echo "ERROR: missing source slitaz-tools" && exit 1
   21.38 -
   21.39 -	if [ -f $openbox/menu.${LOCALE}.xml ]; then
   21.40 -		echo "* Found $LOCALE locale for: openbox menu"
   21.41 -		cp $openbox/menu.${LOCALE}.xml $fs/etc/xdg/openbox
   21.42 -	fi
   21.43 -	
   21.44 -	# Tools messages will be replace in time by POT files.
   21.45 -	#
   21.46 -	# NOTE: All po files are now include into slitaz-tools (easy for update)
   21.47 -	#
   21.48 -	#if [ -d $tools/slitaz-tools-*/messages/$LOCALE ]; then
   21.49 -		#echo "* Found $LOCALE locale for: slitaz-tools"
   21.50 -		#cp -a $tools/slitaz-tools-*/messages/$LOCALE \
   21.51 -			#$fs/usr/share/slitaz/messages
   21.52 -	#fi
   21.53 -	
   21.54 -	#if [ -d $tools/slitaz-tools-*/po/mo/$LOCALE ]; then
   21.55 -		#for app in $(ls $tools/slitaz-tools-*/po/mo/$LOCALE)
   21.56 -		#do
   21.57 -			#echo "* Found $LOCALE locale for: ${app%.mo}"
   21.58 -			#cp -a $tools/slitaz-tools-*/po/mo/$LOCALE/$app \
   21.59 -				#$fs/usr/share/locale/$LOCALE
   21.60 -		#done
   21.61 -	#fi
   21.62 -}
   21.63 -
   21.64 -# Get the core packages messages.
   21.65 -get_core_messages()
   21.66 -{
   21.67 -	for i in $CORE_PKGS
   21.68 -	do
   21.69 -		if [ -d $WOK/$i/install/usr/share/locale/$LOCALE ]; then
   21.70 -			echo "* Found $LOCALE locale for: $i"
   21.71 -			cp -a $WOK/$i/install/usr/share/locale/$LOCALE \
   21.72 -				$fs/usr/share/locale
   21.73 +	# Get the core packages messages.
   21.74 +	mkdir -p $fs/usr/share/locale/$LOCALE
   21.75 +	for app in $CORE_PKGS; do
   21.76 +		app_locale=$WOK/$app/install/usr/share/locale/$LOCALE
   21.77 +		if [ -d $app_locale ]; then
   21.78 +			echo "* Found $LOCALE translations for: $app"
   21.79 +			cp -a $app_locale $fs/usr/share/locale
   21.80  		fi
   21.81  	done
   21.82 +
   21.83 +	# List of available locales
   21.84 +	cd $WOK/glibc/install/usr/share/i18n/locales
   21.85 +	locales=$(ls -1 | sed -n '/^'$LOCALE'$/p; /^'$LOCALE'_.*/p' | sed '/translit/d')
   21.86 +	[ "x$LOCALEDEF" != x ] && locales=$LOCALEDEF
   21.87 +
   21.88 +	# Get X11 locale
   21.89 +	for def in $locales; do
   21.90 +		x11_locale=$WOK/xorg-libX11/install/usr/share/X11/locale/$def.$CHARMAP
   21.91 +		if [ -d $x11_locale ]; then
   21.92 +			echo "* Found $def.$CHARMAP locale for: X11"
   21.93 +			mkdir -p $fs/usr/share/X11/locale
   21.94 +			cp -a $x11_locale $fs/usr/share/X11/locale
   21.95 +		fi
   21.96 +	done
   21.97 +
   21.98 +	# Pregenerate locale file so we dont need glibc-locale as dep.
   21.99 +	for def in $locales; do
  21.100 +		echo "* Generate $def locale definition"
  21.101 +		mkdir -p $fs/usr/lib/locale
  21.102 +		localedef -i $def -c -f $CHARMAP $fs/usr/lib/locale/$def
  21.103 +	done
  21.104 +
  21.105 +	# Get timezones
  21.106 +	countries=$(echo $locales | \
  21.107 +		sed 's|@[^ ]*||g; s|[^ _]*_||g' | tr ' ' '\n' | sort -u)
  21.108 +	echo "* Copy timezone info for countries: "$countries
  21.109 +	locations=''
  21.110 +	for country in $countries; do
  21.111 +		location=$(grep '^'$country \
  21.112 +			$WOK/glibc/install/usr/share/zoneinfo/zone.tab | awk '{ print $3}')
  21.113 +		locations="$locations $location"
  21.114 +	done
  21.115 +	for location in $locations; do
  21.116 +		for tz in $location posix/$location right/$location; do
  21.117 +			install -Dm644 /usr/share/zoneinfo/$tz \
  21.118 +						$fs/usr/share/zoneinfo/$tz
  21.119 +		done
  21.120 +	done
  21.121  }
  21.122 -
  21.123 -# Get X11 locale
  21.124 -get_x11_locale()
  21.125 -{
  21.126 -	mkdir -p $fs/usr/share/X11/locale
  21.127 -	cp -a $WOK/xorg-libX11/install/usr/share/X11/locale/$LOCALEDEF.$CHARMAP \
  21.128 -		$fs/usr/share/X11/locale
  21.129 -}