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