wok-current annotate locale-pt_BR/receipt @ rev 2886

pekwm: add custom keys, start and improve menu
author Rohit Joshi <jozee@slitaz.org>
date Mon May 04 12:27:31 2009 +0000 (2009-05-04)
parents 37105c976ab8
children 94147f719bb9
rev   line source
pankso@724 1 # SliTaz package receipt
pankso@724 2
pankso@724 3 PACKAGE="locale-pt_BR"
pankso@2702 4 VERSION="1.1"
pankso@724 5 CATEGORY="system-tools"
pankso@724 6 SHORT_DESC="Brazilian 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="pt_BR"
pankso@724 16 LOCALEDEF="pt_BR"
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 }