wok-current view locale-zh_CN/receipt @ rev 13519
sudo-pam: add stuff
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Oct 19 17:31:14 2012 +0200 (2012-10-19) |
parents | e63d22f12936 |
children | 919b102812ab |
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 DEPENDS="glibc-base wqy-microhei"
9 BUILD_DEPENDS="glibc-locale xorg-libX11"
10 WEB_SITE="http://www.slitaz.org/"
12 LOCALE="zh_CN"
13 LOCALEDEF="zh_CN"
14 CHARMAP="UTF-8"
16 # Rules to gen a SliTaz package suitable for Tazpkg.
17 # Genereted locale files are in /usr/lib/locale.
18 genpkg_rules()
19 {
20 mkdir -p $fs/usr/share/locale/$LOCALE $fs/usr/lib/locale
21 localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF.UTF-8
23 GCONV_MODULES="
24 BIG5.so GBBIG5.so GBGBK.so
25 UTF-32.so GB18030.so EUC-CN.so
26 GBK.so UTF-7.so libGB.so"
27 mkdir -p $fs/usr/bin
28 mkdir -p $fs/usr/lib/gconv
30 cp /usr/bin/iconv $fs/usr/bin
31 for i in $GCONV_MODULES; do
32 cp /usr/lib/gconv/$i $fs/usr/lib/gconv
33 done
35 install -D /usr/share/zoneinfo/Asia/Shanghai \
36 $fs/usr/share/zoneinfo/Asia/Shanghai -m 644
37 install -D /usr/share/zoneinfo/posix/Asia/Shanghai \
38 $fs/usr/share/posix/zoneinfo/Asia/Shanghai -m 644
39 install -D /usr/share/zoneinfo/right/Asia/Shanghai \
40 $fs/usr/share/right/zoneinfo/Asia/Shanghai -m 644
41 }
43 post_install()
44 {
45 if [ -z "$1" ]; then
46 echo LANG=zh_CN.UTF-8 > /etc/locale.conf
47 echo Asia/Shanghai > /etc/TZ
48 export TZ=Asia/Shanghai
49 hwclock --hctosys
50 fi
51 }
53 # Back to C if it's the last used locale.
54 post_remove()
55 {
56 if [ -z "$1" ]; then
57 if [ $(grep -q $LOCALEDEF /etc/locale.conf) ]; then
58 echo "LANG=C" > /etc/locale.conf
59 fi
60 fi
61 }