wok-4.x view locale-fr/receipt @ rev 2892
Add French translation files
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue May 05 01:35:14 2009 +0200 (2009-05-05) |
parents | |
children | b48930694762 |
line source
1 # SliTaz package receipt
3 PACKAGE="locale-fr"
4 VERSION="2.0"
5 CATEGORY="system-tools"
6 SHORT_DESC="French locale pack."
7 MAINTAINER="pankso@slitaz.org"
8 DEPENDS="glibc-base"
9 BUILD_DEPENDS="glibc glibc-locale"
10 WEB_SITE="http://www.slitaz.org/"
12 # French messages are directly include in all packages by tazwok.
13 CORE_PKGS=""
15 LOCALE="fr"
16 LOCALEDEF="fr_FR"
17 CHARMAP="ISO-8859-1"
19 # Rules to configure and make the package.
20 compile_rules()
21 {
22 # Ensure packages are built.
23 for pkg in $CORE_PKGS
24 do
25 [ -d $WOK/$pkg/taz ] || tazwok cook $pkg
26 done
27 }
29 # Rules to gen a SliTaz package suitable for Tazpkg.
30 # Genereted locale files are in /usr/lib/locale.
31 genpkg_rules()
32 {
33 mkdir -p $fs/usr/share/locale/$LOCALE $fs/usr/lib/locale
34 cp -a stuff/etc $fs
35 cp -a stuff/usr $fs
36 PKG_NAME="$PACKAGE"
37 PKG_VERS="$VERSION"
38 # Get the core packages messages.
39 for pkg in $CORE_PKGS
40 do
41 [ -f $WOK/$pkg/receipt ] && . $WOK/$pkg/receipt
42 if [ -d $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE ]; then
43 cp -a $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE \
44 $fs/usr/share/locale
45 fi
46 done
47 PACKAGE="$PKG_NAME"
48 VERSION="$PKG_VERS"
49 localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF
50 }
52 # Post install to configure default locale.
53 post_install()
54 {
55 local root
56 root=$1
57 # locale.conf
58 if [ -s $root/etc/locale.conf ]; then
59 echo "LANG=\"$LOCALEDEF\"" > $root/etc/locale.conf
60 echo "LC_ALL=\"$LOCALEDEF\"" >> $root/etc/locale.conf
61 fi
62 }
64 # Back to C if it's the last used locale.
65 post_remove()
66 {
67 if grep -q $LOCALEDEF /etc/locale.conf; then
68 echo "LANG=C" > /etc/locale.conf
69 echo "LC_ALL=C" >> /etc/locale.conf
70 fi
71 }