wok-stable view locale-cs/receipt @ rev 2167
Add get-dsl-firmware
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Feb 07 13:59:28 2009 +0000 (2009-02-07) |
parents | 8d131e7b79c2 |
children | d2be5bd5d83e |
line source
1 # SliTaz package receipt
3 PACKAGE="locale-cs"
4 VERSION="1.0"
5 CATEGORY="system-tools"
6 SHORT_DESC="Czech locale pack."
7 MAINTAINER="pankso@slitaz.org"
8 DEPENDS="glibc-base"
9 BUILD_DEPENDS="glibc glibc-locale"
10 WEB_SITE="http://www.slitaz.org/"
11 SOURCES="glibc"
13 CORE_PKGS="asunder epdfview gpicview gparted glib gtk+ leafpad pcmanfm xpad"
15 LOCALE="cs"
16 LOCALEDEF="cs_CZ"
17 CHARMAP="ISO-8859-2"
19 GLIBC_FILES=$WOK/glibc/glibc-2.7/_pkg
20 PKG_NAME="$PACKAGE"
21 PKG_VERS="$VERSION"
23 # Rules to configure and make the package.
24 compile_rules()
25 {
26 # Ensure packages are built.
27 for pkg in $CORE_PKGS
28 do
29 [ -d $WOK/$pkg/taz ] || tazwok cook $pkg
30 done
31 }
33 # Rules to gen a SliTaz package suitable for Tazpkg.
34 # Install files in /usr/lib/locale.
35 #
36 genpkg_rules()
37 {
38 mkdir -p $fs/usr/share/locale/$LOCALE
40 # Get the core apps messages.
41 for pkg in $CORE_PKGS
42 do
43 . $WOK/$pkg/receipt
44 if [ -d $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE ]; then
45 cp -a $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE \
46 $fs/usr/share/locale
47 fi
48 done
50 # Glibc locale.
51 #cp -a $GLIBC_FILES/usr/share/locale/$LOCALE $fs/usr/share/locale
53 PACKAGE="$PKG_NAME"
54 VERSION="$PKG_VERS"
56 # Gen locale files.
57 mkdir -p $fs/usr/lib/locale
58 localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF
59 }
61 # Post install to configure default locale.
62 post_install()
63 {
64 local root
65 root=$1
66 # locale.conf
67 if [ -s $root/etc/locale.conf ]; then
68 echo "LANG=\"$LOCALEDEF\"" > $root/etc/locale.conf
69 echo "LC_ALL=\"$LOCALEDEF\"" >> $root/etc/locale.conf
70 fi
71 }
73 # Back to C if it's the last used locale.
74 post_remove()
75 {
76 if grep -q $LOCALEDEF /etc/locale.conf; then
77 echo "LANG=C" > /etc/locale.conf
78 echo "LC_ALL=C" >> /etc/locale.conf
79 fi
80 }