wok-next diff slitaz-i18n/receipt @ rev 19890

iptstate, tint2, waterline-plugin-multiload: update bdeps
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Oct 11 15:11:57 2017 +0200 (2017-10-11)
parents f2fe8c08dc89
children 5dcba97b45a1
line diff
     1.1 --- a/slitaz-i18n/receipt	Thu Nov 24 16:58:15 2016 +0200
     1.2 +++ b/slitaz-i18n/receipt	Wed Oct 11 15:11:57 2017 +0200
     1.3 @@ -1,49 +1,36 @@
     1.4 -# SliTaz package receipt
     1.5 +# SliTaz package receipt v2.
     1.6  
     1.7  PACKAGE="slitaz-i18n"
     1.8 -VERSION="161124"
     1.9 +VERSION="6.0"
    1.10  CATEGORY="meta"
    1.11 -SHORT_DESC="SliTaz internationalization meta package to build locale pack."
    1.12 -MAINTAINER="pankso@slitaz.org"
    1.13 +SHORT_DESC="SliTaz internationalization"
    1.14 +MAINTAINER="devel@slitaz.org"
    1.15  LICENSE="GPL3"
    1.16  WEB_SITE="http://www.slitaz.org/"
    1.17  HOST_ARCH="i486 arm"
    1.18  
    1.19 -# Bdeps ensure packages are built so we can get generated po files.
    1.20 -BUILD_DEPENDS="acl alsaplayer alsa-utils asunder atk attr dialog e2fsprogs \
    1.21 -elfutils epdfview galculator gdk-pixbuf glib glibc-base glib-networking \
    1.22 -gparted gpicview gtk+ gvfs kbd-base leafpad libfm libgnutls libgpg-error \
    1.23 -libidn liblzma libwebkit lxappearance lxinput lxpanel lxrandr lxsession \
    1.24 -lxsession-edit lxtask mhwaveedit midori mtpaint nano obconf openbox parted \
    1.25 -pcmanfm polkit popt sakura shared-mime-info udisks2 util-linux-blkid \
    1.26 -vorbis-tools vte xorg-xkeyboard-config yad tzdata"
    1.27 -
    1.28 -# Handle slitaz arch: /etc/slitaz/slitaz.conf
    1.29 -case "$SLITAZ_ARCH" in
    1.30 -	arm*) BUILD_DEPENDS="" ;;
    1.31 -esac
    1.32 +BUILD_DEPENDS_arm=" "
    1.33 +SPLIT="locale-ar locale-ca locale-cs locale-da locale-de locale-el locale-en \
    1.34 +locale-es locale-fi locale-fr locale-hr locale-hu locale-id locale-is \
    1.35 +locale-it locale-ja locale-nb locale-nl locale-nn locale-pl locale-pt \
    1.36 +locale-pt_BR locale-ro locale-ru locale-sl locale-sv locale-tr locale-uk \
    1.37 +locale-zh_CN locale-zh_TW slitaz-i18n"
    1.38  
    1.39  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.40  genpkg_rules()
    1.41  {
    1.42 -	# Allow to build the packages who want me...
    1.43 -	sed -i "/^$PACKAGE\$/d" $CACHE/broken 2>/dev/null || true
    1.44 +	. $stuff/locale-pack.functions
    1.45 +	. $stuff/locale-pack.conf
    1.46 +	case $PACKAGE in
    1.47 +		*-i18n)
    1.48 +			# Allow to build the packages who want me...
    1.49 +			sed -i "/^$PACKAGE\$/d" $CACHE/broken 2>/dev/null || true
    1.50  
    1.51 -	mkdir -p $fs/usr/share/doc/slitaz
    1.52 -	. $stuff/locale-pack.conf
    1.53 -	for p in $CORE_PKGS; do
    1.54 -		[ ! -d "$WOK/$p/install" ] && cook $p
    1.55 -	done
    1.56 +			# Recook tzdata package: we move files from tzdata to locale-* packages
    1.57 +			cook tzdata
    1.58  
    1.59 -	# Cook all locale-* packages
    1.60 -	for i in $LOCALE_PACK; do
    1.61 -		[ -d "$WOK/locale-$i" ] && cook locale-$i
    1.62 -	done
    1.63 -
    1.64 -	# Recook tzdata package: we move files from tzdata to locale-* packages
    1.65 -	cook tzdata
    1.66 -
    1.67 -	cat > $fs/usr/share/doc/slitaz/i18n.txt <<EOT
    1.68 +			mkdir -p $fs/usr/share/doc/slitaz
    1.69 +			cat > $fs/usr/share/doc/slitaz/i18n.txt <<EOT
    1.70  SliTaz i18n information
    1.71  ================================================================================
    1.72  
    1.73 @@ -64,4 +51,159 @@
    1.74  
    1.75  ================================================================================
    1.76  EOT
    1.77 +			;;
    1.78 +		*-ar) C="Arabic"
    1.79 +			get_locale "ar" "" "" \
    1.80 +			"" "SA:ara US:us" \
    1.81 +			"ISO8859-6 IBM864 CP1256";;
    1.82 +		*-ca) C="Catalan"
    1.83 +			# it_IT for ca_IT
    1.84 +			get_locale "ca" "it_IT" "" \
    1.85 +			"" "AD:ad" \
    1.86 +			"CP1252 ISO8859-1 ISO8859-3 ISO8859-9 ISO8859-9E ISO8859-15";;
    1.87 +		*-cs) C="Czech"
    1.88 +			get_locale "cs" "" "" \
    1.89 +			"cz-lat2" "CZ:cz" \
    1.90 +			"ISO8859-2 IBM852 CP1250";;
    1.91 +		*-da) C="Danish"
    1.92 +			get_locale "da" "" "" \
    1.93 +			"dk-latin1" "DK:dk" \
    1.94 +			"IBM865 ISO8859-1 ISO8859-15";;
    1.95 +		*-de) C="German"
    1.96 +			# fr_BE for de_BE
    1.97 +			get_locale "de" "fr_BE" "" \
    1.98 +			"de-latin1 de_CH-latin1 sg-latin1" "DE:de AT:at CH:ch" \
    1.99 +			"ISO8859-1 ISO8859-15";;
   1.100 +		*-el) C="Greek"
   1.101 +			get_locale "el" "" "" \
   1.102 +			"gr" "GR:gr US:us" \
   1.103 +			"ISO8859-7 IBM869 CP1253 ISO8859-15";;
   1.104 +		*-en) C="English"
   1.105 +			get_locale "en" "" "" \
   1.106 +			"uk us us-acentos dvorak dvorak-l dvorak-r" "CM:cm GH:gh NG:ng ZA:za GB:gb US:us" \
   1.107 +			"ISO8859-1 ISO8859-15";;
   1.108 +		*-es) C="Spanish"
   1.109 +			get_locale "es" "" "" \
   1.110 +			"es" "ES:es ES:latam" \
   1.111 +			"ISO8859-1 ISO8859-15";;
   1.112 +		*-fi) C="Finnish"
   1.113 +			get_locale "fi" "" "" \
   1.114 +			"fi" "FI:fi" \
   1.115 +			"ISO8859-1 ISO8859-15";;
   1.116 +		*-fr) C="French"
   1.117 +			# en_CA for fr_CA; de_CH for fr_CH
   1.118 +			get_locale "fr" "en_CA de_CH" "" \
   1.119 +			"fr-latin1 be-latin1 cf fr_CH-latin1" "FR:fr CA:ca CD:cd GN:gn" \
   1.120 +			"ISO8859-1 ISO8859-15";;
   1.121 +		*-hr) C="Croatian"
   1.122 +			get_locale "hr" "" "" \
   1.123 +			"croat" "HR:hr" \
   1.124 +			"ISO8859-2";;
   1.125 +		*-hu) C="Hungarian"
   1.126 +			get_locale "hu" "" "" \
   1.127 +			"hu" "HU:hu" \
   1.128 +			"ISO8859-2 IBM852 CP1250";;
   1.129 +		*-id) C="Indonesian"
   1.130 +			get_locale "id" "" "" \
   1.131 +			"" "" \
   1.132 +			"ISO8859-1 ISO8859-15";;
   1.133 +		*-is) C="Icelandic"
   1.134 +			get_locale "is" "" "" \
   1.135 +			"is-latin1" "IS:is" \
   1.136 +			"ISO8859-1 ISO8859-15";;
   1.137 +		*-it) C="Italian"
   1.138 +			# de_CH for it_CH
   1.139 +			get_locale "it" "de_CH" "" \
   1.140 +			"it" "IT:it" \
   1.141 +			"ISO8859-1 ISO8859-15";;
   1.142 +		*-ja) C="Japanese"
   1.143 +			get_locale "ja" "translit_cjk_variants" "" \
   1.144 +			"jp106" "JP:jp US:us" \
   1.145 +			"EUC-JP EUC-JP-MS SJIS   libJIS";;
   1.146 +		*-nb) C="Norwegian (Bokmål)"
   1.147 +			get_locale "nb" "" "" \
   1.148 +			"no-latin1" "NO:no" \
   1.149 +			"ISO8859-1 ISO8859-15";;
   1.150 +		*-nl) C="Dutch"
   1.151 +			get_locale "nl" "" "" \
   1.152 +			"nl2" "NL:nl" \
   1.153 +			"ISO8859-1 ISO8859-15";;
   1.154 +		*-nn) C="Norwegian (Nynorsk)"
   1.155 +			get_locale "nn" "" "" \
   1.156 +			"no-latin1" "NO:no" \
   1.157 +			"ISO8859-1 ISO8859-15";;
   1.158 +		*-pl) C="Polish"
   1.159 +			get_locale "pl" "" "" \
   1.160 +			"pl2" "PL:pl" \
   1.161 +			"ISO8859-2 IBM852 CP1250";;
   1.162 +		*-pt) C="Portuguese"
   1.163 +			get_locale "pt" "" "pt_PT pt_PT@euro" \
   1.164 +			"pt-latin1" "PT:pt" \
   1.165 +			"ISO8859-1 ISO8859-15";;
   1.166 +		*-pt_BR) C="Portuguese/Brazilian"
   1.167 +			# pt_PT for pt_BR
   1.168 +			get_locale "pt_BR" "pt_PT" "" \
   1.169 +			"br-abnt2 us-acentos" "BR:br" \
   1.170 +			"ISO8859-1 ISO8859-15";;
   1.171 +		*-ro) C="Romanian"
   1.172 +			get_locale "ro" "" "" \
   1.173 +			"ro ro_std ro_win" "RO:ro" \
   1.174 +			"IBM852 CP1250 ISO8859-2 ISO8859-16";;
   1.175 +		*-ru) C="Russian"
   1.176 +			get_locale "ru" "" "" \
   1.177 +			"ru" "US:us RU:ru UA:ua" \
   1.178 +			"ISO8859-5 KOI8-R KOI8-U IBM866 CP1251";;
   1.179 +		*-sl) C="Slovenian"
   1.180 +			get_locale "sl" "" "" \
   1.181 +			"slovene" "SI:si" \
   1.182 +			"ISO8859-2 IBM852 CP1250";;
   1.183 +		*-sv) C="Swedish"
   1.184 +			# fi_FI for sv_FI; fi_FI@euro for sv_FI@euro
   1.185 +			get_locale "sv" "fi_FI fi_FI@euro" "" \
   1.186 +			"se-lat6" "SE:se" \
   1.187 +			"ISO8859-1 ISO8859-15";;
   1.188 +		*-tr) C="Turkish"
   1.189 +			get_locale "tr" "" "" \
   1.190 +			"trq tr_q-latin5" "TR:tr" \
   1.191 +			"ISO8859-9";;
   1.192 +		*-uk) C="Ukrainian"
   1.193 +			get_locale "uk" "" "" \
   1.194 +			"ua" "US:us RU:ru UA:ua" \
   1.195 +			"ISO8859-5 KOI8-R KOI8-U IBM866 CP1251";;
   1.196 +		*-zh_CN) C="Chinese Simplified"
   1.197 +			get_locale "zh_CN" "iso14651_t1_pinyin" "" \
   1.198 +			"" "CN:cn" \
   1.199 +			"EUC-CN GBK GB18030   libGB";;
   1.200 +		*-zh_TW) C="Chinese Traditional"
   1.201 +			get_locale "zh_TW" "zh_CN" "" \
   1.202 +			"" "TW:tw" \
   1.203 +			"BIG5 EUC-TW   libCNS";;
   1.204 +	esac
   1.205 +
   1.206 +	case $PACKAGE in
   1.207 +		*-i18n)   DEPENDS="";;
   1.208 +		*-zh_CN)  DEPENDS="glibc-base wqy-microhei";;
   1.209 +		*-zh_TW)  DEPENDS="glibc-base pcf-uming";;
   1.210 +		*)        DEPENDS="glibc-base";;
   1.211 +	esac
   1.212 +
   1.213 +	case $PACKAGE in
   1.214 +		locale-*) CAT="localization|$C locale pack";;
   1.215 +	esac
   1.216  }
   1.217 +
   1.218 +# Back to C if it's the last used locale.
   1.219 +post_remove() {
   1.220 +	[ "$PACKAGE" == 'slitaz-i18n' ] ||
   1.221 +	echo -e "LANG=C\nLC_ALL=C" > "$1/etc/locale.conf"
   1.222 +}
   1.223 +
   1.224 +post_install_locale_zh_CN() {
   1.225 +	if [ -z "$1" ]; then
   1.226 +		echo LANG=zh_CN.UTF-8 > /etc/locale.conf
   1.227 +		echo Asia/Shanghai > /etc/TZ
   1.228 +		export TZ=Asia/Shanghai
   1.229 +		[ -e /dev/misc/rtc ] && hwclock --hctosys
   1.230 +	fi
   1.231 +	:
   1.232 +}