wok-6.x view locale-pt/receipt @ rev 3035
Moved locale-pt_BR to locale-pt
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue May 12 14:59:16 2009 +0200 (2009-05-12) |
parents | |
children | f3f6bcae6367 |
line source
1 # SliTaz package receipt
3 PACKAGE="locale-pt"
4 VERSION="2.0"
5 CATEGORY="system-tools"
6 SHORT_DESC="Portuguese/Brazilian 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="pt_BR"
16 LOCALEDEF="pt_BR"
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 \
34 $fs/usr/lib/locale $fs/etc/xdg \
35 $fs/usr/share/slitaz/messages
36 cp -a stuff/doc $fs/usr/share
37 cp -a stuff/messages $fs/usr/share/slitaz/messages/pt
38 cp -a stuff/openbox $fs/etc/xdg
39 PKG_NAME="$PACKAGE"
40 PKG_VERS="$VERSION"
41 # Get the core packages messages.
42 for pkg in $CORE_PKGS
43 do
44 [ -f $WOK/$pkg/receipt ] && . $WOK/$pkg/receipt
45 if [ -d $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE ]; then
46 cp -a $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE \
47 $fs/usr/share/locale
48 fi
49 done
50 PACKAGE="$PKG_NAME"
51 VERSION="$PKG_VERS"
52 localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF
53 }
55 # Post install to configure default locale.
56 post_install()
57 {
58 local root
59 root=$1
60 # locale.conf
61 if [ -s $root/etc/locale.conf ]; then
62 echo "LANG=\"$LOCALEDEF\"" > $root/etc/locale.conf
63 echo "LC_ALL=\"$LOCALEDEF\"" >> $root/etc/locale.conf
64 fi
65 # Remove old locale-pt_BR
66 if [ -d /var/lib/tazpkg/installed/locale-pt_BR ]; then
67 echo "y" | tazpkg remove locale-pt_BR
68 fi
69 }
71 # Back to C if it's the last used locale.
72 post_remove()
73 {
74 if grep -q $LOCALEDEF /etc/locale.conf; then
75 echo "LANG=C" > /etc/locale.conf
76 echo "LC_ALL=C" >> /etc/locale.conf
77 fi
78 }