wok-current view locale-ru/receipt @ rev 649

Busybox/cpio: fix hardlinks
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Apr 22 18:54:26 2008 +0000 (2008-04-22)
parents 66a35c398785
children 585bd52eb85b
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 glibc-locale xorg-libX11"
10 WEB_SITE="http://www.slitaz.org/"
12 LOCALE="ru"
13 LOCALEDEF="ru_RU"
14 CHARMAP="KOI8-RU"
15 CORE_PKGS="asunder emelfm2 epdfview geany gparted leafpad xpad"
17 LIBX11_VERSION="1.1.3"
18 GLIBC_FILES=$WOK/glibc/glibc-2.7/_pkg
19 PKG_NAME="$PACKAGE"
20 PKG_VERS="$VERSION"
22 # Rules to gen a SliTaz package suitable for Tazpkg.
23 # Install files in /usr/lib/locale. UTF-8:
24 # localedef -i $LOCALEDEF -f UTF-8 $root/usr/lib/locale/$LOCALEDEF.utf8
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 # X11 locale.
41 #mkdir -p $fs/usr/share/X11/locale
42 #cp -a $WOK/xorg-libX11/libX11-$LIBX11_VERSION/_pkg/usr/share/X11/locale/iso8859-5 \
43 # $fs/usr/share/X11/locale
45 # KOI8-RU gconv lib.
46 mkdir -p $fs/usr/lib/gconv
47 cp -a $GLIBC_FILES/usr/lib/gconv/$CHARMAP.so $fs/usr/lib/gconv
49 # Glibc locale.
50 cp -a $GLIBC_FILES/usr/share/locale/$LOCALE $fs/usr/share/locale
52 PACKAGE="$PKG_NAME"
53 VERSION="$PKG_VERS"
55 # Gen locale files.
56 mkdir -p $fs/usr/lib/locale
57 localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF
58 }
60 # Post install to configure default locale.
61 post_install()
62 {
63 local root
64 root=$1
65 # locale.conf
66 if [ -f $root/etc/locale.conf ]; then
67 echo "LANG=\"$LOCALEDEF\"" > $root/etc/locale.conf
68 echo "LC_ALL=\"$LOCALEDEF\"" >> $root/etc/locale.conf
69 fi
70 }
72 # Back to C if it's the last used locale.
73 post_remove()
74 {
75 if grep -q $LOCALEDEF /etc/locale.conf; then
76 echo "LANG=C" > /etc/locale.conf
77 echo "LC_ALL=C" >> /etc/locale.conf
78 fi
79 }