wok-current view locale-cs/receipt @ rev 1535
udev: fix compile_rules
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Oct 09 19:36:57 2008 +0000 (2008-10-09) |
parents | a15028ca0a13 |
children | 37105c976ab8 |
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 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
49 }
51 # Post install to configure default locale.
52 post_install()
53 {
54 local root
55 root=$1
56 # locale.conf
57 if [ -s $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 }