wok annotate locale-cs/receipt @ rev 3023
locale-cs: Up and add desktopbox messages (Thanks Milos)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue May 12 00:26:08 2009 +0200 (2009-05-12) |
parents | d2be5bd5d83e |
children | f3f6bcae6367 |
rev | line source |
---|---|
pankso@529 | 1 # SliTaz package receipt |
pankso@529 | 2 |
pankso@529 | 3 PACKAGE="locale-cs" |
pankso@3023 | 4 VERSION="2.0" |
pankso@529 | 5 CATEGORY="system-tools" |
pankso@529 | 6 SHORT_DESC="Czech locale pack." |
pankso@529 | 7 MAINTAINER="pankso@slitaz.org" |
pankso@529 | 8 DEPENDS="glibc-base" |
pankso@602 | 9 BUILD_DEPENDS="glibc glibc-locale" |
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="cs" |
pankso@529 | 16 LOCALEDEF="cs_CZ" |
pankso@529 | 17 CHARMAP="ISO-8859-2" |
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@3023 | 33 mkdir -p $fs/usr/share/locale/$LOCALE \ |
pankso@3023 | 34 $fs/usr/lib/locale \ |
pankso@3023 | 35 $fs/usr/share/slitaz/messages |
pankso@3023 | 36 cp -a stuff/messages $fs/usr/share/slitaz/messages/$LOCALE |
pankso@2702 | 37 PKG_NAME="$PACKAGE" |
pankso@2702 | 38 PKG_VERS="$VERSION" |
pankso@2702 | 39 # Get the core packages messages. |
pankso@529 | 40 for pkg in $CORE_PKGS |
pankso@529 | 41 do |
pankso@2702 | 42 [ -f $WOK/$pkg/receipt ] && . $WOK/$pkg/receipt |
pankso@529 | 43 if [ -d $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE ]; then |
pankso@529 | 44 cp -a $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE \ |
pankso@529 | 45 $fs/usr/share/locale |
pankso@529 | 46 fi |
pankso@529 | 47 done |
pankso@529 | 48 PACKAGE="$PKG_NAME" |
pankso@529 | 49 VERSION="$PKG_VERS" |
pankso@529 | 50 localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF |
pankso@529 | 51 } |
pankso@529 | 52 |
pankso@529 | 53 # Post install to configure default locale. |
pankso@529 | 54 post_install() |
pankso@529 | 55 { |
pankso@529 | 56 local root |
pankso@529 | 57 root=$1 |
pankso@529 | 58 # locale.conf |
pankso@951 | 59 if [ -s $root/etc/locale.conf ]; then |
pankso@529 | 60 echo "LANG=\"$LOCALEDEF\"" > $root/etc/locale.conf |
pankso@529 | 61 echo "LC_ALL=\"$LOCALEDEF\"" >> $root/etc/locale.conf |
pankso@529 | 62 fi |
pankso@529 | 63 } |
pankso@529 | 64 |
pankso@529 | 65 # Back to C if it's the last used locale. |
pankso@529 | 66 post_remove() |
pankso@529 | 67 { |
pankso@529 | 68 if grep -q $LOCALEDEF /etc/locale.conf; then |
pankso@529 | 69 echo "LANG=C" > /etc/locale.conf |
pankso@529 | 70 echo "LC_ALL=C" >> /etc/locale.conf |
pankso@529 | 71 fi |
pankso@529 | 72 } |