wok view locale-es/receipt @ rev 543

Syslinux: typo in boot screen
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Apr 11 20:54:30 2008 +0000 (2008-04-11)
parents
children 73016cb6e50c
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 $fs/usr/share/i18n/locales
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/i18n/locales/$LOCALEDEF \
42 $fs/usr/share/i18n/locales
43 cp -a $GLIBC_FILES/usr/share/locale/$LOCALE $fs/usr/share/locale
45 PACKAGE="$PKG_NAME"
46 VERSION="$PKG_VERS"
48 # Gen locale files.
49 mkdir -p $fs/usr/lib/locale
50 localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF
51 }
53 # Post install to configure default locale.
54 post_install()
55 {
56 local root
57 root=$1
58 # locale.conf
59 if [ -f $root/etc/locale.conf ]; then
60 echo "LANG=\"$LOCALEDEF\"" > $root/etc/locale.conf
61 echo "LC_ALL=\"$LOCALEDEF\"" >> $root/etc/locale.conf
62 fi
63 }
65 # Back to C if it's the last used locale.
66 post_remove()
67 {
68 if grep -q $LOCALEDEF /etc/locale.conf; then
69 echo "LANG=C" > /etc/locale.conf
70 echo "LC_ALL=C" >> /etc/locale.conf
71 fi
72 }