wok-6.x annotate locale-zh_CN/receipt @ rev 8534
Up: openldap to 2.4.24.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Sun Feb 13 03:45:50 2011 +0000 (2011-02-13) |
parents | 23b733bbc00a |
children | e63d22f12936 |
rev | line source |
---|---|
pankso@2778 | 1 # SliTaz package receipt |
pankso@2778 | 2 |
lufeng369@7401 | 3 PACKED_SIZE="508K" |
lufeng369@7401 | 4 UNPACKED_SIZE="2.4M" |
pankso@2778 | 5 PACKAGE="locale-zh_CN" |
lufeng369@7377 | 6 VERSION="2.0" |
pankso@2778 | 7 CATEGORY="system-tools" |
pankso@2778 | 8 SHORT_DESC="Chinese Simplified locale pack." |
lufeng369@7377 | 9 MAINTAINER="lufeng369@slitaz.org" |
lufeng369@7377 | 10 DEPENDS="glibc-base wqy-microhei" |
lufeng369@7401 | 11 BUILD_DEPENDS="glibc-locale xorg-libX11" |
pankso@2778 | 12 WEB_SITE="http://www.slitaz.org/" |
pankso@2778 | 13 |
lufeng369@7377 | 14 |
pankso@2778 | 15 |
pankso@2778 | 16 LOCALE="zh_CN" |
pankso@2778 | 17 LOCALEDEF="zh_CN" |
pankso@2778 | 18 CHARMAP="UTF-8" |
pankso@2778 | 19 |
pankso@2778 | 20 |
pankso@2778 | 21 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@2778 | 22 # Genereted locale files are in /usr/lib/locale. |
pankso@2778 | 23 genpkg_rules() |
pankso@2778 | 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 |
lufeng369@7377 | 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 |
lufeng369@7377 | 36 cp /usr/bin/iconv $fs/usr/bin |
lufeng369@7377 | 37 for i in $GCONV_MODULES; do |
lufeng369@7377 | 38 cp /usr/lib/gconv/$i $fs/usr/lib/gconv |
lufeng369@7377 | 39 done |
lufeng369@7401 | 40 |
lufeng369@7401 | 41 install -D /usr/share/zoneinfo/Asia/Shanghai $fs/usr/share/zoneinfo/Asia/Shanghai -m 644 |
lufeng369@7401 | 42 install -D /usr/share/zoneinfo/posix/Asia/Shanghai $fs/usr/share/posix/zoneinfo/Asia/Shanghai -m 644 |
lufeng369@7401 | 43 install -D /usr/share/zoneinfo/right/Asia/Shanghai $fs/usr/share/right/zoneinfo/Asia/Shanghai -m 644 |
pankso@2778 | 44 } |
lufeng369@7377 | 45 post_install() |
lufeng369@7377 | 46 { |
lufeng369@7377 | 47 echo LANG=zh_CN.UTF-8 > /etc/locale.conf |
lufeng369@7401 | 48 echo Asia/Shanghai > /etc/TZ |
lufeng369@7401 | 49 export TZ=Asia/Shanghai |
lufeng369@7401 | 50 hwclock --hctosys |
lufeng369@7377 | 51 } |
pankso@2778 | 52 # Back to C if it's the last used locale. |
pankso@2778 | 53 post_remove() |
pankso@2778 | 54 { |
pankso@2778 | 55 if grep -q $LOCALEDEF /etc/locale.conf; then |
pankso@2778 | 56 echo "LANG=C" > /etc/locale.conf |
pankso@2778 | 57 fi |
pankso@2778 | 58 } |