wok-4.x view locale-it/receipt @ rev 2234

pam-dev: add /usr/include/pam
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Feb 14 10:01:02 2009 +0000 (2009-02-14)
parents 8d131e7b79c2
children d2be5bd5d83e
line source
1 # SliTaz package receipt
3 PACKAGE="locale-it"
4 VERSION="1.0"
5 CATEGORY="system-tools"
6 SHORT_DESC="Italian 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 epdfview gpicview gparted glib gtk+ leafpad pcmanfm xpad"
14 LOCALE="it"
15 LOCALEDEF="it_IT"
16 CHARMAP="ISO-8859-1"
18 GLIBC_FILES=$WOK/glibc/glibc-2.7/_pkg
19 PKG_NAME="$PACKAGE"
20 PKG_VERS="$VERSION"
22 # Rules to configure and make the package.
23 compile_rules()
24 {
25 # Ensure packages are built.
26 for pkg in $CORE_PKGS
27 do
28 [ -d $WOK/$pkg/taz ] || tazwok cook $pkg
29 done
30 }
32 # Rules to gen a SliTaz package suitable for Tazpkg.
33 # Install files in /usr/lib/locale.
34 #
35 genpkg_rules()
36 {
37 mkdir -p $fs/usr/share/locale/$LOCALE
39 # Get the core apps messages.
40 for pkg in $CORE_PKGS
41 do
42 . $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
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 [ -s $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 }