wok-6.x annotate locale-zh_CN/receipt @ rev 14664
ecore-dev: Up to 1.7.7
author | Dominique Corbex <domcox@slitaz.org> |
---|---|
date | Thu Jun 06 22:08:04 2013 +0200 (2013-06-06) |
parents | ce3cb07f3afd |
children | 874b0d62ff7e |
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" |
al@14636 | 8 WEB_SITE="http://www.slitaz.org/" |
al@14636 | 9 |
al@14636 | 10 WANTED="slitaz-i18n xorg-libX11" |
lufeng369@7377 | 11 DEPENDS="glibc-base wqy-microhei" |
al@14636 | 12 BUILD_DEPENDS="glibc-locale xorg-libX11 slitaz-i18n" |
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 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@2778 | 19 # Genereted locale files are in /usr/lib/locale. |
pankso@2778 | 20 genpkg_rules() |
pankso@2778 | 21 { |
al@14636 | 22 . $WOK/slitaz-i18n/stuff/locale-pack.functions |
al@14636 | 23 . $WOK/slitaz-i18n/stuff/locale-pack.conf |
al@14636 | 24 |
pankso@2778 | 25 mkdir -p $fs/usr/share/locale/$LOCALE $fs/usr/lib/locale |
pankso@2778 | 26 localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF.UTF-8 |
lufeng369@7377 | 27 |
lufeng369@7377 | 28 GCONV_MODULES=" |
lufeng369@7377 | 29 BIG5.so GBBIG5.so GBGBK.so |
lufeng369@7377 | 30 UTF-32.so GB18030.so EUC-CN.so |
pankso@10739 | 31 GBK.so UTF-7.so libGB.so" |
lufeng369@7377 | 32 mkdir -p $fs/usr/bin |
lufeng369@7377 | 33 mkdir -p $fs/usr/lib/gconv |
lufeng369@7377 | 34 |
lufeng369@7377 | 35 cp /usr/bin/iconv $fs/usr/bin |
lufeng369@7377 | 36 for i in $GCONV_MODULES; do |
lufeng369@7377 | 37 cp /usr/lib/gconv/$i $fs/usr/lib/gconv |
lufeng369@7377 | 38 done |
lufeng369@7401 | 39 |
pankso@10739 | 40 install -D /usr/share/zoneinfo/Asia/Shanghai \ |
pankso@10739 | 41 $fs/usr/share/zoneinfo/Asia/Shanghai -m 644 |
pankso@10739 | 42 install -D /usr/share/zoneinfo/posix/Asia/Shanghai \ |
pankso@10739 | 43 $fs/usr/share/posix/zoneinfo/Asia/Shanghai -m 644 |
pankso@10739 | 44 install -D /usr/share/zoneinfo/right/Asia/Shanghai \ |
pankso@10739 | 45 $fs/usr/share/right/zoneinfo/Asia/Shanghai -m 644 |
al@14636 | 46 |
al@14636 | 47 get_x11_locale |
pankso@2778 | 48 } |
pankso@10739 | 49 |
lufeng369@7377 | 50 post_install() |
lufeng369@7377 | 51 { |
slaxemulator@10841 | 52 if [ -z "$1" ]; then |
slaxemulator@10841 | 53 echo LANG=zh_CN.UTF-8 > /etc/locale.conf |
slaxemulator@10841 | 54 echo Asia/Shanghai > /etc/TZ |
slaxemulator@10841 | 55 export TZ=Asia/Shanghai |
slaxemulator@10841 | 56 hwclock --hctosys |
slaxemulator@10841 | 57 fi |
lufeng369@7377 | 58 } |
pankso@10739 | 59 |
pankso@2778 | 60 # Back to C if it's the last used locale. |
pankso@2778 | 61 post_remove() |
pankso@2778 | 62 { |
slaxemulator@10841 | 63 if [ -z "$1" ]; then |
slaxemulator@10841 | 64 if [ $(grep -q $LOCALEDEF /etc/locale.conf) ]; then |
slaxemulator@10841 | 65 echo "LANG=C" > /etc/locale.conf |
slaxemulator@10841 | 66 fi |
pankso@2778 | 67 fi |
pankso@2778 | 68 } |