wok-4.x view locale-es/receipt @ rev 608

Up: udev (120) - Admin centralised in udevadm
author Christophe Lincoln <pankso@slitaz.org>
date Fri Apr 18 16:41:52 2008 +0200 (2008-04-18)
parents 52990aed04f0
children 585bd52eb85b
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 glibc-locale"
10 WEB_SITE="http://www.slitaz.org/"
12 LOCALE="es"
13 LOCALEDEF="es_ES"
14 CHARMAP="ISO-8859-1"
15 CORE_PKGS="asunder epdfview geany gpicview gparted glib gtk+ leafpad xpad"
17 GLIBC_FILES=$WOK/glibc/glibc-2.7/_pkg
18 PKG_NAME="$PACKAGE"
19 PKG_VERS="$VERSION"
21 # Rules to gen a SliTaz package suitable for Tazpkg.
22 # Install files in /usr/lib/locale. UTF-8:
23 # localedef -i $LOCALEDEF -f UTF-8 $root/usr/lib/locale/$LOCALEDEF.utf8
24 #
25 genpkg_rules()
26 {
27 mkdir -p $fs/usr/share/locale/$LOCALE
29 # Get the core apps messages.
30 for pkg in $CORE_PKGS
31 do
32 . $WOK/$pkg/receipt
33 if [ -d $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE ]; then
34 cp -a $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE \
35 $fs/usr/share/locale
36 fi
37 done
39 # Glibc locale.
40 cp -a $GLIBC_FILES/usr/share/locale/$LOCALE $fs/usr/share/locale
42 PACKAGE="$PKG_NAME"
43 VERSION="$PKG_VERS"
45 # Gen locale files.
46 mkdir -p $fs/usr/lib/locale
47 localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF
48 }
50 # Post install to configure default locale.
51 post_install()
52 {
53 local root
54 root=$1
55 # locale.conf
56 if [ -f $root/etc/locale.conf ]; then
57 echo "LANG=\"$LOCALEDEF\"" > $root/etc/locale.conf
58 echo "LC_ALL=\"$LOCALEDEF\"" >> $root/etc/locale.conf
59 fi
60 }
62 # Back to C if it's the last used locale.
63 post_remove()
64 {
65 if grep -q $LOCALEDEF /etc/locale.conf; then
66 echo "LANG=C" > /etc/locale.conf
67 echo "LC_ALL=C" >> /etc/locale.conf
68 fi
69 }