wok annotate locale-it/receipt @ rev 3015

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