wok-stable annotate locale-ru/receipt @ rev 2915
Add epsilon (E17 libs)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Wed May 06 23:02:52 2009 +0200 (2009-05-06) |
parents | d2be5bd5d83e |
children | f3f6bcae6367 |
rev | line source |
---|---|
pankso@529 | 1 # SliTaz package receipt |
pankso@529 | 2 |
pankso@529 | 3 PACKAGE="locale-ru" |
pankso@2702 | 4 VERSION="1.1" |
pankso@529 | 5 CATEGORY="system-tools" |
pankso@529 | 6 SHORT_DESC="Russian locale pack." |
pankso@529 | 7 MAINTAINER="pankso@slitaz.org" |
pankso@529 | 8 DEPENDS="glibc-base" |
pankso@602 | 9 BUILD_DEPENDS="glibc glibc-locale xorg-libX11" |
pankso@529 | 10 WEB_SITE="http://www.slitaz.org/" |
pankso@529 | 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@670 | 14 |
pankso@529 | 15 LOCALE="ru" |
pankso@529 | 16 LOCALEDEF="ru_RU" |
pankso@2757 | 17 CHARMAP="UTF-8" |
pankso@529 | 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@529 | 29 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@2702 | 30 # Genereted locale files are in /usr/lib/locale. |
pankso@529 | 31 genpkg_rules() |
pankso@529 | 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@529 | 37 for pkg in $CORE_PKGS |
pankso@529 | 38 do |
pankso@2702 | 39 [ -f $WOK/$pkg/receipt ] && . $WOK/$pkg/receipt |
pankso@529 | 40 if [ -d $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE ]; then |
pankso@529 | 41 cp -a $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE \ |
pankso@529 | 42 $fs/usr/share/locale |
pankso@529 | 43 fi |
pankso@529 | 44 done |
pankso@529 | 45 PACKAGE="$PKG_NAME" |
pankso@529 | 46 VERSION="$PKG_VERS" |
pankso@2757 | 47 localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF.UTF-8 |
pankso@529 | 48 } |
pankso@529 | 49 |
pankso@529 | 50 # Post install to configure default locale. |
pankso@529 | 51 post_install() |
pankso@529 | 52 { |
pankso@529 | 53 local root |
pankso@529 | 54 root=$1 |
pankso@529 | 55 # locale.conf |
pankso@951 | 56 if [ -s $root/etc/locale.conf ]; then |
pankso@529 | 57 echo "LANG=\"$LOCALEDEF\"" > $root/etc/locale.conf |
pankso@529 | 58 echo "LC_ALL=\"$LOCALEDEF\"" >> $root/etc/locale.conf |
pankso@529 | 59 fi |
pankso@529 | 60 } |
pankso@529 | 61 |
pankso@529 | 62 # Back to C if it's the last used locale. |
pankso@529 | 63 post_remove() |
pankso@529 | 64 { |
pankso@529 | 65 if grep -q $LOCALEDEF /etc/locale.conf; then |
pankso@529 | 66 echo "LANG=C" > /etc/locale.conf |
pankso@529 | 67 echo "LC_ALL=C" >> /etc/locale.conf |
pankso@529 | 68 fi |
pankso@529 | 69 } |