wok-6.x diff locale-pt_BR/receipt @ rev 841

Tidy up boot help screens (en)
author Paul Issott <paul@slitaz.org>
date Sun May 18 13:36:02 2008 +0000 (2008-05-18)
parents
children a15028ca0a13
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/locale-pt_BR/receipt	Sun May 18 13:36:02 2008 +0000
     1.3 @@ -0,0 +1,69 @@
     1.4 +# SliTaz package receipt
     1.5 +
     1.6 +PACKAGE="locale-pt_BR"
     1.7 +VERSION="1.0"
     1.8 +CATEGORY="system-tools"
     1.9 +SHORT_DESC="Brazilian locale pack."
    1.10 +MAINTAINER="pankso@slitaz.org"
    1.11 +DEPENDS="glibc-base"
    1.12 +BUILD_DEPENDS="glibc glibc-locale"
    1.13 +WEB_SITE="http://www.slitaz.org/"
    1.14 +
    1.15 +CORE_PKGS="asunder epdfview gpicview gparted glib gtk+ leafpad pcmanfm xpad"
    1.16 +
    1.17 +LOCALE="pt_BR"
    1.18 +LOCALEDEF="pt_BR"
    1.19 +CHARMAP="ISO-8859-1"
    1.20 +
    1.21 +GLIBC_FILES=$WOK/glibc/glibc-2.7/_pkg
    1.22 +PKG_NAME="$PACKAGE"
    1.23 +PKG_VERS="$VERSION"
    1.24 +
    1.25 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.26 +# Install files in /usr/lib/locale.
    1.27 +#
    1.28 +genpkg_rules()
    1.29 +{
    1.30 +	mkdir -p $fs/usr/share/locale/$LOCALE
    1.31 +	
    1.32 +	# Get the core apps messages.
    1.33 +	for pkg in $CORE_PKGS
    1.34 +	do
    1.35 +		. $WOK/$pkg/receipt
    1.36 +		if [ -d $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE ]; then
    1.37 +			cp -a $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE \
    1.38 +				$fs/usr/share/locale
    1.39 +		fi
    1.40 +	done
    1.41 +	
    1.42 +	# Glibc locale.
    1.43 +	#cp -a $GLIBC_FILES/usr/share/locale/$LOCALE $fs/usr/share/locale
    1.44 +	
    1.45 +	PACKAGE="$PKG_NAME"
    1.46 +	VERSION="$PKG_VERS"
    1.47 +	
    1.48 +	# Gen locale files.
    1.49 +	mkdir -p $fs/usr/lib/locale
    1.50 +	localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF
    1.51 +}
    1.52 +
    1.53 +# Post install to configure default locale.
    1.54 +post_install()
    1.55 +{
    1.56 +	local root
    1.57 +	root=$1
    1.58 +	# locale.conf
    1.59 +	if [ -f $root/etc/locale.conf ]; then
    1.60 +		echo "LANG=\"$LOCALEDEF\"" > $root/etc/locale.conf
    1.61 +		echo "LC_ALL=\"$LOCALEDEF\"" >> $root/etc/locale.conf
    1.62 +	fi
    1.63 +}
    1.64 +
    1.65 +# Back to C if it's the last used locale.
    1.66 +post_remove()
    1.67 +{
    1.68 +	if grep -q $LOCALEDEF /etc/locale.conf; then
    1.69 +		echo "LANG=C" > /etc/locale.conf
    1.70 +		echo "LC_ALL=C" >> /etc/locale.conf
    1.71 +	fi
    1.72 +}