wok-6.x rev 950

Add locale-id (Indonesian language pack)
author Christophe Lincoln <pankso@slitaz.org>
date Wed Jun 25 17:21:10 2008 +0200 (2008-06-25)
parents a15028ca0a13
children 8d131e7b79c2
files locale-id/receipt
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/locale-id/receipt	Wed Jun 25 17:21:10 2008 +0200
     1.3 @@ -0,0 +1,69 @@
     1.4 +# SliTaz package receipt
     1.5 +
     1.6 +PACKAGE="locale-id"
     1.7 +VERSION="1.0"
     1.8 +CATEGORY="system-tools"
     1.9 +SHORT_DESC="Indonesian 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="id"
    1.18 +LOCALEDEF="id_ID"
    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 [ ! -s $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 +}