wok-6.x view locale-zh_CN/receipt @ rev 14636

Xorg marathon, Day 2. xorg-trapproto: fix receipt; xorg-libXau(-dev): up 1.0.8; xorg-xtrans: prettify receipt; xorg-libX11: move X11 locales to locale-*; slitaz-i18n: add function get_x11_locale; locale-el: add receipt; locale-pt_BR locale-ru locale-zh_CN locale-zh_TW: add here X11 locales.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sun Jun 02 12:09:39 2013 +0000 (2013-06-02)
parents ce3cb07f3afd
children 874b0d62ff7e
line source
1 # SliTaz package receipt
3 PACKAGE="locale-zh_CN"
4 VERSION="4.0"
5 CATEGORY="system-tools"
6 SHORT_DESC="Chinese Simplified locale pack."
7 MAINTAINER="lufeng369@slitaz.org"
8 WEB_SITE="http://www.slitaz.org/"
10 WANTED="slitaz-i18n xorg-libX11"
11 DEPENDS="glibc-base wqy-microhei"
12 BUILD_DEPENDS="glibc-locale xorg-libX11 slitaz-i18n"
14 LOCALE="zh_CN"
15 LOCALEDEF="zh_CN"
16 CHARMAP="UTF-8"
18 # Rules to gen a SliTaz package suitable for Tazpkg.
19 # Genereted locale files are in /usr/lib/locale.
20 genpkg_rules()
21 {
22 . $WOK/slitaz-i18n/stuff/locale-pack.functions
23 . $WOK/slitaz-i18n/stuff/locale-pack.conf
25 mkdir -p $fs/usr/share/locale/$LOCALE $fs/usr/lib/locale
26 localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF.UTF-8
28 GCONV_MODULES="
29 BIG5.so GBBIG5.so GBGBK.so
30 UTF-32.so GB18030.so EUC-CN.so
31 GBK.so UTF-7.so libGB.so"
32 mkdir -p $fs/usr/bin
33 mkdir -p $fs/usr/lib/gconv
35 cp /usr/bin/iconv $fs/usr/bin
36 for i in $GCONV_MODULES; do
37 cp /usr/lib/gconv/$i $fs/usr/lib/gconv
38 done
40 install -D /usr/share/zoneinfo/Asia/Shanghai \
41 $fs/usr/share/zoneinfo/Asia/Shanghai -m 644
42 install -D /usr/share/zoneinfo/posix/Asia/Shanghai \
43 $fs/usr/share/posix/zoneinfo/Asia/Shanghai -m 644
44 install -D /usr/share/zoneinfo/right/Asia/Shanghai \
45 $fs/usr/share/right/zoneinfo/Asia/Shanghai -m 644
47 get_x11_locale
48 }
50 post_install()
51 {
52 if [ -z "$1" ]; then
53 echo LANG=zh_CN.UTF-8 > /etc/locale.conf
54 echo Asia/Shanghai > /etc/TZ
55 export TZ=Asia/Shanghai
56 hwclock --hctosys
57 fi
58 }
60 # Back to C if it's the last used locale.
61 post_remove()
62 {
63 if [ -z "$1" ]; then
64 if [ $(grep -q $LOCALEDEF /etc/locale.conf) ]; then
65 echo "LANG=C" > /etc/locale.conf
66 fi
67 fi
68 }