wok-6.x annotate locale-zh_CN/receipt @ rev 7377
Modify locale-zh_CN to enable display Chinese Font correctly
author | fireflyoo <lufeng369@gmail.com> |
---|---|
date | Thu Nov 25 22:17:40 2010 +0000 (2010-11-25) |
parents | d42b38d61b43 |
children | 22b72b21a488 |
rev | line source |
---|---|
pankso@2778 | 1 # SliTaz package receipt |
pankso@2778 | 2 |
pankso@2778 | 3 PACKAGE="locale-zh_CN" |
lufeng369@7377 | 4 VERSION="2.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" |
pankso@2778 | 9 BUILD_DEPENDS="glibc glibc-locale xorg-libX11" |
pankso@2778 | 10 WEB_SITE="http://www.slitaz.org/" |
pankso@2778 | 11 |
lufeng369@7377 | 12 |
pankso@2778 | 13 |
pankso@2778 | 14 LOCALE="zh_CN" |
pankso@2778 | 15 LOCALEDEF="zh_CN" |
pankso@2778 | 16 CHARMAP="UTF-8" |
pankso@2778 | 17 |
pankso@2778 | 18 |
pankso@2778 | 19 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@2778 | 20 # Genereted locale files are in /usr/lib/locale. |
pankso@2778 | 21 genpkg_rules() |
pankso@2778 | 22 { |
pankso@2778 | 23 mkdir -p $fs/usr/share/locale/$LOCALE $fs/usr/lib/locale |
pankso@2778 | 24 localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF.UTF-8 |
lufeng369@7377 | 25 |
lufeng369@7377 | 26 GCONV_MODULES=" |
lufeng369@7377 | 27 BIG5.so GBBIG5.so GBGBK.so |
lufeng369@7377 | 28 UTF-32.so GB18030.so EUC-CN.so |
lufeng369@7377 | 29 GBK.so UTF-7.so libGB.so" |
lufeng369@7377 | 30 mkdir -p $fs/usr/bin |
lufeng369@7377 | 31 mkdir -p $fs/usr/lib/gconv |
lufeng369@7377 | 32 |
lufeng369@7377 | 33 |
lufeng369@7377 | 34 cp /usr/bin/iconv $fs/usr/bin |
lufeng369@7377 | 35 for i in $GCONV_MODULES; do |
lufeng369@7377 | 36 cp /usr/lib/gconv/$i $fs/usr/lib/gconv |
lufeng369@7377 | 37 done |
pankso@2778 | 38 } |
lufeng369@7377 | 39 post_install() |
lufeng369@7377 | 40 { |
lufeng369@7377 | 41 echo LANG=zh_CN.UTF-8 > /etc/locale.conf |
lufeng369@7377 | 42 } |
pankso@2778 | 43 # Back to C if it's the last used locale. |
pankso@2778 | 44 post_remove() |
pankso@2778 | 45 { |
pankso@2778 | 46 if grep -q $LOCALEDEF /etc/locale.conf; then |
pankso@2778 | 47 echo "LANG=C" > /etc/locale.conf |
pankso@2778 | 48 echo "LC_ALL=C" >> /etc/locale.conf |
pankso@2778 | 49 fi |
pankso@2778 | 50 } |