wok-next view locale-cs/receipt @ rev 3038

Add jasper,jasper-dev
author Rohit Joshi <jozee@slitaz.org>
date Tue May 12 13:17:54 2009 +0000 (2009-05-12)
parents d2be5bd5d83e
children f3f6bcae6367
line source
1 # SliTaz package receipt
3 PACKAGE="locale-cs"
4 VERSION="2.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/"
12 CORE_PKGS="asunder alsaplayer epdfview galculator geany gpicview gparted \
13 glib gtk+ grsync leafpad lxpanel lxtask obconf openbox pcmanfm xpad"
15 LOCALE="cs"
16 LOCALEDEF="cs_CZ"
17 CHARMAP="ISO-8859-2"
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 \
34 $fs/usr/lib/locale \
35 $fs/usr/share/slitaz/messages
36 cp -a stuff/messages $fs/usr/share/slitaz/messages/$LOCALE
37 PKG_NAME="$PACKAGE"
38 PKG_VERS="$VERSION"
39 # Get the core packages messages.
40 for pkg in $CORE_PKGS
41 do
42 [ -f $WOK/$pkg/receipt ] && . $WOK/$pkg/receipt
43 if [ -d $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE ]; then
44 cp -a $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE \
45 $fs/usr/share/locale
46 fi
47 done
48 PACKAGE="$PKG_NAME"
49 VERSION="$PKG_VERS"
50 localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF
51 }
53 # Post install to configure default locale.
54 post_install()
55 {
56 local root
57 root=$1
58 # locale.conf
59 if [ -s $root/etc/locale.conf ]; then
60 echo "LANG=\"$LOCALEDEF\"" > $root/etc/locale.conf
61 echo "LC_ALL=\"$LOCALEDEF\"" >> $root/etc/locale.conf
62 fi
63 }
65 # Back to C if it's the last used locale.
66 post_remove()
67 {
68 if grep -q $LOCALEDEF /etc/locale.conf; then
69 echo "LANG=C" > /etc/locale.conf
70 echo "LC_ALL=C" >> /etc/locale.conf
71 fi
72 }