wok-stable rev 2739
Add locale-ru (hungarian) language pack
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sat Apr 25 00:50:42 2009 +0200 (2009-04-25) |
parents | 49ae4618aaf7 |
children | 727501367d55 |
files | locale-hu/receipt |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/locale-hu/receipt Sat Apr 25 00:50:42 2009 +0200 1.3 @@ -0,0 +1,69 @@ 1.4 +# SliTaz package receipt 1.5 + 1.6 +PACKAGE="locale-hu" 1.7 +VERSION="1.1" 1.8 +CATEGORY="system-tools" 1.9 +SHORT_DESC="Hungry locale pack." 1.10 +MAINTAINER="pankso@slitaz.org" 1.11 +DEPENDS="glibc-base" 1.12 +BUILD_DEPENDS="glibc glibc-locale" 1.13 +WEB_SITE="http://www.slitaz.org/" 1.14 + 1.15 +CORE_PKGS="asunder alsaplayer epdfview galculator geany gpicview gparted \ 1.16 +glib gtk+ grsync leafpad lxpanel lxtask obconf openbox pcmanfm xpad" 1.17 + 1.18 +LOCALE="hu" 1.19 +LOCALEDEF="hu_HU" 1.20 +CHARMAP="ISO-8859-2" 1.21 + 1.22 +# Rules to configure and make the package. 1.23 +compile_rules() 1.24 +{ 1.25 + # Ensure packages are built. 1.26 + for pkg in $CORE_PKGS 1.27 + do 1.28 + [ -d $WOK/$pkg/taz ] || tazwok cook $pkg 1.29 + done 1.30 +} 1.31 + 1.32 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.33 +# Genereted locale files are in /usr/lib/locale. 1.34 +genpkg_rules() 1.35 +{ 1.36 + mkdir -p $fs/usr/share/locale/$LOCALE $fs/usr/lib/locale 1.37 + PKG_NAME="$PACKAGE" 1.38 + PKG_VERS="$VERSION" 1.39 + # Get the core packages messages. 1.40 + for pkg in $CORE_PKGS 1.41 + do 1.42 + [ -f $WOK/$pkg/receipt ] && . $WOK/$pkg/receipt 1.43 + if [ -d $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE ]; then 1.44 + cp -a $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE \ 1.45 + $fs/usr/share/locale 1.46 + fi 1.47 + done 1.48 + PACKAGE="$PKG_NAME" 1.49 + VERSION="$PKG_VERS" 1.50 + localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF 1.51 +} 1.52 + 1.53 +# Post install to configure default locale. 1.54 +post_install() 1.55 +{ 1.56 + local root 1.57 + root=$1 1.58 + # locale.conf 1.59 + if [ -s $root/etc/locale.conf ]; then 1.60 + echo "LANG=\"$LOCALEDEF\"" > $root/etc/locale.conf 1.61 + echo "LC_ALL=\"$LOCALEDEF\"" >> $root/etc/locale.conf 1.62 + fi 1.63 +} 1.64 + 1.65 +# Back to C if it's the last used locale. 1.66 +post_remove() 1.67 +{ 1.68 + if grep -q $LOCALEDEF /etc/locale.conf; then 1.69 + echo "LANG=C" > /etc/locale.conf 1.70 + echo "LC_ALL=C" >> /etc/locale.conf 1.71 + fi 1.72 +}