# HG changeset patch # User Christophe Lincoln # Date 1240859035 -7200 # Node ID 31e3f7df762f6fd6449bac790b4a6ee4a604a3ef # Parent c841c994fce5d09e8d8e61bca04de364d1f04ba8 Add language pack zh_CN and zh_TW + pcf-uming diff -r c841c994fce5 -r 31e3f7df762f locale-zh_CN/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locale-zh_CN/receipt Mon Apr 27 21:03:55 2009 +0200 @@ -0,0 +1,69 @@ +# SliTaz package receipt + +PACKAGE="locale-zh_CN" +VERSION="1.1" +CATEGORY="system-tools" +SHORT_DESC="Chinese Simplified locale pack." +MAINTAINER="pankso@slitaz.org" +DEPENDS="glibc-base pcf-uming" +BUILD_DEPENDS="glibc glibc-locale xorg-libX11" +WEB_SITE="http://www.slitaz.org/" + +CORE_PKGS="asunder alsaplayer epdfview galculator geany gpicview gparted \ +glib gtk+ grsync leafpad lxpanel lxtask obconf openbox pcmanfm xpad" + +LOCALE="zh_CN" +LOCALEDEF="zh_CN" +CHARMAP="UTF-8" + +# Rules to configure and make the package. +compile_rules() +{ + # Ensure packages are built. + for pkg in $CORE_PKGS + do + [ -d $WOK/$pkg/taz ] || tazwok cook $pkg + done +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +# Genereted locale files are in /usr/lib/locale. +genpkg_rules() +{ + mkdir -p $fs/usr/share/locale/$LOCALE $fs/usr/lib/locale + PKG_NAME="$PACKAGE" + PKG_VERS="$VERSION" + # Get the core packages messages. + for pkg in $CORE_PKGS + do + [ -f $WOK/$pkg/receipt ] && . $WOK/$pkg/receipt + if [ -d $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE ]; then + cp -a $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE \ + $fs/usr/share/locale + fi + done + PACKAGE="$PKG_NAME" + VERSION="$PKG_VERS" + localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF.UTF-8 +} + +# Post install to configure default locale. +post_install() +{ + local root + root=$1 + # locale.conf + if [ -s $root/etc/locale.conf ]; then + echo "LANG=\"$LOCALEDEF\"" > $root/etc/locale.conf + echo "LC_ALL=\"$LOCALEDEF\"" >> $root/etc/locale.conf + fi +} + +# Back to C if it's the last used locale. +post_remove() +{ + if grep -q $LOCALEDEF /etc/locale.conf; then + echo "LANG=C" > /etc/locale.conf + echo "LC_ALL=C" >> /etc/locale.conf + fi +} diff -r c841c994fce5 -r 31e3f7df762f locale-zh_TW/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locale-zh_TW/receipt Mon Apr 27 21:03:55 2009 +0200 @@ -0,0 +1,69 @@ +# SliTaz package receipt + +PACKAGE="locale-zh_TW" +VERSION="1.1" +CATEGORY="system-tools" +SHORT_DESC="Chinese Traditional locale pack." +MAINTAINER="pankso@slitaz.org" +DEPENDS="glibc-base pcf-uming" +BUILD_DEPENDS="glibc glibc-locale xorg-libX11" +WEB_SITE="http://www.slitaz.org/" + +CORE_PKGS="asunder alsaplayer epdfview galculator geany gpicview gparted \ +glib gtk+ grsync leafpad lxpanel lxtask obconf openbox pcmanfm xpad" + +LOCALE="zh_TW" +LOCALEDEF="zh_TW" +CHARMAP="UTF-8" + +# Rules to configure and make the package. +compile_rules() +{ + # Ensure packages are built. + for pkg in $CORE_PKGS + do + [ -d $WOK/$pkg/taz ] || tazwok cook $pkg + done +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +# Genereted locale files are in /usr/lib/locale. +genpkg_rules() +{ + mkdir -p $fs/usr/share/locale/$LOCALE $fs/usr/lib/locale + PKG_NAME="$PACKAGE" + PKG_VERS="$VERSION" + # Get the core packages messages. + for pkg in $CORE_PKGS + do + [ -f $WOK/$pkg/receipt ] && . $WOK/$pkg/receipt + if [ -d $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE ]; then + cp -a $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE \ + $fs/usr/share/locale + fi + done + PACKAGE="$PKG_NAME" + VERSION="$PKG_VERS" + localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF.UTF-8 +} + +# Post install to configure default locale. +post_install() +{ + local root + root=$1 + # locale.conf + if [ -s $root/etc/locale.conf ]; then + echo "LANG=\"$LOCALEDEF\"" > $root/etc/locale.conf + echo "LC_ALL=\"$LOCALEDEF\"" >> $root/etc/locale.conf + fi +} + +# Back to C if it's the last used locale. +post_remove() +{ + if grep -q $LOCALEDEF /etc/locale.conf; then + echo "LANG=C" > /etc/locale.conf + echo "LC_ALL=C" >> /etc/locale.conf + fi +} diff -r c841c994fce5 -r 31e3f7df762f pcf-uming/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pcf-uming/receipt Mon Apr 27 21:03:55 2009 +0200 @@ -0,0 +1,18 @@ +# SliTaz package receipt. + +PACKAGE="pcf-uming" +VERSION="1.0" +CATEGORY="x-window" +SHORT_DESC="Light asian fonts for X." +MAINTAINER="pankso@slitaz.org" +TARBALL="$PACKAGE-$VERSION.tar.bz2" +WEB_SITE="http://www.slitaz.org/" +WGET_URL="http://mirror.slitaz.org/sources/fonts/$TARBALL" + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr/share/fonts/X11/uming + cp $src/uming.pcf.gz $fs/usr/share/fonts/X11/uming + chown -R root.root $fs +}