wok annotate locale-cs/receipt @ rev 3043
locale-*: Keep current config when on upgrade or install
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue May 12 23:24:55 2009 +0200 (2009-05-12) |
parents | b50bab5c00cd |
children | a51ace1961b2 |
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 # Back to C if it's the last used locale. |
pankso@529 | 54 post_remove() |
pankso@529 | 55 { |
pankso@529 | 56 if grep -q $LOCALEDEF /etc/locale.conf; then |
pankso@529 | 57 echo "LANG=C" > /etc/locale.conf |
pankso@529 | 58 echo "LC_ALL=C" >> /etc/locale.conf |
pankso@529 | 59 fi |
pankso@529 | 60 } |