wok-next view locale-sl/receipt @ rev 2632

Up: slitaz-boot-scripts (2.8.2) - Ask for lang/keymap before hardware
author Christophe Lincoln <pankso@slitaz.org>
date Thu Apr 16 17:41:38 2009 +0200 (2009-04-16)
parents 165dfdf5e37e
children d2be5bd5d83e
line source
1 # SliTaz package receipt
3 PACKAGE="locale-sl"
4 VERSION="1.0"
5 CATEGORY="system-tools"
6 SHORT_DESC="Slovenian locale pack."
7 MAINTAINER="pankso@slitaz.org"
8 DEPENDS="glibc-base"
9 BUILD_DEPENDS="glibc-locale"
10 WEB_SITE="http://www.slitaz.org/"
12 CORE_PKGS="asunder epdfview gpicview gparted glib gtk+ leafpad pcmanfm
13 lxpanel lxtask openbox alsaplayer xpad"
15 LOCALE="sl"
16 LOCALEDEF="sl_SI"
17 CHARMAP="UTF-8"
19 GLIBC_FILES=$WOK/glibc/glibc-2.7/_pkg
20 PKG_NAME="$PACKAGE"
21 PKG_VERS="$VERSION"
23 # Rules to gen a SliTaz package suitable for Tazpkg.
24 # Install files in /usr/lib/locale.
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}.UTF-8
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 }