wok-6.x diff locale-es/receipt @ rev 3087
Add slitaz-i18n (provide script and conf to build languages pack) + clean up
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sat May 16 02:25:40 2009 +0200 (2009-05-16) |
parents | d2be5bd5d83e |
children | b584b0d0bbb4 |
line diff
1.1 --- a/locale-es/receipt Wed Apr 22 18:26:22 2009 +0200 1.2 +++ b/locale-es/receipt Sat May 16 02:25:40 2009 +0200 1.3 @@ -6,11 +6,12 @@ 1.4 SHORT_DESC="Spanish locale pack." 1.5 MAINTAINER="pankso@slitaz.org" 1.6 DEPENDS="glibc-base" 1.7 -BUILD_DEPENDS="glibc glibc-locale" 1.8 +BUILD_DEPENDS="glibc glibc-locale slitaz-i18n" 1.9 WEB_SITE="http://www.slitaz.org/" 1.10 1.11 -CORE_PKGS="asunder alsaplayer epdfview galculator geany gpicview gparted \ 1.12 -glib gtk+ grsync leafpad lxpanel lxtask obconf openbox pcmanfm xpad" 1.13 +# Source slitaz-i18n files from the wok. 1.14 +. $WOK/slitaz-i18n/stuff/locale-pack.functions 1.15 +. $WOK/slitaz-i18n/stuff/locale-pack.conf 1.16 1.17 LOCALE="es" 1.18 LOCALEDEF="es_ES" 1.19 @@ -27,38 +28,18 @@ 1.20 } 1.21 1.22 # Rules to gen a SliTaz package suitable for Tazpkg. 1.23 -# Genereted locale files are in /usr/lib/locale. 1.24 genpkg_rules() 1.25 -{ 1.26 - mkdir -p $fs/usr/share/locale/$LOCALE $fs/usr/lib/locale 1.27 +{ 1.28 PKG_NAME="$PACKAGE" 1.29 PKG_VERS="$VERSION" 1.30 - # Get the core packages messages. 1.31 - for pkg in $CORE_PKGS 1.32 - do 1.33 - [ -f $WOK/$pkg/receipt ] && . $WOK/$pkg/receipt 1.34 - if [ -d $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE ]; then 1.35 - cp -a $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE \ 1.36 - $fs/usr/share/locale 1.37 - fi 1.38 - done 1.39 + mk_locale_dir 1.40 + get_slitaz_messages 1.41 + get_core_messages 1.42 PACKAGE="$PKG_NAME" 1.43 VERSION="$PKG_VERS" 1.44 localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF 1.45 } 1.46 1.47 -# Post install to configure default locale. 1.48 -post_install() 1.49 -{ 1.50 - local root 1.51 - root=$1 1.52 - # locale.conf 1.53 - if [ -s $root/etc/locale.conf ]; then 1.54 - echo "LANG=\"$LOCALEDEF\"" > $root/etc/locale.conf 1.55 - echo "LC_ALL=\"$LOCALEDEF\"" >> $root/etc/locale.conf 1.56 - fi 1.57 -} 1.58 - 1.59 # Back to C if it's the last used locale. 1.60 post_remove() 1.61 {