wok-next view locale-es/receipt @ rev 600

Make place to include Spanish in the core
author Christophe Lincoln <pankso@slitaz.org>
date Thu Apr 17 21:35:52 2008 +0200 (2008-04-17)
parents bc28c4d5b3e8
children 66a35c398785
line source
1 # SliTaz package receipt
3 PACKAGE="locale-es"
4 VERSION="1.0"
5 CATEGORY="system-tools"
6 SHORT_DESC="Spanish locale pack."
7 MAINTAINER="pankso@slitaz.org"
8 DEPENDS="glibc-base"
9 BUILD_DEPENDS="glibc"
10 WEB_SITE="http://www.slitaz.org/"
12 LOCALE="es"
13 LOCALEDEF="es_ES"
14 CHARMAP="ISO-8859-1"
15 #CORE_PKGS="geany leafpad"
16 CORE_PKGS=""
18 GLIBC_FILES=$WOK/glibc/glibc-2.7/_pkg
19 PKG_NAME="$PACKAGE"
20 PKG_VERS="$VERSION"
22 # Rules to gen a SliTaz package suitable for Tazpkg.
23 # Install files in /usr/lib/locale. UTF-8:
24 # localedef -i $LOCALEDEF -f UTF-8 $root/usr/lib/locale/$LOCALEDEF.utf8
25 #
26 genpkg_rules()
27 {
28 mkdir -p $fs/usr/share/locale/$LOCALE
30 # Get the core apps messages.
31 for pkg in $CORE_PKGS
32 do
33 . $WOK/$pkg/receipt
34 if [ -d $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE ]; then
35 cp -a $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE \
36 $fs/usr/share/locale
37 fi
38 done
40 # Glibc locale.
41 cp -a $GLIBC_FILES/usr/share/locale/$LOCALE $fs/usr/share/locale
43 PACKAGE="$PKG_NAME"
44 VERSION="$PKG_VERS"
46 # Gen locale files.
47 mkdir -p $fs/usr/lib/locale
48 localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF
49 }
51 # Post install to configure default locale.
52 post_install()
53 {
54 local root
55 root=$1
56 # locale.conf
57 if [ -f $root/etc/locale.conf ]; then
58 echo "LANG=\"$LOCALEDEF\"" > $root/etc/locale.conf
59 echo "LC_ALL=\"$LOCALEDEF\"" >> $root/etc/locale.conf
60 fi
61 }
63 # Back to C if it's the last used locale.
64 post_remove()
65 {
66 if grep -q $LOCALEDEF /etc/locale.conf; then
67 echo "LANG=C" > /etc/locale.conf
68 echo "LC_ALL=C" >> /etc/locale.conf
69 fi
70 }