rev |
line source |
pankso@724
|
1 # SliTaz package receipt
|
pankso@724
|
2
|
pankso@724
|
3 PACKAGE="locale-pt_BR"
|
pankso@724
|
4 VERSION="1.0"
|
pankso@724
|
5 CATEGORY="system-tools"
|
pankso@724
|
6 SHORT_DESC="Brazilian locale pack."
|
pankso@724
|
7 MAINTAINER="pankso@slitaz.org"
|
pankso@724
|
8 DEPENDS="glibc-base"
|
pankso@724
|
9 BUILD_DEPENDS="glibc glibc-locale"
|
pankso@724
|
10 WEB_SITE="http://www.slitaz.org/"
|
pankso@724
|
11
|
pankso@724
|
12 CORE_PKGS="asunder epdfview gpicview gparted glib gtk+ leafpad pcmanfm xpad"
|
pankso@724
|
13
|
pankso@724
|
14 LOCALE="pt_BR"
|
pankso@724
|
15 LOCALEDEF="pt_BR"
|
pankso@724
|
16 CHARMAP="ISO-8859-1"
|
pankso@724
|
17
|
pankso@724
|
18 GLIBC_FILES=$WOK/glibc/glibc-2.7/_pkg
|
pankso@724
|
19 PKG_NAME="$PACKAGE"
|
pankso@724
|
20 PKG_VERS="$VERSION"
|
pankso@724
|
21
|
pascal@1552
|
22 # Rules to configure and make the package.
|
pascal@1552
|
23 compile_rules()
|
pascal@1552
|
24 {
|
pascal@1552
|
25 # Ensure packages are built.
|
pascal@1552
|
26 for pkg in $CORE_PKGS
|
pascal@1552
|
27 do
|
pascal@1552
|
28 [ -d $WOK/$pkg/taz ] || tazwok cook $pkg
|
pascal@1552
|
29 done
|
pascal@1552
|
30 }
|
pascal@1552
|
31
|
pankso@724
|
32 # Rules to gen a SliTaz package suitable for Tazpkg.
|
pankso@724
|
33 # Install files in /usr/lib/locale.
|
pankso@724
|
34 #
|
pankso@724
|
35 genpkg_rules()
|
pankso@724
|
36 {
|
pankso@724
|
37 mkdir -p $fs/usr/share/locale/$LOCALE
|
pankso@724
|
38
|
pankso@724
|
39 # Get the core apps messages.
|
pankso@724
|
40 for pkg in $CORE_PKGS
|
pankso@724
|
41 do
|
pankso@724
|
42 . $WOK/$pkg/receipt
|
pankso@724
|
43 if [ -d $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE ]; then
|
pankso@724
|
44 cp -a $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE \
|
pankso@724
|
45 $fs/usr/share/locale
|
pankso@724
|
46 fi
|
pankso@724
|
47 done
|
pankso@724
|
48
|
pankso@724
|
49 # Glibc locale.
|
pankso@724
|
50 #cp -a $GLIBC_FILES/usr/share/locale/$LOCALE $fs/usr/share/locale
|
pankso@724
|
51
|
pankso@724
|
52 PACKAGE="$PKG_NAME"
|
pankso@724
|
53 VERSION="$PKG_VERS"
|
pankso@724
|
54
|
pankso@724
|
55 # Gen locale files.
|
pankso@724
|
56 mkdir -p $fs/usr/lib/locale
|
pankso@724
|
57 localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF
|
pankso@724
|
58 }
|
pankso@724
|
59
|
pankso@724
|
60 # Post install to configure default locale.
|
pankso@724
|
61 post_install()
|
pankso@724
|
62 {
|
pankso@724
|
63 local root
|
pankso@724
|
64 root=$1
|
pankso@724
|
65 # locale.conf
|
pankso@951
|
66 if [ -s $root/etc/locale.conf ]; then
|
pankso@724
|
67 echo "LANG=\"$LOCALEDEF\"" > $root/etc/locale.conf
|
pankso@724
|
68 echo "LC_ALL=\"$LOCALEDEF\"" >> $root/etc/locale.conf
|
pankso@724
|
69 fi
|
pankso@724
|
70 }
|
pankso@724
|
71
|
pankso@724
|
72 # Back to C if it's the last used locale.
|
pankso@724
|
73 post_remove()
|
pankso@724
|
74 {
|
pankso@724
|
75 if grep -q $LOCALEDEF /etc/locale.conf; then
|
pankso@724
|
76 echo "LANG=C" > /etc/locale.conf
|
pankso@724
|
77 echo "LC_ALL=C" >> /etc/locale.conf
|
pankso@724
|
78 fi
|
pankso@724
|
79 }
|