wok annotate locale-hu/receipt @ 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
children 6d051c4f6e60
rev   line source
pankso@2739 1 # SliTaz package receipt
pankso@2739 2
pankso@2739 3 PACKAGE="locale-hu"
pankso@2739 4 VERSION="1.1"
pankso@2739 5 CATEGORY="system-tools"
pankso@2739 6 SHORT_DESC="Hungry locale pack."
pankso@2739 7 MAINTAINER="pankso@slitaz.org"
pankso@2739 8 DEPENDS="glibc-base"
pankso@2739 9 BUILD_DEPENDS="glibc glibc-locale"
pankso@2739 10 WEB_SITE="http://www.slitaz.org/"
pankso@2739 11
pankso@2739 12 CORE_PKGS="asunder alsaplayer epdfview galculator geany gpicview gparted \
pankso@2739 13 glib gtk+ grsync leafpad lxpanel lxtask obconf openbox pcmanfm xpad"
pankso@2739 14
pankso@2739 15 LOCALE="hu"
pankso@2739 16 LOCALEDEF="hu_HU"
pankso@2739 17 CHARMAP="ISO-8859-2"
pankso@2739 18
pankso@2739 19 # Rules to configure and make the package.
pankso@2739 20 compile_rules()
pankso@2739 21 {
pankso@2739 22 # Ensure packages are built.
pankso@2739 23 for pkg in $CORE_PKGS
pankso@2739 24 do
pankso@2739 25 [ -d $WOK/$pkg/taz ] || tazwok cook $pkg
pankso@2739 26 done
pankso@2739 27 }
pankso@2739 28
pankso@2739 29 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@2739 30 # Genereted locale files are in /usr/lib/locale.
pankso@2739 31 genpkg_rules()
pankso@2739 32 {
pankso@2739 33 mkdir -p $fs/usr/share/locale/$LOCALE $fs/usr/lib/locale
pankso@2739 34 PKG_NAME="$PACKAGE"
pankso@2739 35 PKG_VERS="$VERSION"
pankso@2739 36 # Get the core packages messages.
pankso@2739 37 for pkg in $CORE_PKGS
pankso@2739 38 do
pankso@2739 39 [ -f $WOK/$pkg/receipt ] && . $WOK/$pkg/receipt
pankso@2739 40 if [ -d $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE ]; then
pankso@2739 41 cp -a $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE \
pankso@2739 42 $fs/usr/share/locale
pankso@2739 43 fi
pankso@2739 44 done
pankso@2739 45 PACKAGE="$PKG_NAME"
pankso@2739 46 VERSION="$PKG_VERS"
pankso@2739 47 localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF
pankso@2739 48 }
pankso@2739 49
pankso@2739 50 # Post install to configure default locale.
pankso@2739 51 post_install()
pankso@2739 52 {
pankso@2739 53 local root
pankso@2739 54 root=$1
pankso@2739 55 # locale.conf
pankso@2739 56 if [ -s $root/etc/locale.conf ]; then
pankso@2739 57 echo "LANG=\"$LOCALEDEF\"" > $root/etc/locale.conf
pankso@2739 58 echo "LC_ALL=\"$LOCALEDEF\"" >> $root/etc/locale.conf
pankso@2739 59 fi
pankso@2739 60 }
pankso@2739 61
pankso@2739 62 # Back to C if it's the last used locale.
pankso@2739 63 post_remove()
pankso@2739 64 {
pankso@2739 65 if grep -q $LOCALEDEF /etc/locale.conf; then
pankso@2739 66 echo "LANG=C" > /etc/locale.conf
pankso@2739 67 echo "LC_ALL=C" >> /etc/locale.conf
pankso@2739 68 fi
pankso@2739 69 }