wok-next view slitaz-i18n/receipt @ rev 21020
Cleaning is almost finished... I should proceed to upgrades.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Nov 02 14:15:08 2018 +0200 (2018-11-02) |
parents | cd7906120828 |
children |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="slitaz-i18n"
4 VERSION="180123"
5 CATEGORY="meta"
6 SHORT_DESC="SliTaz internationalization"
7 MAINTAINER="devel@slitaz.org"
8 LICENSE="GPL3"
9 WEB_SITE="http://www.slitaz.org/"
10 REPOLOGY="-"
12 SPLIT="\
13 locale-ar-base locale-ar locale-ca-base locale-ca locale-cs-base locale-cs \
14 locale-da-base locale-da locale-de-base locale-de locale-el-base locale-el \
15 locale-en-base locale-en locale-es-base locale-es locale-fi-base locale-fi \
16 locale-fr-base locale-fr locale-hr-base locale-hr locale-hu-base locale-hu \
17 locale-id-base locale-id locale-is-base locale-is locale-it-base locale-it \
18 locale-ja-base locale-ja locale-nb-base locale-nb locale-nl-base locale-nl \
19 locale-nn-base locale-nn locale-pl-base locale-pl locale-pt-base locale-pt \
20 locale-pt_BR-base locale-pt_BR \
21 locale-ro-base locale-ro locale-ru-base locale-ru locale-sl-base locale-sl \
22 locale-sv-base locale-sv locale-tr-base locale-tr locale-uk-base locale-uk \
23 locale-zh_CN-base locale-zh_CN \
24 locale-zh_TW-base locale-zh_TW \
25 $PACKAGE"
27 genpkg_rules() {
28 . $stuff/locale-pack.functions
29 . $stuff/locale-pack.conf
31 case $PACKAGE in
32 slitaz-i18n)
33 # Allow to build the packages who want me...
34 sed -i "/^$PACKAGE\$/d" $CACHE/broken 2>/dev/null || true
36 # Recook tzdata package: we move files from tzdata to locale-* packages
37 cook tzdata
39 mkdir -p $fs/usr/share/doc/slitaz
40 cat > $fs/usr/share/doc/slitaz/i18n.txt <<EOT
41 SliTaz i18n information
42 ================================================================================
44 This package provides the necessary functions and configs for the SliTaz locale
45 pack. SliTaz uses UTF-8 by default and tazlocale (from SliTaz tools) to
46 configure the system language.
49 Translated packages files included in the core languages pack (from upstream):
50 ----
51 $(echo $CORE_PKGS | fold -s)
52 ----
54 SliTaz i18n project coordination is done on the SCN and doc is on the website:
56 http://www.slitaz.org/i18n.php
59 ================================================================================
60 EOT
61 ;;
62 esac
64 locale="$(echo $PACKAGE | cut -d- -f2)" # ar, ca, cs, da, de..., i18n
65 option="$(echo $PACKAGE | cut -d- -f3)" # '', base
67 case $locale in
68 i18n) # nothing to do here
69 ;;
70 ar) C="Arabic"
71 get_locale "ar" "" "" \
72 "" "SA:ara US:us" \
73 "ISO8859-6 IBM864 CP1256";;
74 ca) C="Catalan"
75 # it_IT for ca_IT
76 get_locale "ca" "it_IT" "" \
77 "" "AD:ad" \
78 "CP1252 ISO8859-1 ISO8859-3 ISO8859-9 ISO8859-9E ISO8859-15";;
79 cs) C="Czech"
80 get_locale "cs" "" "" \
81 "cz-lat2" "CZ:cz" \
82 "ISO8859-2 IBM852 CP1250";;
83 da) C="Danish"
84 get_locale "da" "" "" \
85 "dk-latin1" "DK:dk" \
86 "IBM865 ISO8859-1 ISO8859-15";;
87 de) C="German"
88 # fr_BE for de_BE
89 get_locale "de" "fr_BE" "" \
90 "de-latin1 de_CH-latin1 sg-latin1" "DE:de AT:at CH:ch" \
91 "ISO8859-1 ISO8859-15";;
92 el) C="Greek"
93 get_locale "el" "" "" \
94 "gr" "GR:gr US:us" \
95 "ISO8859-7 IBM869 CP1253 ISO8859-15";;
96 en) C="English"
97 get_locale "en" "" "" \
98 "uk us us-acentos dvorak dvorak-l dvorak-r" "CM:cm GH:gh NG:ng ZA:za GB:gb US:us" \
99 "ISO8859-1 ISO8859-15";;
100 es) C="Spanish"
101 get_locale "es" "" "" \
102 "es" "ES:es ES:latam" \
103 "ISO8859-1 ISO8859-15";;
104 fi) C="Finnish"
105 get_locale "fi" "" "" \
106 "fi" "FI:fi" \
107 "ISO8859-1 ISO8859-15";;
108 fr) C="French"
109 # en_CA for fr_CA; de_CH for fr_CH
110 get_locale "fr" "en_CA de_CH" "" \
111 "fr-latin1 be-latin1 cf fr_CH-latin1" "FR:fr CA:ca CD:cd GN:gn" \
112 "ISO8859-1 ISO8859-15";;
113 hr) C="Croatian"
114 get_locale "hr" "" "" \
115 "croat" "HR:hr" \
116 "ISO8859-2";;
117 hu) C="Hungarian"
118 get_locale "hu" "" "" \
119 "hu" "HU:hu" \
120 "ISO8859-2 IBM852 CP1250";;
121 id) C="Indonesian"
122 get_locale "id" "" "" \
123 "" "" \
124 "ISO8859-1 ISO8859-15";;
125 is) C="Icelandic"
126 get_locale "is" "" "" \
127 "is-latin1" "IS:is" \
128 "ISO8859-1 ISO8859-15";;
129 it) C="Italian"
130 # de_CH for it_CH
131 get_locale "it" "de_CH" "" \
132 "it" "IT:it" \
133 "ISO8859-1 ISO8859-15";;
134 ja) C="Japanese"
135 get_locale "ja" "translit_cjk_variants" "" \
136 "jp106" "JP:jp US:us" \
137 "EUC-JP EUC-JP-MS SJIS libJIS";;
138 nb) C="Norwegian (Bokmål)"
139 get_locale "nb" "" "" \
140 "no-latin1" "NO:no" \
141 "ISO8859-1 ISO8859-15";;
142 nl) C="Dutch"
143 get_locale "nl" "" "" \
144 "nl2" "NL:nl" \
145 "ISO8859-1 ISO8859-15";;
146 nn) C="Norwegian (Nynorsk)"
147 get_locale "nn" "" "" \
148 "no-latin1" "NO:no" \
149 "ISO8859-1 ISO8859-15";;
150 pl) C="Polish"
151 get_locale "pl" "" "" \
152 "pl2" "PL:pl" \
153 "ISO8859-2 IBM852 CP1250";;
154 pt) C="Portuguese"
155 get_locale "pt" "" "pt_PT pt_PT@euro" \
156 "pt-latin1" "PT:pt" \
157 "ISO8859-1 ISO8859-15";;
158 pt_BR) C="Portuguese/Brazilian"
159 # pt_PT for pt_BR
160 get_locale "pt_BR" "pt_PT" "" \
161 "br-abnt2 us-acentos" "BR:br" \
162 "ISO8859-1 ISO8859-15";;
163 ro) C="Romanian"
164 get_locale "ro" "" "" \
165 "ro ro_std ro_win" "RO:ro" \
166 "IBM852 CP1250 ISO8859-2 ISO8859-16";;
167 ru) C="Russian"
168 get_locale "ru" "" "" \
169 "ru" "US:us RU:ru UA:ua" \
170 "ISO8859-5 KOI8-R KOI8-U IBM866 CP1251";;
171 sl) C="Slovenian"
172 get_locale "sl" "" "" \
173 "slovene" "SI:si" \
174 "ISO8859-2 IBM852 CP1250";;
175 sv) C="Swedish"
176 # fi_FI for sv_FI; fi_FI@euro for sv_FI@euro
177 get_locale "sv" "fi_FI fi_FI@euro" "" \
178 "se-lat6" "SE:se" \
179 "ISO8859-1 ISO8859-15";;
180 tr) C="Turkish"
181 get_locale "tr" "" "" \
182 "trq tr_q-latin5" "TR:tr" \
183 "ISO8859-9";;
184 uk) C="Ukrainian"
185 get_locale "uk" "" "" \
186 "ua" "US:us RU:ru UA:ua" \
187 "ISO8859-5 KOI8-R KOI8-U IBM866 CP1251";;
188 zh_CN) C="Chinese Simplified"
189 get_locale "zh_CN" "iso14651_t1_pinyin" "" \
190 "" "CN:cn" \
191 "EUC-CN GBK GB18030 libGB";;
192 zh_TW) C="Chinese Traditional"
193 get_locale "zh_TW" "zh_CN" "" \
194 "" "TW:tw" \
195 "BIG5 EUC-TW libCNS";;
196 esac
198 case $PACKAGE in
199 *-i18n) DEPENDS=" ";;
200 *-base) DEPENDS="glibc-base";;
201 *-zh_CN) DEPENDS="locale-zh_CN-base wqy-microhei";;
202 *-zh_TW) DEPENDS="locale-zh_TW-base pcf-uming";;
203 *) DEPENDS="$PACKAGE-base";;
204 esac
206 case $PACKAGE in
207 locale-*-base) CAT="localization|$C base locale pack";;
208 locale-*) CAT="localization|$C locale pack";;
209 esac
210 }
212 # Back to C if it's the last used locale.
213 post_remove() {
214 case $PACKAGE in
215 *-base) echo -e "LANG=C\nLC_ALL=C" > "$1/etc/locale.conf";;
216 esac
217 }
219 post_install_locale_zh_CN() {
220 if [ -z "$1" ]; then
221 echo LANG=zh_CN.UTF-8 > /etc/locale.conf
222 echo Asia/Shanghai > /etc/TZ
223 export TZ=Asia/Shanghai
224 [ -e /dev/misc/rtc ] && hwclock --hctosys
225 fi
226 :
227 }