wok-stable annotate locale-de/receipt @ rev 2702

Up: locale-* (1.1) - Include more apps and use the last glibc
author Christophe Lincoln <pankso@slitaz.org>
date Wed Apr 22 18:26:22 2009 +0200 (2009-04-22)
parents 37105c976ab8
children c63193d91c24
rev   line source
pankso@724 1 # SliTaz package receipt
pankso@724 2
pankso@724 3 PACKAGE="locale-de"
pankso@2702 4 VERSION="1.1"
pankso@724 5 CATEGORY="system-tools"
pankso@724 6 SHORT_DESC="German 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="de"
pankso@724 16 LOCALEDEF="de_DE"
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 }