wok-stable annotate locale-zh_CN/receipt @ rev 11603
Up rrdtool (1.4.6)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Jan 19 08:39:06 2012 +0100 (2012-01-19) |
parents | e63d22f12936 |
children |
rev | line source |
---|---|
pankso@2778 | 1 # SliTaz package receipt |
pankso@2778 | 2 |
pankso@2778 | 3 PACKAGE="locale-zh_CN" |
pankso@10739 | 4 VERSION="4.0" |
pankso@2778 | 5 CATEGORY="system-tools" |
pankso@2778 | 6 SHORT_DESC="Chinese Simplified locale pack." |
lufeng369@7377 | 7 MAINTAINER="lufeng369@slitaz.org" |
lufeng369@7377 | 8 DEPENDS="glibc-base wqy-microhei" |
lufeng369@7401 | 9 BUILD_DEPENDS="glibc-locale xorg-libX11" |
pankso@2778 | 10 WEB_SITE="http://www.slitaz.org/" |
pankso@2778 | 11 |
pankso@2778 | 12 LOCALE="zh_CN" |
pankso@2778 | 13 LOCALEDEF="zh_CN" |
pankso@2778 | 14 CHARMAP="UTF-8" |
pankso@2778 | 15 |
pankso@2778 | 16 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@2778 | 17 # Genereted locale files are in /usr/lib/locale. |
pankso@2778 | 18 genpkg_rules() |
pankso@2778 | 19 { |
pankso@2778 | 20 mkdir -p $fs/usr/share/locale/$LOCALE $fs/usr/lib/locale |
pankso@2778 | 21 localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF.UTF-8 |
lufeng369@7377 | 22 |
lufeng369@7377 | 23 GCONV_MODULES=" |
lufeng369@7377 | 24 BIG5.so GBBIG5.so GBGBK.so |
lufeng369@7377 | 25 UTF-32.so GB18030.so EUC-CN.so |
pankso@10739 | 26 GBK.so UTF-7.so libGB.so" |
lufeng369@7377 | 27 mkdir -p $fs/usr/bin |
lufeng369@7377 | 28 mkdir -p $fs/usr/lib/gconv |
lufeng369@7377 | 29 |
lufeng369@7377 | 30 cp /usr/bin/iconv $fs/usr/bin |
lufeng369@7377 | 31 for i in $GCONV_MODULES; do |
lufeng369@7377 | 32 cp /usr/lib/gconv/$i $fs/usr/lib/gconv |
lufeng369@7377 | 33 done |
lufeng369@7401 | 34 |
pankso@10739 | 35 install -D /usr/share/zoneinfo/Asia/Shanghai \ |
pankso@10739 | 36 $fs/usr/share/zoneinfo/Asia/Shanghai -m 644 |
pankso@10739 | 37 install -D /usr/share/zoneinfo/posix/Asia/Shanghai \ |
pankso@10739 | 38 $fs/usr/share/posix/zoneinfo/Asia/Shanghai -m 644 |
pankso@10739 | 39 install -D /usr/share/zoneinfo/right/Asia/Shanghai \ |
pankso@10739 | 40 $fs/usr/share/right/zoneinfo/Asia/Shanghai -m 644 |
pankso@2778 | 41 } |
pankso@10739 | 42 |
lufeng369@7377 | 43 post_install() |
lufeng369@7377 | 44 { |
slaxemulator@10841 | 45 if [ -z "$1" ]; then |
slaxemulator@10841 | 46 echo LANG=zh_CN.UTF-8 > /etc/locale.conf |
slaxemulator@10841 | 47 echo Asia/Shanghai > /etc/TZ |
slaxemulator@10841 | 48 export TZ=Asia/Shanghai |
slaxemulator@10841 | 49 hwclock --hctosys |
slaxemulator@10841 | 50 fi |
lufeng369@7377 | 51 } |
pankso@10739 | 52 |
pankso@2778 | 53 # Back to C if it's the last used locale. |
pankso@2778 | 54 post_remove() |
pankso@2778 | 55 { |
slaxemulator@10841 | 56 if [ -z "$1" ]; then |
slaxemulator@10841 | 57 if [ $(grep -q $LOCALEDEF /etc/locale.conf) ]; then |
slaxemulator@10841 | 58 echo "LANG=C" > /etc/locale.conf |
slaxemulator@10841 | 59 fi |
pankso@2778 | 60 fi |
pankso@2778 | 61 } |