wok-next view locale-ru/receipt @ rev 547
Up: GTK+ (2.12.6) and deps (glib,pango, + clearlooks for 2.10 engines)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sat Apr 12 17:37:29 2008 +0200 (2008-04-12) |
parents | |
children | 73016cb6e50c |
line source
1 # SliTaz package receipt
3 PACKAGE="locale-ru"
4 VERSION="1.0"
5 CATEGORY="system-tools"
6 SHORT_DESC="Russian locale pack."
7 MAINTAINER="pankso@slitaz.org"
8 DEPENDS="glibc-base"
9 BUILD_DEPENDS="glibc xorg-libX11"
10 WEB_SITE="http://www.slitaz.org/"
12 LOCALE="ru"
13 LOCALEDEF="ru_RU"
14 CHARMAP="KOI8-RU"
15 #CORE_PKGS="emelfm2 geany leafpad"
16 CORE_PKGS=""
18 LIBX11_VERSION="1.1.3"
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. UTF-8:
25 # localedef -i $LOCALEDEF -f UTF-8 $root/usr/lib/locale/$LOCALEDEF.utf8
26 #
27 genpkg_rules()
28 {
29 mkdir -p \
30 $fs/usr/share/locale/$LOCALE \
31 $fs/usr/share/i18n/locales \
32 $fs/usr/share/i18n/charmaps
34 # Get the core apps messages.
35 for pkg in $CORE_PKGS
36 do
37 . $WOK/$pkg/receipt
38 if [ -d $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE ]; then
39 cp -a $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE \
40 $fs/usr/share/locale
41 fi
42 done
44 # X11 locale.
45 #mkdir -p $fs/usr/share/X11/locale
46 #cp -a $WOK/xorg-libX11/libX11-$LIBX11_VERSION/_pkg/usr/share/X11/locale/iso8859-5 \
47 # $fs/usr/share/X11/locale
49 # KOI8-RU gconv lib.
50 mkdir -p $fs/usr/lib/gconv
51 cp -a $GLIBC_FILES/usr/lib/gconv/$CHARMAP.so $fs/usr/lib/gconv
53 # Glibc locale.
54 cp -a $GLIBC_FILES/usr/share/i18n/locales/$LOCALEDEF \
55 $fs/usr/share/i18n/locales
56 cp -a $GLIBC_FILES/usr/share/i18n/charmaps/$CHARMAP.gz \
57 $fs/usr/share/i18n/charmaps
58 cp -a $GLIBC_FILES/usr/share/locale/$LOCALE $fs/usr/share/locale
60 PACKAGE="$PKG_NAME"
61 VERSION="$PKG_VERS"
63 # Gen locale files.
64 mkdir -p $fs/usr/lib/locale
65 localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF
66 }
68 # Post install to configure default locale.
69 post_install()
70 {
71 local root
72 root=$1
73 # locale.conf
74 if [ -f $root/etc/locale.conf ]; then
75 echo "LANG=\"$LOCALEDEF\"" > $root/etc/locale.conf
76 echo "LC_ALL=\"$LOCALEDEF\"" >> $root/etc/locale.conf
77 fi
78 }
80 # Back to C if it's the last used locale.
81 post_remove()
82 {
83 if grep -q $LOCALEDEF /etc/locale.conf; then
84 echo "LANG=C" > /etc/locale.conf
85 echo "LC_ALL=C" >> /etc/locale.conf
86 fi
87 }